generated-configure.sh revision 2398:05ac48290793
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
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657STLPORT_LIB
658LIBZIP_CAN_USE_MMAP
659LIBDL
660LIBM
661USE_EXTERNAL_LCMS
662LCMS_LIBS
663LCMS_CFLAGS
664USE_EXTERNAL_LIBZ
665USE_EXTERNAL_LIBPNG
666PNG_LIBS
667PNG_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670LLVM_LIBS
671LLVM_LDFLAGS
672LLVM_CFLAGS
673LLVM_CONFIG
674LIBFFI_LIB_FILE
675ENABLE_LIBFFI_BUNDLING
676LIBFFI_LIBS
677LIBFFI_CFLAGS
678ALSA_LIBS
679ALSA_CFLAGS
680FREETYPE_BUNDLE_LIB_PATH
681FREETYPE_LIBS
682FREETYPE_CFLAGS
683CUPS_CFLAGS
684X_EXTRA_LIBS
685X_LIBS
686X_PRE_LIBS
687X_CFLAGS
688XMKMF
689MSVCP_DLL
690MSVCR_DLL
691LIBCXX
692FIXPATH_DETACH_FLAG
693FIXPATH
694BUILD_GTEST
695VALID_JVM_FEATURES
696JVM_FEATURES_custom
697JVM_FEATURES_zeroshark
698JVM_FEATURES_zero
699JVM_FEATURES_minimal
700JVM_FEATURES_core
701JVM_FEATURES_client
702JVM_FEATURES_server
703INCLUDE_DTRACE
704GCOV_ENABLED
705ZIP_EXTERNAL_DEBUG_SYMBOLS
706COPY_DEBUG_SYMBOLS
707COMPILE_WITH_DEBUG_SYMBOLS
708CFLAGS_WARNINGS_ARE_ERRORS
709BUILD_CC_DISABLE_WARNING_PREFIX
710DISABLE_WARNING_PREFIX
711HOTSPOT_SET_WARNINGS_AS_ERRORS
712WARNINGS_AS_ERRORS
713COMPILER_SUPPORTS_TARGET_BITS_FLAG
714ZERO_ARCHFLAG
715LDFLAGS_TESTEXE
716LDFLAGS_TESTLIB
717CXXFLAGS_TESTEXE
718CXXFLAGS_TESTLIB
719CFLAGS_TESTEXE
720CFLAGS_TESTLIB
721OPENJDK_BUILD_JVM_LIBS
722OPENJDK_BUILD_JVM_ASFLAGS
723OPENJDK_BUILD_JVM_LDFLAGS
724OPENJDK_BUILD_JVM_CFLAGS
725OPENJDK_BUILD_LDFLAGS_HASH_STYLE
726OPENJDK_BUILD_LDFLAGS_CXX_JDK
727OPENJDK_BUILD_JDKEXE_LIBS
728OPENJDK_BUILD_JDKLIB_LIBS
729OPENJDK_BUILD_LDFLAGS_JDKEXE
730OPENJDK_BUILD_LDFLAGS_JDKLIB
731OPENJDK_BUILD_CXXFLAGS_JDKEXE
732OPENJDK_BUILD_CXXFLAGS_JDKLIB
733OPENJDK_BUILD_CFLAGS_JDKEXE
734OPENJDK_BUILD_CFLAGS_JDKLIB
735OPENJDK_BUILD_CXXSTD_CXXFLAG
736JVM_LIBS
737JVM_ASFLAGS
738JVM_LDFLAGS
739JVM_CFLAGS
740LDFLAGS_HASH_STYLE
741LDFLAGS_CXX_JDK
742JDKEXE_LIBS
743JDKLIB_LIBS
744LDFLAGS_JDKEXE
745LDFLAGS_JDKLIB
746CXXFLAGS_JDKEXE
747CXXFLAGS_JDKLIB
748CFLAGS_JDKEXE
749CFLAGS_JDKLIB
750MACOSX_VERSION_MIN
751CXXSTD_CXXFLAG
752CXX_O_FLAG_SIZE
753CXX_O_FLAG_NONE
754CXX_O_FLAG_DEBUG
755CXX_O_FLAG_NORM
756CXX_O_FLAG_HI
757CXX_O_FLAG_HIGHEST
758CXX_O_FLAG_HIGHEST_JVM
759C_O_FLAG_SIZE
760C_O_FLAG_NONE
761C_O_FLAG_DEBUG
762C_O_FLAG_NORM
763C_O_FLAG_HI
764C_O_FLAG_HIGHEST
765C_O_FLAG_HIGHEST_JVM
766JVM_CFLAGS_SYMBOLS
767CXXFLAGS_DEBUG_SYMBOLS
768CFLAGS_DEBUG_SYMBOLS
769CXX_FLAG_DEPS
770C_FLAG_DEPS
771SHARED_LIBRARY_FLAGS
772SET_SHARED_LIBRARY_MAPFILE
773SET_SHARED_LIBRARY_NAME
774SET_SHARED_LIBRARY_ORIGIN
775SET_EXECUTABLE_ORIGIN
776CXX_FLAG_REORDER
777C_FLAG_REORDER
778JVM_RCFLAGS
779RC_FLAGS
780AR_OUT_OPTION
781LD_OUT_OPTION
782EXE_OUT_OPTION
783CC_OUT_OPTION
784STRIPFLAGS
785ARFLAGS
786COMPILER_BINDCMD_FILE_FLAG
787COMPILER_COMMAND_FILE_FLAG
788COMPILER_TARGET_BITS_FLAG
789JT_HOME
790JTREGEXE
791HOTSPOT_TOOLCHAIN_TYPE
792USING_BROKEN_SUSE_LD
793PACKAGE_PATH
794BUILD_AS
795BUILD_LDCXX
796BUILD_LD
797BUILD_STRIP
798BUILD_OBJCOPY
799BUILD_AR
800BUILD_NM
801BUILD_CXX
802BUILD_CC
803BUILD_SYSROOT_LDFLAGS
804BUILD_SYSROOT_CFLAGS
805ac_ct_OBJDUMP
806OBJDUMP
807ac_ct_OBJCOPY
808OBJCOPY
809ac_ct_NM
810ac_ct_STRIP
811GNM
812NM
813STRIP
814MSBUILD
815DUMPBIN
816RC
817MT
818LIPO
819ac_ct_AR
820AR
821AS
822LDCXX
823LD
824CXXCPP
825CPP
826CXX_VERSION_NUMBER
827CC_VERSION_NUMBER
828ac_ct_CXX
829CXXFLAGS
830CXX
831TOOLCHAIN_PATH_CXX
832POTENTIAL_CXX
833OBJEXT
834EXEEXT
835ac_ct_CC
836CPPFLAGS
837LDFLAGS
838CFLAGS
839CC
840TOOLCHAIN_PATH_CC
841POTENTIAL_CC
842TOOLCHAIN_VERSION
843VS_LIB
844VS_INCLUDE
845VS_PATH
846CYGWIN_LINK
847SYSROOT_LDFLAGS
848SYSROOT_CFLAGS
849EXTRA_LDFLAGS
850EXTRA_CXXFLAGS
851EXTRA_CFLAGS
852LEGACY_EXTRA_LDFLAGS
853LEGACY_EXTRA_CXXFLAGS
854LEGACY_EXTRA_CFLAGS
855EXE_SUFFIX
856OBJ_SUFFIX
857STATIC_LIBRARY
858SHARED_LIBRARY
859STATIC_LIBRARY_SUFFIX
860SHARED_LIBRARY_SUFFIX
861LIBRARY_PREFIX
862TOOLCHAIN_TYPE
863STATIC_BUILD
864IMPORT_MODULES_MAKE
865IMPORT_MODULES_SRC
866IMPORT_MODULES_CONF
867IMPORT_MODULES_LIBS
868IMPORT_MODULES_CMDS
869IMPORT_MODULES_CLASSES
870BUILD_OUTPUT
871JDK_TOPDIR
872NASHORN_TOPDIR
873HOTSPOT_TOPDIR
874JAXWS_TOPDIR
875JAXP_TOPDIR
876CORBA_TOPDIR
877LANGTOOLS_TOPDIR
878EXTERNAL_BUILDJDK
879BUILD_JDK
880CREATE_BUILDJDK
881JLINK
882JMOD
883BOOT_JDK_BITS
884JAVAC_FLAGS
885BOOT_JDK_MODULAR
886BOOT_JDK_SOURCETARGET
887JARSIGNER
888JAR
889JAVAH
890JAVAC
891JAVA
892BOOT_JDK
893JAVA_CHECK
894JAVAC_CHECK
895VERSION_IS_GA
896VERSION_SHORT
897VERSION_STRING
898VERSION_NUMBER_FOUR_POSITIONS
899VERSION_NUMBER
900VERSION_OPT
901VERSION_BUILD
902VERSION_PRE
903VERSION_PATCH
904VERSION_SECURITY
905VERSION_MINOR
906VERSION_MAJOR
907MACOSX_BUNDLE_ID_BASE
908MACOSX_BUNDLE_NAME_BASE
909HOTSPOT_VM_DISTRO
910COMPANY_NAME
911JDK_RC_PLATFORM_NAME
912PRODUCT_SUFFIX
913PRODUCT_NAME
914LAUNCHER_NAME
915JLINK_KEEP_PACKAGED_MODULES
916COPYRIGHT_YEAR
917COMPRESS_JARS
918INCLUDE_SA
919UNLIMITED_CRYPTO
920CACERTS_FILE
921ENABLE_HEADLESS_ONLY
922DEFAULT_MAKE_TARGET
923OS_VERSION_MICRO
924OS_VERSION_MINOR
925OS_VERSION_MAJOR
926PKG_CONFIG
927BASH_ARGS
928SETFILE
929CODESIGN
930XATTR
931DSYMUTIL
932IS_GNU_TIME
933PATCH
934DTRACE
935TIME
936STAT
937HG
938READELF
939OTOOL
940LDD
941ZIPEXE
942UNZIP
943TAR_SUPPORTS_TRANSFORM
944TAR_INCLUDE_PARAM
945TAR_CREATE_EXTRA_PARAM
946TAR_TYPE
947FIND_DELETE
948OUTPUT_SYNC
949OUTPUT_SYNC_SUPPORTED
950CHECK_TOOLSDIR_MAKE
951CHECK_TOOLSDIR_GMAKE
952CHECK_MAKE
953CHECK_GMAKE
954MAKE
955PKGHANDLER
956CONFIGURESUPPORT_OUTPUTDIR
957OUTPUT_ROOT
958CONF_NAME
959SPEC
960SDKROOT
961XCODEBUILD
962JVM_VARIANT_MAIN
963VALID_JVM_VARIANTS
964JVM_VARIANTS
965DEBUG_LEVEL
966HOTSPOT_DEBUG_LEVEL
967JDK_VARIANT
968USERNAME
969CANONICAL_TOPDIR
970ORIGINAL_TOPDIR
971TOPDIR
972PATH_SEP
973ZERO_ARCHDEF
974HOTSPOT_BUILD_CPU_DEFINE
975HOTSPOT_BUILD_CPU_ARCH
976HOTSPOT_BUILD_CPU
977HOTSPOT_BUILD_OS_TYPE
978HOTSPOT_BUILD_OS
979OPENJDK_BUILD_BUNDLE_PLATFORM
980OPENJDK_BUILD_CPU_BUNDLE
981OPENJDK_BUILD_OS_BUNDLE
982OPENJDK_BUILD_OS_EXPORT_DIR
983OPENJDK_BUILD_CPU_OSARCH
984OPENJDK_BUILD_CPU_ISADIR
985OPENJDK_BUILD_CPU_LEGACY_LIB
986OPENJDK_BUILD_CPU_LEGACY
987HOTSPOT_TARGET_CPU_DEFINE
988HOTSPOT_TARGET_CPU_ARCH
989HOTSPOT_TARGET_CPU
990HOTSPOT_TARGET_OS_TYPE
991HOTSPOT_TARGET_OS
992DEFINE_CROSS_COMPILE_ARCH
993LP64
994OPENJDK_TARGET_BUNDLE_PLATFORM
995OPENJDK_TARGET_CPU_BUNDLE
996OPENJDK_TARGET_OS_BUNDLE
997OPENJDK_TARGET_OS_EXPORT_DIR
998OPENJDK_TARGET_CPU_OSARCH
999OPENJDK_TARGET_CPU_ISADIR
1000OPENJDK_TARGET_CPU_LEGACY_LIB
1001OPENJDK_TARGET_CPU_LEGACY
1002REQUIRED_OS_VERSION
1003REQUIRED_OS_NAME
1004COMPILE_TYPE
1005OPENJDK_TARGET_CPU_ENDIAN
1006OPENJDK_TARGET_CPU_BITS
1007OPENJDK_TARGET_CPU_ARCH
1008OPENJDK_TARGET_CPU
1009OPENJDK_TARGET_OS_ENV
1010OPENJDK_TARGET_OS_TYPE
1011OPENJDK_TARGET_OS
1012OPENJDK_BUILD_CPU_ENDIAN
1013OPENJDK_BUILD_CPU_BITS
1014OPENJDK_BUILD_CPU_ARCH
1015OPENJDK_BUILD_CPU
1016OPENJDK_BUILD_OS_ENV
1017OPENJDK_BUILD_OS_TYPE
1018OPENJDK_BUILD_OS
1019OPENJDK_BUILD_AUTOCONF_NAME
1020OPENJDK_TARGET_AUTOCONF_NAME
1021target_os
1022target_vendor
1023target_cpu
1024target
1025host_os
1026host_vendor
1027host_cpu
1028host
1029build_os
1030build_vendor
1031build_cpu
1032build
1033NICE
1034CPIO
1035DF
1036READLINK
1037CYGPATH
1038SED
1039FGREP
1040EGREP
1041GREP
1042AWK
1043XARGS
1044WHICH
1045WC
1046UNIQ
1047UNAME
1048TR
1049TOUCH
1050TEE
1051TAR
1052TAIL
1053SORT
1054SH
1055RMDIR
1056RM
1057PRINTF
1058NAWK
1059MV
1060MKTEMP
1061MKDIR
1062LS
1063LN
1064GZIP
1065GUNZIP
1066HEAD
1067FIND
1068FILE
1069EXPR
1070ECHO
1071DIRNAME
1072DIFF
1073DATE
1074CUT
1075CP
1076COMM
1077CMP
1078CHMOD
1079CAT
1080BASH
1081BASENAME
1082DATE_WHEN_CONFIGURED
1083ORIGINAL_PATH
1084CONFIGURE_COMMAND_LINE
1085target_alias
1086host_alias
1087build_alias
1088LIBS
1089ECHO_T
1090ECHO_N
1091ECHO_C
1092DEFS
1093mandir
1094localedir
1095libdir
1096psdir
1097pdfdir
1098dvidir
1099htmldir
1100infodir
1101docdir
1102oldincludedir
1103includedir
1104localstatedir
1105sharedstatedir
1106sysconfdir
1107datadir
1108datarootdir
1109libexecdir
1110sbindir
1111bindir
1112program_transform_name
1113prefix
1114exec_prefix
1115PACKAGE_URL
1116PACKAGE_BUGREPORT
1117PACKAGE_STRING
1118PACKAGE_VERSION
1119PACKAGE_TARNAME
1120PACKAGE_NAME
1121PATH_SEPARATOR
1122SHELL'
1123ac_subst_files=''
1124ac_user_opts='
1125enable_option_checking
1126with_target_bits
1127enable_openjdk_only
1128with_custom_make_dir
1129with_jdk_variant
1130enable_debug
1131with_debug_level
1132with_jvm_variants
1133with_devkit
1134with_sys_root
1135with_sysroot
1136with_tools_dir
1137with_toolchain_path
1138with_extra_path
1139with_sdk_name
1140with_conf_name
1141with_output_sync
1142with_default_make_target
1143enable_headless_only
1144with_cacerts_file
1145enable_unlimited_crypto
1146with_copyright_year
1147enable_keep_packaged_modules
1148with_milestone
1149with_update_version
1150with_user_release_suffix
1151with_build_number
1152with_version_string
1153with_version_pre
1154with_version_opt
1155with_version_build
1156with_version_major
1157with_version_minor
1158with_version_security
1159with_version_patch
1160with_boot_jdk
1161with_build_jdk
1162with_add_source_root
1163with_override_source_root
1164with_adds_and_overrides
1165with_override_langtools
1166with_override_corba
1167with_override_jaxp
1168with_override_jaxws
1169with_override_hotspot
1170with_override_nashorn
1171with_override_jdk
1172with_import_hotspot
1173with_import_modules
1174enable_static_build
1175with_toolchain_type
1176with_extra_cflags
1177with_extra_cxxflags
1178with_extra_ldflags
1179with_toolchain_version
1180with_build_devkit
1181with_jtreg
1182enable_warnings_as_errors
1183with_native_debug_symbols
1184enable_debug_symbols
1185enable_zip_debug_info
1186enable_native_coverage
1187enable_dtrace
1188with_jvm_features
1189with_jvm_interpreter
1190enable_hotspot_gtest
1191with_stdc__lib
1192with_msvcr_dll
1193with_msvcp_dll
1194with_x
1195with_cups
1196with_cups_include
1197with_freetype
1198with_freetype_include
1199with_freetype_lib
1200with_freetype_src
1201enable_freetype_bundling
1202with_alsa
1203with_alsa_include
1204with_alsa_lib
1205with_libffi
1206with_libffi_include
1207with_libffi_lib
1208enable_libffi_bundling
1209with_libjpeg
1210with_giflib
1211with_libpng
1212with_zlib
1213with_lcms
1214with_dxsdk
1215with_dxsdk_lib
1216with_dxsdk_include
1217enable_jtreg_failure_handler
1218enable_generate_classlist
1219with_num_cores
1220with_memory_size
1221with_jobs
1222with_test_jobs
1223with_boot_jdk_jvmargs
1224with_sjavac_server_java
1225enable_sjavac
1226enable_javac_server
1227enable_icecc
1228enable_precompiled_headers
1229enable_ccache
1230with_ccache_dir
1231'
1232      ac_precious_vars='build_alias
1233host_alias
1234target_alias
1235BASENAME
1236BASH
1237CAT
1238CHMOD
1239CMP
1240COMM
1241CP
1242CUT
1243DATE
1244DIFF
1245DIRNAME
1246ECHO
1247EXPR
1248FILE
1249FIND
1250HEAD
1251GUNZIP
1252GZIP
1253LN
1254LS
1255MKDIR
1256MKTEMP
1257MV
1258NAWK
1259PRINTF
1260RM
1261RMDIR
1262SH
1263SORT
1264TAIL
1265TAR
1266TEE
1267TOUCH
1268TR
1269UNAME
1270UNIQ
1271WC
1272WHICH
1273XARGS
1274AWK
1275GREP
1276EGREP
1277FGREP
1278SED
1279CYGPATH
1280READLINK
1281DF
1282CPIO
1283NICE
1284MAKE
1285UNZIP
1286ZIPEXE
1287LDD
1288OTOOL
1289READELF
1290HG
1291STAT
1292TIME
1293DTRACE
1294PATCH
1295DSYMUTIL
1296XATTR
1297CODESIGN
1298SETFILE
1299PKG_CONFIG
1300JAVA
1301JAVAC
1302JAVAH
1303JAR
1304JARSIGNER
1305CC
1306CFLAGS
1307LDFLAGS
1308LIBS
1309CPPFLAGS
1310CXX
1311CXXFLAGS
1312CCC
1313CPP
1314CXXCPP
1315AS
1316AR
1317LIPO
1318STRIP
1319NM
1320GNM
1321OBJCOPY
1322OBJDUMP
1323BUILD_CC
1324BUILD_CXX
1325BUILD_NM
1326BUILD_AR
1327BUILD_OBJCOPY
1328BUILD_STRIP
1329JTREGEXE
1330XMKMF
1331FREETYPE_CFLAGS
1332FREETYPE_LIBS
1333ALSA_CFLAGS
1334ALSA_LIBS
1335LIBFFI_CFLAGS
1336LIBFFI_LIBS
1337PNG_CFLAGS
1338PNG_LIBS
1339LCMS_CFLAGS
1340LCMS_LIBS
1341ICECC_CMD
1342ICECC_CREATE_ENV
1343ICECC_WRAPPER
1344CCACHE'
1345
1346
1347# Initialize some variables set by options.
1348ac_init_help=
1349ac_init_version=false
1350ac_unrecognized_opts=
1351ac_unrecognized_sep=
1352# The variables have the same names as the options, with
1353# dashes changed to underlines.
1354cache_file=/dev/null
1355exec_prefix=NONE
1356no_create=
1357no_recursion=
1358prefix=NONE
1359program_prefix=NONE
1360program_suffix=NONE
1361program_transform_name=s,x,x,
1362silent=
1363site=
1364srcdir=
1365verbose=
1366x_includes=NONE
1367x_libraries=NONE
1368
1369# Installation directory options.
1370# These are left unexpanded so users can "make install exec_prefix=/foo"
1371# and all the variables that are supposed to be based on exec_prefix
1372# by default will actually change.
1373# Use braces instead of parens because sh, perl, etc. also accept them.
1374# (The list follows the same order as the GNU Coding Standards.)
1375bindir='${exec_prefix}/bin'
1376sbindir='${exec_prefix}/sbin'
1377libexecdir='${exec_prefix}/libexec'
1378datarootdir='${prefix}/share'
1379datadir='${datarootdir}'
1380sysconfdir='${prefix}/etc'
1381sharedstatedir='${prefix}/com'
1382localstatedir='${prefix}/var'
1383includedir='${prefix}/include'
1384oldincludedir='/usr/include'
1385docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1386infodir='${datarootdir}/info'
1387htmldir='${docdir}'
1388dvidir='${docdir}'
1389pdfdir='${docdir}'
1390psdir='${docdir}'
1391libdir='${exec_prefix}/lib'
1392localedir='${datarootdir}/locale'
1393mandir='${datarootdir}/man'
1394
1395ac_prev=
1396ac_dashdash=
1397for ac_option
1398do
1399  # If the previous option needs an argument, assign it.
1400  if test -n "$ac_prev"; then
1401    eval $ac_prev=\$ac_option
1402    ac_prev=
1403    continue
1404  fi
1405
1406  case $ac_option in
1407  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1408  *=)   ac_optarg= ;;
1409  *)    ac_optarg=yes ;;
1410  esac
1411
1412  # Accept the important Cygnus configure options, so we can diagnose typos.
1413
1414  case $ac_dashdash$ac_option in
1415  --)
1416    ac_dashdash=yes ;;
1417
1418  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1419    ac_prev=bindir ;;
1420  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1421    bindir=$ac_optarg ;;
1422
1423  -build | --build | --buil | --bui | --bu)
1424    ac_prev=build_alias ;;
1425  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1426    build_alias=$ac_optarg ;;
1427
1428  -cache-file | --cache-file | --cache-fil | --cache-fi \
1429  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1430    ac_prev=cache_file ;;
1431  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1432  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1433    cache_file=$ac_optarg ;;
1434
1435  --config-cache | -C)
1436    cache_file=config.cache ;;
1437
1438  -datadir | --datadir | --datadi | --datad)
1439    ac_prev=datadir ;;
1440  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1441    datadir=$ac_optarg ;;
1442
1443  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1444  | --dataroo | --dataro | --datar)
1445    ac_prev=datarootdir ;;
1446  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1447  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1448    datarootdir=$ac_optarg ;;
1449
1450  -disable-* | --disable-*)
1451    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1452    # Reject names that are not valid shell variable names.
1453    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1454      as_fn_error $? "invalid feature name: $ac_useropt"
1455    ac_useropt_orig=$ac_useropt
1456    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1457    case $ac_user_opts in
1458      *"
1459"enable_$ac_useropt"
1460"*) ;;
1461      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1462	 ac_unrecognized_sep=', ';;
1463    esac
1464    eval enable_$ac_useropt=no ;;
1465
1466  -docdir | --docdir | --docdi | --doc | --do)
1467    ac_prev=docdir ;;
1468  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1469    docdir=$ac_optarg ;;
1470
1471  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1472    ac_prev=dvidir ;;
1473  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1474    dvidir=$ac_optarg ;;
1475
1476  -enable-* | --enable-*)
1477    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1478    # Reject names that are not valid shell variable names.
1479    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1480      as_fn_error $? "invalid feature name: $ac_useropt"
1481    ac_useropt_orig=$ac_useropt
1482    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1483    case $ac_user_opts in
1484      *"
1485"enable_$ac_useropt"
1486"*) ;;
1487      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1488	 ac_unrecognized_sep=', ';;
1489    esac
1490    eval enable_$ac_useropt=\$ac_optarg ;;
1491
1492  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1493  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1494  | --exec | --exe | --ex)
1495    ac_prev=exec_prefix ;;
1496  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1497  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1498  | --exec=* | --exe=* | --ex=*)
1499    exec_prefix=$ac_optarg ;;
1500
1501  -gas | --gas | --ga | --g)
1502    # Obsolete; use --with-gas.
1503    with_gas=yes ;;
1504
1505  -help | --help | --hel | --he | -h)
1506    ac_init_help=long ;;
1507  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1508    ac_init_help=recursive ;;
1509  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1510    ac_init_help=short ;;
1511
1512  -host | --host | --hos | --ho)
1513    ac_prev=host_alias ;;
1514  -host=* | --host=* | --hos=* | --ho=*)
1515    host_alias=$ac_optarg ;;
1516
1517  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1518    ac_prev=htmldir ;;
1519  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1520  | --ht=*)
1521    htmldir=$ac_optarg ;;
1522
1523  -includedir | --includedir | --includedi | --included | --include \
1524  | --includ | --inclu | --incl | --inc)
1525    ac_prev=includedir ;;
1526  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1527  | --includ=* | --inclu=* | --incl=* | --inc=*)
1528    includedir=$ac_optarg ;;
1529
1530  -infodir | --infodir | --infodi | --infod | --info | --inf)
1531    ac_prev=infodir ;;
1532  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1533    infodir=$ac_optarg ;;
1534
1535  -libdir | --libdir | --libdi | --libd)
1536    ac_prev=libdir ;;
1537  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1538    libdir=$ac_optarg ;;
1539
1540  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1541  | --libexe | --libex | --libe)
1542    ac_prev=libexecdir ;;
1543  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1544  | --libexe=* | --libex=* | --libe=*)
1545    libexecdir=$ac_optarg ;;
1546
1547  -localedir | --localedir | --localedi | --localed | --locale)
1548    ac_prev=localedir ;;
1549  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1550    localedir=$ac_optarg ;;
1551
1552  -localstatedir | --localstatedir | --localstatedi | --localstated \
1553  | --localstate | --localstat | --localsta | --localst | --locals)
1554    ac_prev=localstatedir ;;
1555  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1556  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1557    localstatedir=$ac_optarg ;;
1558
1559  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1560    ac_prev=mandir ;;
1561  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1562    mandir=$ac_optarg ;;
1563
1564  -nfp | --nfp | --nf)
1565    # Obsolete; use --without-fp.
1566    with_fp=no ;;
1567
1568  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1569  | --no-cr | --no-c | -n)
1570    no_create=yes ;;
1571
1572  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1573  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1574    no_recursion=yes ;;
1575
1576  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1577  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1578  | --oldin | --oldi | --old | --ol | --o)
1579    ac_prev=oldincludedir ;;
1580  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1581  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1582  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1583    oldincludedir=$ac_optarg ;;
1584
1585  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1586    ac_prev=prefix ;;
1587  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1588    prefix=$ac_optarg ;;
1589
1590  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1591  | --program-pre | --program-pr | --program-p)
1592    ac_prev=program_prefix ;;
1593  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1594  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1595    program_prefix=$ac_optarg ;;
1596
1597  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1598  | --program-suf | --program-su | --program-s)
1599    ac_prev=program_suffix ;;
1600  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1601  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1602    program_suffix=$ac_optarg ;;
1603
1604  -program-transform-name | --program-transform-name \
1605  | --program-transform-nam | --program-transform-na \
1606  | --program-transform-n | --program-transform- \
1607  | --program-transform | --program-transfor \
1608  | --program-transfo | --program-transf \
1609  | --program-trans | --program-tran \
1610  | --progr-tra | --program-tr | --program-t)
1611    ac_prev=program_transform_name ;;
1612  -program-transform-name=* | --program-transform-name=* \
1613  | --program-transform-nam=* | --program-transform-na=* \
1614  | --program-transform-n=* | --program-transform-=* \
1615  | --program-transform=* | --program-transfor=* \
1616  | --program-transfo=* | --program-transf=* \
1617  | --program-trans=* | --program-tran=* \
1618  | --progr-tra=* | --program-tr=* | --program-t=*)
1619    program_transform_name=$ac_optarg ;;
1620
1621  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1622    ac_prev=pdfdir ;;
1623  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1624    pdfdir=$ac_optarg ;;
1625
1626  -psdir | --psdir | --psdi | --psd | --ps)
1627    ac_prev=psdir ;;
1628  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1629    psdir=$ac_optarg ;;
1630
1631  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1632  | -silent | --silent | --silen | --sile | --sil)
1633    silent=yes ;;
1634
1635  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1636    ac_prev=sbindir ;;
1637  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1638  | --sbi=* | --sb=*)
1639    sbindir=$ac_optarg ;;
1640
1641  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1642  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1643  | --sharedst | --shareds | --shared | --share | --shar \
1644  | --sha | --sh)
1645    ac_prev=sharedstatedir ;;
1646  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1647  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1648  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1649  | --sha=* | --sh=*)
1650    sharedstatedir=$ac_optarg ;;
1651
1652  -site | --site | --sit)
1653    ac_prev=site ;;
1654  -site=* | --site=* | --sit=*)
1655    site=$ac_optarg ;;
1656
1657  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1658    ac_prev=srcdir ;;
1659  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1660    srcdir=$ac_optarg ;;
1661
1662  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1663  | --syscon | --sysco | --sysc | --sys | --sy)
1664    ac_prev=sysconfdir ;;
1665  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1666  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1667    sysconfdir=$ac_optarg ;;
1668
1669  -target | --target | --targe | --targ | --tar | --ta | --t)
1670    ac_prev=target_alias ;;
1671  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1672    target_alias=$ac_optarg ;;
1673
1674  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1675    verbose=yes ;;
1676
1677  -version | --version | --versio | --versi | --vers | -V)
1678    ac_init_version=: ;;
1679
1680  -with-* | --with-*)
1681    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1682    # Reject names that are not valid shell variable names.
1683    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1684      as_fn_error $? "invalid package name: $ac_useropt"
1685    ac_useropt_orig=$ac_useropt
1686    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1687    case $ac_user_opts in
1688      *"
1689"with_$ac_useropt"
1690"*) ;;
1691      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1692	 ac_unrecognized_sep=', ';;
1693    esac
1694    eval with_$ac_useropt=\$ac_optarg ;;
1695
1696  -without-* | --without-*)
1697    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1698    # Reject names that are not valid shell variable names.
1699    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1700      as_fn_error $? "invalid package name: $ac_useropt"
1701    ac_useropt_orig=$ac_useropt
1702    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1703    case $ac_user_opts in
1704      *"
1705"with_$ac_useropt"
1706"*) ;;
1707      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1708	 ac_unrecognized_sep=', ';;
1709    esac
1710    eval with_$ac_useropt=no ;;
1711
1712  --x)
1713    # Obsolete; use --with-x.
1714    with_x=yes ;;
1715
1716  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1717  | --x-incl | --x-inc | --x-in | --x-i)
1718    ac_prev=x_includes ;;
1719  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1720  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1721    x_includes=$ac_optarg ;;
1722
1723  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1724  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1725    ac_prev=x_libraries ;;
1726  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1727  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1728    x_libraries=$ac_optarg ;;
1729
1730  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1731Try \`$0 --help' for more information"
1732    ;;
1733
1734  *=*)
1735    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1736    # Reject names that are not valid shell variable names.
1737    case $ac_envvar in #(
1738      '' | [0-9]* | *[!_$as_cr_alnum]* )
1739      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1740    esac
1741    eval $ac_envvar=\$ac_optarg
1742    export $ac_envvar ;;
1743
1744  *)
1745    # FIXME: should be removed in autoconf 3.0.
1746    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1747    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1748      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1749    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1750    ;;
1751
1752  esac
1753done
1754
1755if test -n "$ac_prev"; then
1756  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1757  as_fn_error $? "missing argument to $ac_option"
1758fi
1759
1760if test -n "$ac_unrecognized_opts"; then
1761  case $enable_option_checking in
1762    no) ;;
1763    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1764    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1765  esac
1766fi
1767
1768# Check all directory arguments for consistency.
1769for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1770		datadir sysconfdir sharedstatedir localstatedir includedir \
1771		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1772		libdir localedir mandir
1773do
1774  eval ac_val=\$$ac_var
1775  # Remove trailing slashes.
1776  case $ac_val in
1777    */ )
1778      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1779      eval $ac_var=\$ac_val;;
1780  esac
1781  # Be sure to have absolute directory names.
1782  case $ac_val in
1783    [\\/$]* | ?:[\\/]* )  continue;;
1784    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1785  esac
1786  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1787done
1788
1789# There might be people who depend on the old broken behavior: `$host'
1790# used to hold the argument of --host etc.
1791# FIXME: To remove some day.
1792build=$build_alias
1793host=$host_alias
1794target=$target_alias
1795
1796# FIXME: To remove some day.
1797if test "x$host_alias" != x; then
1798  if test "x$build_alias" = x; then
1799    cross_compiling=maybe
1800  elif test "x$build_alias" != "x$host_alias"; then
1801    cross_compiling=yes
1802  fi
1803fi
1804
1805ac_tool_prefix=
1806test -n "$host_alias" && ac_tool_prefix=$host_alias-
1807
1808test "$silent" = yes && exec 6>/dev/null
1809
1810
1811ac_pwd=`pwd` && test -n "$ac_pwd" &&
1812ac_ls_di=`ls -di .` &&
1813ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1814  as_fn_error $? "working directory cannot be determined"
1815test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1816  as_fn_error $? "pwd does not report name of working directory"
1817
1818
1819# Find the source files, if location was not specified.
1820if test -z "$srcdir"; then
1821  ac_srcdir_defaulted=yes
1822  # Try the directory containing this script, then the parent directory.
1823  ac_confdir=`$as_dirname -- "$as_myself" ||
1824$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1825	 X"$as_myself" : 'X\(//\)[^/]' \| \
1826	 X"$as_myself" : 'X\(//\)$' \| \
1827	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1828$as_echo X"$as_myself" |
1829    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1830	    s//\1/
1831	    q
1832	  }
1833	  /^X\(\/\/\)[^/].*/{
1834	    s//\1/
1835	    q
1836	  }
1837	  /^X\(\/\/\)$/{
1838	    s//\1/
1839	    q
1840	  }
1841	  /^X\(\/\).*/{
1842	    s//\1/
1843	    q
1844	  }
1845	  s/.*/./; q'`
1846  srcdir=$ac_confdir
1847  if test ! -r "$srcdir/$ac_unique_file"; then
1848    srcdir=..
1849  fi
1850else
1851  ac_srcdir_defaulted=no
1852fi
1853if test ! -r "$srcdir/$ac_unique_file"; then
1854  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1855  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1856fi
1857ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1858ac_abs_confdir=`(
1859	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1860	pwd)`
1861# When building in place, set srcdir=.
1862if test "$ac_abs_confdir" = "$ac_pwd"; then
1863  srcdir=.
1864fi
1865# Remove unnecessary trailing slashes from srcdir.
1866# Double slashes in file names in object file debugging info
1867# mess up M-x gdb in Emacs.
1868case $srcdir in
1869*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1870esac
1871for ac_var in $ac_precious_vars; do
1872  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1873  eval ac_env_${ac_var}_value=\$${ac_var}
1874  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1875  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1876done
1877
1878#
1879# Report the --help message.
1880#
1881if test "$ac_init_help" = "long"; then
1882  # Omit some internal or obsolete options to make the list less imposing.
1883  # This message is too long to be a string in the A/UX 3.1 sh.
1884  cat <<_ACEOF
1885\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1886
1887Usage: $0 [OPTION]... [VAR=VALUE]...
1888
1889To assign environment variables (e.g., CC, CFLAGS...), specify them as
1890VAR=VALUE.  See below for descriptions of some of the useful variables.
1891
1892Defaults for the options are specified in brackets.
1893
1894Configuration:
1895  -h, --help              display this help and exit
1896      --help=short        display options specific to this package
1897      --help=recursive    display the short help of all the included packages
1898  -V, --version           display version information and exit
1899  -q, --quiet, --silent   do not print \`checking ...' messages
1900      --cache-file=FILE   cache test results in FILE [disabled]
1901  -C, --config-cache      alias for \`--cache-file=config.cache'
1902  -n, --no-create         do not create output files
1903      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1904
1905Installation directories:
1906  --prefix=PREFIX         install architecture-independent files in PREFIX
1907                          [$ac_default_prefix]
1908  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1909                          [PREFIX]
1910
1911By default, \`make install' will install all the files in
1912\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1913an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1914for instance \`--prefix=\$HOME'.
1915
1916For better control, use the options below.
1917
1918Fine tuning of the installation directories:
1919  --bindir=DIR            user executables [EPREFIX/bin]
1920  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1921  --libexecdir=DIR        program executables [EPREFIX/libexec]
1922  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1923  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1924  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1925  --libdir=DIR            object code libraries [EPREFIX/lib]
1926  --includedir=DIR        C header files [PREFIX/include]
1927  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1928  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1929  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1930  --infodir=DIR           info documentation [DATAROOTDIR/info]
1931  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1932  --mandir=DIR            man documentation [DATAROOTDIR/man]
1933  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1934  --htmldir=DIR           html documentation [DOCDIR]
1935  --dvidir=DIR            dvi documentation [DOCDIR]
1936  --pdfdir=DIR            pdf documentation [DOCDIR]
1937  --psdir=DIR             ps documentation [DOCDIR]
1938_ACEOF
1939
1940  cat <<\_ACEOF
1941
1942X features:
1943  --x-includes=DIR    X include files are in DIR
1944  --x-libraries=DIR   X library files are in DIR
1945
1946System types:
1947  --build=BUILD     configure for building on BUILD [guessed]
1948  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1949  --target=TARGET   configure for building compilers for TARGET [HOST]
1950_ACEOF
1951fi
1952
1953if test -n "$ac_init_help"; then
1954  case $ac_init_help in
1955     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1956   esac
1957  cat <<\_ACEOF
1958
1959Optional Features:
1960  --disable-option-checking  ignore unrecognized --enable/--with options
1961  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1962  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1963  --enable-openjdk-only   suppress building custom source even if present
1964                          [disabled]
1965  --enable-debug          set the debug level to fastdebug (shorthand for
1966                          --with-debug-level=fastdebug) [disabled]
1967  --enable-headless-only  only build headless (no GUI) support [disabled]
1968  --disable-unlimited-crypto
1969                          Disable unlimited crypto policy [enabled]
1970  --disable-keep-packaged-modules
1971                          Do not keep packaged modules in jdk image [enable]
1972  --enable-static-build   enable static library build [disabled]
1973  --disable-warnings-as-errors
1974                          do not consider native warnings to be an error
1975                          [enabled]
1976  --enable-debug-symbols  Deprecated. Option is kept for backwards
1977                          compatibility and is ignored
1978  --enable-zip-debug-info Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --enable-native-coverage
1981                          enable native compilation with code coverage
1982                          data[disabled]
1983  --enable-dtrace[=yes/no/auto]
1984                          enable dtrace. Default is auto, where dtrace is
1985                          enabled if all dependencies are present.
1986  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1987  --disable-freetype-bundling
1988                          disable bundling of the freetype library with the
1989                          build result [enabled on Windows or when using
1990                          --with-freetype, disabled otherwise]
1991  --enable-libffi-bundling
1992                          enable bundling of libffi.so to make the built JDK
1993                          runnable on more systems
1994  --enable-jtreg-failure-handler
1995                          forces build of the jtreg failure handler to be
1996                          enabled, missing dependencies become fatal errors.
1997                          Default is auto, where the failure handler is built
1998                          if all dependencies are present and otherwise just
1999                          disabled.
2000  --disable-generate-classlist
2001                          forces enabling or disabling of the generation of a
2002                          CDS classlist at build time. Default is to generate
2003                          it when either the server or client JVMs are built.
2004  --enable-sjavac         use sjavac to do fast incremental compiles
2005                          [disabled]
2006  --disable-javac-server  disable javac server [enabled]
2007  --enable-icecc          enable distribted compilation of native code using
2008                          icecc/icecream [disabled]
2009  --disable-precompiled-headers
2010                          disable using precompiled headers when compiling C++
2011                          [enabled]
2012  --enable-ccache         enable using ccache to speed up recompilations
2013                          [disabled]
2014
2015Optional Packages:
2016  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2017  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2018  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2019                          support it), e.g. --with-target-bits=32 [guessed]
2020  --with-custom-make-dir  Deprecated. Option is kept for backwards
2021                          compatibility and is ignored
2022  --with-jdk-variant      JDK variant to build (normal) [normal]
2023  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2024                          optimized) [release]
2025  --with-jvm-variants     JVM variants (separated by commas) to build
2026                          (server,client,minimal,core,zero,zeroshark,custom)
2027                          [server]
2028  --with-devkit           use this devkit for compilers, tools and resources
2029  --with-sys-root         alias for --with-sysroot for backwards compatability
2030  --with-sysroot          use this directory as sysroot
2031  --with-tools-dir        alias for --with-toolchain-path for backwards
2032                          compatibility
2033  --with-toolchain-path   prepend these directories when searching for
2034                          toolchain binaries (compilers etc)
2035  --with-extra-path       prepend these directories to the default path
2036  --with-sdk-name         use the platform SDK of the given name. [macosx]
2037  --with-conf-name        use this as the name of the configuration [generated
2038                          from important configuration options]
2039  --with-output-sync      set make output sync type if supported by make.
2040                          [recurse]
2041  --with-default-make-target
2042                          set the default make target [exploded-image]
2043  --with-cacerts-file     specify alternative cacerts file
2044  --with-copyright-year   Set copyright year value for build [current year]
2045  --with-milestone        Deprecated. Option is kept for backwards
2046                          compatibility and is ignored
2047  --with-update-version   Deprecated. Option is kept for backwards
2048                          compatibility and is ignored
2049  --with-user-release-suffix
2050                          Deprecated. Option is kept for backwards
2051                          compatibility and is ignored
2052  --with-build-number     Deprecated. Option is kept for backwards
2053                          compatibility and is ignored
2054  --with-version-string   Set version string [calculated]
2055  --with-version-pre      Set the base part of the version 'PRE' field
2056                          (pre-release identifier) ['internal']
2057  --with-version-opt      Set version 'OPT' field (build metadata)
2058                          [<timestamp>.<user>.<dirname>]
2059  --with-version-build    Set version 'BUILD' field (build number) [not
2060                          specified]
2061  --with-version-major    Set version 'MAJOR' field (first number) [current
2062                          source value]
2063  --with-version-minor    Set version 'MINOR' field (second number) [current
2064                          source value]
2065  --with-version-security Set version 'SECURITY' field (third number) [current
2066                          source value]
2067  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2068                          specified]
2069  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2070  --with-build-jdk        path to JDK of same version as is being built[the
2071                          newly built JDK]
2072  --with-add-source-root  Deprecated. Option is kept for backwards
2073                          compatibility and is ignored
2074  --with-override-source-root
2075                          Deprecated. Option is kept for backwards
2076                          compatibility and is ignored
2077  --with-adds-and-overrides
2078                          Deprecated. Option is kept for backwards
2079                          compatibility and is ignored
2080  --with-override-langtools
2081                          Deprecated. Option is kept for backwards
2082                          compatibility and is ignored
2083  --with-override-corba   Deprecated. Option is kept for backwards
2084                          compatibility and is ignored
2085  --with-override-jaxp    Deprecated. Option is kept for backwards
2086                          compatibility and is ignored
2087  --with-override-jaxws   Deprecated. Option is kept for backwards
2088                          compatibility and is ignored
2089  --with-override-hotspot Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-nashorn Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-jdk     Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-import_hotspot   Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-import-modules   import a set of prebuilt modules either as a zip
2098                          file or an exploded directory
2099  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2100                          to show possible values [platform dependent]
2101  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2102  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2103  --with-extra-ldflags    extra flags to be used when linking jdk
2104  --with-toolchain-version
2105                          the version of the toolchain to look for, use
2106                          '--help' to show possible values [platform
2107                          dependent]
2108  --with-build-devkit     Devkit to use for the build platform toolchain
2109  --with-jtreg            Regression Test Harness [probed]
2110  --with-native-debug-symbols
2111                          set the native debug symbol configuration (none,
2112                          internal, external, zipped) [varying]
2113  --with-jvm-features     additional JVM features to enable (separated by
2114                          comma), use '--help' to show possible values [none]
2115  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2116                          compatibility and is ignored
2117  --with-stdc++lib=<static>,<dynamic>,<default>
2118                          force linking of the C++ runtime on Linux to either
2119                          static or dynamic, default is static with dynamic as
2120                          fallback
2121  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2122                          (Windows only) [probed]
2123  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2124                          (Windows only) [probed]
2125  --with-x                use the X Window System
2126  --with-cups             specify prefix directory for the cups package
2127                          (expecting the headers under PATH/include)
2128  --with-cups-include     specify directory for the cups include files
2129  --with-freetype         specify prefix directory for the freetype package
2130                          (expecting the libraries under PATH/lib and the
2131                          headers under PATH/include)
2132  --with-freetype-include specify directory for the freetype include files
2133  --with-freetype-lib     specify directory for the freetype library
2134  --with-freetype-src     specify directory with freetype sources to
2135                          automatically build the library (experimental,
2136                          Windows-only)
2137  --with-alsa             specify prefix directory for the alsa package
2138                          (expecting the libraries under PATH/lib and the
2139                          headers under PATH/include)
2140  --with-alsa-include     specify directory for the alsa include files
2141  --with-alsa-lib         specify directory for the alsa library
2142  --with-libffi           specify prefix directory for the libffi package
2143                          (expecting the libraries under PATH/lib and the
2144                          headers under PATH/include)
2145  --with-libffi-include   specify directory for the libffi include files
2146  --with-libffi-lib       specify directory for the libffi library
2147  --with-libjpeg          use libjpeg from build system or OpenJDK source
2148                          (system, bundled) [bundled]
2149  --with-giflib           use giflib from build system or OpenJDK source
2150                          (system, bundled) [bundled]
2151  --with-libpng           use libpng from build system or OpenJDK source
2152                          (system, bundled) [bundled]
2153  --with-zlib             use zlib from build system or OpenJDK source
2154                          (system, bundled) [bundled]
2155  --with-lcms             use lcms2 from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-dxsdk            Deprecated. Option is kept for backwards
2158                          compatibility and is ignored
2159  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2160                          compatibility and is ignored
2161  --with-dxsdk-include    Deprecated. Option is kept for backwards
2162                          compatibility and is ignored
2163  --with-num-cores        number of cores in the build system, e.g.
2164                          --with-num-cores=8 [probed]
2165  --with-memory-size      memory (in MB) available in the build system, e.g.
2166                          --with-memory-size=1024 [probed]
2167  --with-jobs             number of parallel jobs to let make run [calculated
2168                          based on cores and memory]
2169  --with-test-jobs        number of parallel tests jobs to run [based on build
2170                          jobs]
2171  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2172                          invocations of boot JDK, overriding the default
2173                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2174                          -enableassertions"
2175  --with-sjavac-server-java
2176                          use this java binary for running the sjavac
2177                          background server [Boot JDK java]
2178  --with-ccache-dir       where to store ccache files [~/.ccache]
2179
2180Some influential environment variables:
2181  BASENAME    Override default value for BASENAME
2182  BASH        Override default value for BASH
2183  CAT         Override default value for CAT
2184  CHMOD       Override default value for CHMOD
2185  CMP         Override default value for CMP
2186  COMM        Override default value for COMM
2187  CP          Override default value for CP
2188  CUT         Override default value for CUT
2189  DATE        Override default value for DATE
2190  DIFF        Override default value for DIFF
2191  DIRNAME     Override default value for DIRNAME
2192  ECHO        Override default value for ECHO
2193  EXPR        Override default value for EXPR
2194  FILE        Override default value for FILE
2195  FIND        Override default value for FIND
2196  HEAD        Override default value for HEAD
2197  GUNZIP      Override default value for GUNZIP
2198  GZIP        Override default value for GZIP
2199  LN          Override default value for LN
2200  LS          Override default value for LS
2201  MKDIR       Override default value for MKDIR
2202  MKTEMP      Override default value for MKTEMP
2203  MV          Override default value for MV
2204  NAWK        Override default value for NAWK
2205  PRINTF      Override default value for PRINTF
2206  RM          Override default value for RM
2207  RMDIR       Override default value for RMDIR
2208  SH          Override default value for SH
2209  SORT        Override default value for SORT
2210  TAIL        Override default value for TAIL
2211  TAR         Override default value for TAR
2212  TEE         Override default value for TEE
2213  TOUCH       Override default value for TOUCH
2214  TR          Override default value for TR
2215  UNAME       Override default value for UNAME
2216  UNIQ        Override default value for UNIQ
2217  WC          Override default value for WC
2218  WHICH       Override default value for WHICH
2219  XARGS       Override default value for XARGS
2220  AWK         Override default value for AWK
2221  GREP        Override default value for GREP
2222  EGREP       Override default value for EGREP
2223  FGREP       Override default value for FGREP
2224  SED         Override default value for SED
2225  CYGPATH     Override default value for CYGPATH
2226  READLINK    Override default value for READLINK
2227  DF          Override default value for DF
2228  CPIO        Override default value for CPIO
2229  NICE        Override default value for NICE
2230  MAKE        Override default value for MAKE
2231  UNZIP       Override default value for UNZIP
2232  ZIPEXE      Override default value for ZIPEXE
2233  LDD         Override default value for LDD
2234  OTOOL       Override default value for OTOOL
2235  READELF     Override default value for READELF
2236  HG          Override default value for HG
2237  STAT        Override default value for STAT
2238  TIME        Override default value for TIME
2239  DTRACE      Override default value for DTRACE
2240  PATCH       Override default value for PATCH
2241  DSYMUTIL    Override default value for DSYMUTIL
2242  XATTR       Override default value for XATTR
2243  CODESIGN    Override default value for CODESIGN
2244  SETFILE     Override default value for SETFILE
2245  PKG_CONFIG  path to pkg-config utility
2246  JAVA        Override default value for JAVA
2247  JAVAC       Override default value for JAVAC
2248  JAVAH       Override default value for JAVAH
2249  JAR         Override default value for JAR
2250  JARSIGNER   Override default value for JARSIGNER
2251  CC          C compiler command
2252  CFLAGS      C compiler flags
2253  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2254              nonstandard directory <lib dir>
2255  LIBS        libraries to pass to the linker, e.g. -l<library>
2256  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2257              you have headers in a nonstandard directory <include dir>
2258  CXX         C++ compiler command
2259  CXXFLAGS    C++ compiler flags
2260  CPP         C preprocessor
2261  CXXCPP      C++ preprocessor
2262  AS          Override default value for AS
2263  AR          Override default value for AR
2264  LIPO        Override default value for LIPO
2265  STRIP       Override default value for STRIP
2266  NM          Override default value for NM
2267  GNM         Override default value for GNM
2268  OBJCOPY     Override default value for OBJCOPY
2269  OBJDUMP     Override default value for OBJDUMP
2270  BUILD_CC    Override default value for BUILD_CC
2271  BUILD_CXX   Override default value for BUILD_CXX
2272  BUILD_NM    Override default value for BUILD_NM
2273  BUILD_AR    Override default value for BUILD_AR
2274  BUILD_OBJCOPY
2275              Override default value for BUILD_OBJCOPY
2276  BUILD_STRIP Override default value for BUILD_STRIP
2277  JTREGEXE    Override default value for JTREGEXE
2278  XMKMF       Path to xmkmf, Makefile generator for X Window System
2279  FREETYPE_CFLAGS
2280              C compiler flags for FREETYPE, overriding pkg-config
2281  FREETYPE_LIBS
2282              linker flags for FREETYPE, overriding pkg-config
2283  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2284  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2285  LIBFFI_CFLAGS
2286              C compiler flags for LIBFFI, overriding pkg-config
2287  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2288  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2289  PNG_LIBS    linker flags for PNG, overriding pkg-config
2290  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2291  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2292  ICECC_CMD   Override default value for ICECC_CMD
2293  ICECC_CREATE_ENV
2294              Override default value for ICECC_CREATE_ENV
2295  ICECC_WRAPPER
2296              Override default value for ICECC_WRAPPER
2297  CCACHE      Override default value for CCACHE
2298
2299Use these variables to override the choices made by `configure' or to help
2300it to find libraries and programs with nonstandard names/locations.
2301
2302Report bugs to <build-dev@openjdk.java.net>.
2303OpenJDK home page: <http://openjdk.java.net>.
2304_ACEOF
2305ac_status=$?
2306fi
2307
2308if test "$ac_init_help" = "recursive"; then
2309  # If there are subdirs, report their specific --help.
2310  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2311    test -d "$ac_dir" ||
2312      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2313      continue
2314    ac_builddir=.
2315
2316case "$ac_dir" in
2317.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2318*)
2319  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2320  # A ".." for each directory in $ac_dir_suffix.
2321  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2322  case $ac_top_builddir_sub in
2323  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2324  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2325  esac ;;
2326esac
2327ac_abs_top_builddir=$ac_pwd
2328ac_abs_builddir=$ac_pwd$ac_dir_suffix
2329# for backward compatibility:
2330ac_top_builddir=$ac_top_build_prefix
2331
2332case $srcdir in
2333  .)  # We are building in place.
2334    ac_srcdir=.
2335    ac_top_srcdir=$ac_top_builddir_sub
2336    ac_abs_top_srcdir=$ac_pwd ;;
2337  [\\/]* | ?:[\\/]* )  # Absolute name.
2338    ac_srcdir=$srcdir$ac_dir_suffix;
2339    ac_top_srcdir=$srcdir
2340    ac_abs_top_srcdir=$srcdir ;;
2341  *) # Relative name.
2342    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2343    ac_top_srcdir=$ac_top_build_prefix$srcdir
2344    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2345esac
2346ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2347
2348    cd "$ac_dir" || { ac_status=$?; continue; }
2349    # Check for guested configure.
2350    if test -f "$ac_srcdir/configure.gnu"; then
2351      echo &&
2352      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2353    elif test -f "$ac_srcdir/configure"; then
2354      echo &&
2355      $SHELL "$ac_srcdir/configure" --help=recursive
2356    else
2357      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2358    fi || ac_status=$?
2359    cd "$ac_pwd" || { ac_status=$?; break; }
2360  done
2361fi
2362
2363test -n "$ac_init_help" && exit $ac_status
2364if $ac_init_version; then
2365  cat <<\_ACEOF
2366OpenJDK configure jdk9
2367generated by GNU Autoconf 2.69
2368
2369Copyright (C) 2012 Free Software Foundation, Inc.
2370This configure script is free software; the Free Software Foundation
2371gives unlimited permission to copy, distribute and modify it.
2372_ACEOF
2373  exit
2374fi
2375
2376## ------------------------ ##
2377## Autoconf initialization. ##
2378## ------------------------ ##
2379
2380# ac_fn_c_try_compile LINENO
2381# --------------------------
2382# Try to compile conftest.$ac_ext, and return whether this succeeded.
2383ac_fn_c_try_compile ()
2384{
2385  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2386  rm -f conftest.$ac_objext
2387  if { { ac_try="$ac_compile"
2388case "(($ac_try" in
2389  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2390  *) ac_try_echo=$ac_try;;
2391esac
2392eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2393$as_echo "$ac_try_echo"; } >&5
2394  (eval "$ac_compile") 2>conftest.err
2395  ac_status=$?
2396  if test -s conftest.err; then
2397    grep -v '^ *+' conftest.err >conftest.er1
2398    cat conftest.er1 >&5
2399    mv -f conftest.er1 conftest.err
2400  fi
2401  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2402  test $ac_status = 0; } && {
2403	 test -z "$ac_c_werror_flag" ||
2404	 test ! -s conftest.err
2405       } && test -s conftest.$ac_objext; then :
2406  ac_retval=0
2407else
2408  $as_echo "$as_me: failed program was:" >&5
2409sed 's/^/| /' conftest.$ac_ext >&5
2410
2411	ac_retval=1
2412fi
2413  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2414  as_fn_set_status $ac_retval
2415
2416} # ac_fn_c_try_compile
2417
2418# ac_fn_cxx_try_compile LINENO
2419# ----------------------------
2420# Try to compile conftest.$ac_ext, and return whether this succeeded.
2421ac_fn_cxx_try_compile ()
2422{
2423  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424  rm -f conftest.$ac_objext
2425  if { { ac_try="$ac_compile"
2426case "(($ac_try" in
2427  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2428  *) ac_try_echo=$ac_try;;
2429esac
2430eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2431$as_echo "$ac_try_echo"; } >&5
2432  (eval "$ac_compile") 2>conftest.err
2433  ac_status=$?
2434  if test -s conftest.err; then
2435    grep -v '^ *+' conftest.err >conftest.er1
2436    cat conftest.er1 >&5
2437    mv -f conftest.er1 conftest.err
2438  fi
2439  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2440  test $ac_status = 0; } && {
2441	 test -z "$ac_cxx_werror_flag" ||
2442	 test ! -s conftest.err
2443       } && test -s conftest.$ac_objext; then :
2444  ac_retval=0
2445else
2446  $as_echo "$as_me: failed program was:" >&5
2447sed 's/^/| /' conftest.$ac_ext >&5
2448
2449	ac_retval=1
2450fi
2451  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2452  as_fn_set_status $ac_retval
2453
2454} # ac_fn_cxx_try_compile
2455
2456# ac_fn_c_try_cpp LINENO
2457# ----------------------
2458# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2459ac_fn_c_try_cpp ()
2460{
2461  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2462  if { { ac_try="$ac_cpp conftest.$ac_ext"
2463case "(($ac_try" in
2464  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2465  *) ac_try_echo=$ac_try;;
2466esac
2467eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2468$as_echo "$ac_try_echo"; } >&5
2469  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2470  ac_status=$?
2471  if test -s conftest.err; then
2472    grep -v '^ *+' conftest.err >conftest.er1
2473    cat conftest.er1 >&5
2474    mv -f conftest.er1 conftest.err
2475  fi
2476  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2477  test $ac_status = 0; } > conftest.i && {
2478	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2479	 test ! -s conftest.err
2480       }; then :
2481  ac_retval=0
2482else
2483  $as_echo "$as_me: failed program was:" >&5
2484sed 's/^/| /' conftest.$ac_ext >&5
2485
2486    ac_retval=1
2487fi
2488  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2489  as_fn_set_status $ac_retval
2490
2491} # ac_fn_c_try_cpp
2492
2493# ac_fn_cxx_try_cpp LINENO
2494# ------------------------
2495# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2496ac_fn_cxx_try_cpp ()
2497{
2498  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2499  if { { ac_try="$ac_cpp conftest.$ac_ext"
2500case "(($ac_try" in
2501  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2502  *) ac_try_echo=$ac_try;;
2503esac
2504eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2505$as_echo "$ac_try_echo"; } >&5
2506  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2507  ac_status=$?
2508  if test -s conftest.err; then
2509    grep -v '^ *+' conftest.err >conftest.er1
2510    cat conftest.er1 >&5
2511    mv -f conftest.er1 conftest.err
2512  fi
2513  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2514  test $ac_status = 0; } > conftest.i && {
2515	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2516	 test ! -s conftest.err
2517       }; then :
2518  ac_retval=0
2519else
2520  $as_echo "$as_me: failed program was:" >&5
2521sed 's/^/| /' conftest.$ac_ext >&5
2522
2523    ac_retval=1
2524fi
2525  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2526  as_fn_set_status $ac_retval
2527
2528} # ac_fn_cxx_try_cpp
2529
2530# ac_fn_c_try_link LINENO
2531# -----------------------
2532# Try to link conftest.$ac_ext, and return whether this succeeded.
2533ac_fn_c_try_link ()
2534{
2535  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2536  rm -f conftest.$ac_objext conftest$ac_exeext
2537  if { { ac_try="$ac_link"
2538case "(($ac_try" in
2539  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2540  *) ac_try_echo=$ac_try;;
2541esac
2542eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2543$as_echo "$ac_try_echo"; } >&5
2544  (eval "$ac_link") 2>conftest.err
2545  ac_status=$?
2546  if test -s conftest.err; then
2547    grep -v '^ *+' conftest.err >conftest.er1
2548    cat conftest.er1 >&5
2549    mv -f conftest.er1 conftest.err
2550  fi
2551  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2552  test $ac_status = 0; } && {
2553	 test -z "$ac_c_werror_flag" ||
2554	 test ! -s conftest.err
2555       } && test -s conftest$ac_exeext && {
2556	 test "$cross_compiling" = yes ||
2557	 test -x conftest$ac_exeext
2558       }; then :
2559  ac_retval=0
2560else
2561  $as_echo "$as_me: failed program was:" >&5
2562sed 's/^/| /' conftest.$ac_ext >&5
2563
2564	ac_retval=1
2565fi
2566  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2567  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2568  # interfere with the next link command; also delete a directory that is
2569  # left behind by Apple's compiler.  We do this before executing the actions.
2570  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2571  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2572  as_fn_set_status $ac_retval
2573
2574} # ac_fn_c_try_link
2575
2576# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2577# ---------------------------------------------------------
2578# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2579# the include files in INCLUDES and setting the cache variable VAR
2580# accordingly.
2581ac_fn_cxx_check_header_mongrel ()
2582{
2583  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2584  if eval \${$3+:} false; then :
2585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2586$as_echo_n "checking for $2... " >&6; }
2587if eval \${$3+:} false; then :
2588  $as_echo_n "(cached) " >&6
2589fi
2590eval ac_res=\$$3
2591	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2592$as_echo "$ac_res" >&6; }
2593else
2594  # Is the header compilable?
2595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2596$as_echo_n "checking $2 usability... " >&6; }
2597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2598/* end confdefs.h.  */
2599$4
2600#include <$2>
2601_ACEOF
2602if ac_fn_cxx_try_compile "$LINENO"; then :
2603  ac_header_compiler=yes
2604else
2605  ac_header_compiler=no
2606fi
2607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2609$as_echo "$ac_header_compiler" >&6; }
2610
2611# Is the header present?
2612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2613$as_echo_n "checking $2 presence... " >&6; }
2614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2615/* end confdefs.h.  */
2616#include <$2>
2617_ACEOF
2618if ac_fn_cxx_try_cpp "$LINENO"; then :
2619  ac_header_preproc=yes
2620else
2621  ac_header_preproc=no
2622fi
2623rm -f conftest.err conftest.i conftest.$ac_ext
2624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2625$as_echo "$ac_header_preproc" >&6; }
2626
2627# So?  What about this header?
2628case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2629  yes:no: )
2630    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2631$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2632    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2633$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2634    ;;
2635  no:yes:* )
2636    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2637$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2639$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2641$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2643$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2644    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2645$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2646( $as_echo "## ----------------------------------------- ##
2647## Report this to build-dev@openjdk.java.net ##
2648## ----------------------------------------- ##"
2649     ) | sed "s/^/$as_me: WARNING:     /" >&2
2650    ;;
2651esac
2652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2653$as_echo_n "checking for $2... " >&6; }
2654if eval \${$3+:} false; then :
2655  $as_echo_n "(cached) " >&6
2656else
2657  eval "$3=\$ac_header_compiler"
2658fi
2659eval ac_res=\$$3
2660	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2661$as_echo "$ac_res" >&6; }
2662fi
2663  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2664
2665} # ac_fn_cxx_check_header_mongrel
2666
2667# ac_fn_cxx_try_run LINENO
2668# ------------------------
2669# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2670# that executables *can* be run.
2671ac_fn_cxx_try_run ()
2672{
2673  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2674  if { { ac_try="$ac_link"
2675case "(($ac_try" in
2676  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2677  *) ac_try_echo=$ac_try;;
2678esac
2679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2680$as_echo "$ac_try_echo"; } >&5
2681  (eval "$ac_link") 2>&5
2682  ac_status=$?
2683  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2684  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2685  { { case "(($ac_try" in
2686  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2687  *) ac_try_echo=$ac_try;;
2688esac
2689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2690$as_echo "$ac_try_echo"; } >&5
2691  (eval "$ac_try") 2>&5
2692  ac_status=$?
2693  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2694  test $ac_status = 0; }; }; then :
2695  ac_retval=0
2696else
2697  $as_echo "$as_me: program exited with status $ac_status" >&5
2698       $as_echo "$as_me: failed program was:" >&5
2699sed 's/^/| /' conftest.$ac_ext >&5
2700
2701       ac_retval=$ac_status
2702fi
2703  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2704  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2705  as_fn_set_status $ac_retval
2706
2707} # ac_fn_cxx_try_run
2708
2709# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2710# ---------------------------------------------------------
2711# Tests whether HEADER exists and can be compiled using the include files in
2712# INCLUDES, setting the cache variable VAR accordingly.
2713ac_fn_cxx_check_header_compile ()
2714{
2715  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2716  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2717$as_echo_n "checking for $2... " >&6; }
2718if eval \${$3+:} false; then :
2719  $as_echo_n "(cached) " >&6
2720else
2721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2722/* end confdefs.h.  */
2723$4
2724#include <$2>
2725_ACEOF
2726if ac_fn_cxx_try_compile "$LINENO"; then :
2727  eval "$3=yes"
2728else
2729  eval "$3=no"
2730fi
2731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2732fi
2733eval ac_res=\$$3
2734	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2735$as_echo "$ac_res" >&6; }
2736  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2737
2738} # ac_fn_cxx_check_header_compile
2739
2740# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2741# ----------------------------------------------
2742# Tries to find the compile-time value of EXPR in a program that includes
2743# INCLUDES, setting VAR accordingly. Returns whether the value could be
2744# computed
2745ac_fn_cxx_compute_int ()
2746{
2747  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2748  if test "$cross_compiling" = yes; then
2749    # Depending upon the size, compute the lo and hi bounds.
2750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2751/* end confdefs.h.  */
2752$4
2753int
2754main ()
2755{
2756static int test_array [1 - 2 * !(($2) >= 0)];
2757test_array [0] = 0;
2758return test_array [0];
2759
2760  ;
2761  return 0;
2762}
2763_ACEOF
2764if ac_fn_cxx_try_compile "$LINENO"; then :
2765  ac_lo=0 ac_mid=0
2766  while :; do
2767    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2768/* end confdefs.h.  */
2769$4
2770int
2771main ()
2772{
2773static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2774test_array [0] = 0;
2775return test_array [0];
2776
2777  ;
2778  return 0;
2779}
2780_ACEOF
2781if ac_fn_cxx_try_compile "$LINENO"; then :
2782  ac_hi=$ac_mid; break
2783else
2784  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2785			if test $ac_lo -le $ac_mid; then
2786			  ac_lo= ac_hi=
2787			  break
2788			fi
2789			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2790fi
2791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2792  done
2793else
2794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2795/* end confdefs.h.  */
2796$4
2797int
2798main ()
2799{
2800static int test_array [1 - 2 * !(($2) < 0)];
2801test_array [0] = 0;
2802return test_array [0];
2803
2804  ;
2805  return 0;
2806}
2807_ACEOF
2808if ac_fn_cxx_try_compile "$LINENO"; then :
2809  ac_hi=-1 ac_mid=-1
2810  while :; do
2811    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2812/* end confdefs.h.  */
2813$4
2814int
2815main ()
2816{
2817static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2818test_array [0] = 0;
2819return test_array [0];
2820
2821  ;
2822  return 0;
2823}
2824_ACEOF
2825if ac_fn_cxx_try_compile "$LINENO"; then :
2826  ac_lo=$ac_mid; break
2827else
2828  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2829			if test $ac_mid -le $ac_hi; then
2830			  ac_lo= ac_hi=
2831			  break
2832			fi
2833			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2834fi
2835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2836  done
2837else
2838  ac_lo= ac_hi=
2839fi
2840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2841fi
2842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2843# Binary search between lo and hi bounds.
2844while test "x$ac_lo" != "x$ac_hi"; do
2845  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2847/* end confdefs.h.  */
2848$4
2849int
2850main ()
2851{
2852static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2853test_array [0] = 0;
2854return test_array [0];
2855
2856  ;
2857  return 0;
2858}
2859_ACEOF
2860if ac_fn_cxx_try_compile "$LINENO"; then :
2861  ac_hi=$ac_mid
2862else
2863  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2864fi
2865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2866done
2867case $ac_lo in #((
2868?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2869'') ac_retval=1 ;;
2870esac
2871  else
2872    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2873/* end confdefs.h.  */
2874$4
2875static long int longval () { return $2; }
2876static unsigned long int ulongval () { return $2; }
2877#include <stdio.h>
2878#include <stdlib.h>
2879int
2880main ()
2881{
2882
2883  FILE *f = fopen ("conftest.val", "w");
2884  if (! f)
2885    return 1;
2886  if (($2) < 0)
2887    {
2888      long int i = longval ();
2889      if (i != ($2))
2890	return 1;
2891      fprintf (f, "%ld", i);
2892    }
2893  else
2894    {
2895      unsigned long int i = ulongval ();
2896      if (i != ($2))
2897	return 1;
2898      fprintf (f, "%lu", i);
2899    }
2900  /* Do not output a trailing newline, as this causes \r\n confusion
2901     on some platforms.  */
2902  return ferror (f) || fclose (f) != 0;
2903
2904  ;
2905  return 0;
2906}
2907_ACEOF
2908if ac_fn_cxx_try_run "$LINENO"; then :
2909  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2910else
2911  ac_retval=1
2912fi
2913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2914  conftest.$ac_objext conftest.beam conftest.$ac_ext
2915rm -f conftest.val
2916
2917  fi
2918  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2919  as_fn_set_status $ac_retval
2920
2921} # ac_fn_cxx_compute_int
2922
2923# ac_fn_cxx_try_link LINENO
2924# -------------------------
2925# Try to link conftest.$ac_ext, and return whether this succeeded.
2926ac_fn_cxx_try_link ()
2927{
2928  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2929  rm -f conftest.$ac_objext conftest$ac_exeext
2930  if { { ac_try="$ac_link"
2931case "(($ac_try" in
2932  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2933  *) ac_try_echo=$ac_try;;
2934esac
2935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2936$as_echo "$ac_try_echo"; } >&5
2937  (eval "$ac_link") 2>conftest.err
2938  ac_status=$?
2939  if test -s conftest.err; then
2940    grep -v '^ *+' conftest.err >conftest.er1
2941    cat conftest.er1 >&5
2942    mv -f conftest.er1 conftest.err
2943  fi
2944  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2945  test $ac_status = 0; } && {
2946	 test -z "$ac_cxx_werror_flag" ||
2947	 test ! -s conftest.err
2948       } && test -s conftest$ac_exeext && {
2949	 test "$cross_compiling" = yes ||
2950	 test -x conftest$ac_exeext
2951       }; then :
2952  ac_retval=0
2953else
2954  $as_echo "$as_me: failed program was:" >&5
2955sed 's/^/| /' conftest.$ac_ext >&5
2956
2957	ac_retval=1
2958fi
2959  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2960  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2961  # interfere with the next link command; also delete a directory that is
2962  # left behind by Apple's compiler.  We do this before executing the actions.
2963  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2964  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2965  as_fn_set_status $ac_retval
2966
2967} # ac_fn_cxx_try_link
2968
2969# ac_fn_cxx_check_func LINENO FUNC VAR
2970# ------------------------------------
2971# Tests whether FUNC exists, setting the cache variable VAR accordingly
2972ac_fn_cxx_check_func ()
2973{
2974  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2975  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2976$as_echo_n "checking for $2... " >&6; }
2977if eval \${$3+:} false; then :
2978  $as_echo_n "(cached) " >&6
2979else
2980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2981/* end confdefs.h.  */
2982/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2983   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2984#define $2 innocuous_$2
2985
2986/* System header to define __stub macros and hopefully few prototypes,
2987    which can conflict with char $2 (); below.
2988    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2989    <limits.h> exists even on freestanding compilers.  */
2990
2991#ifdef __STDC__
2992# include <limits.h>
2993#else
2994# include <assert.h>
2995#endif
2996
2997#undef $2
2998
2999/* Override any GCC internal prototype to avoid an error.
3000   Use char because int might match the return type of a GCC
3001   builtin and then its argument prototype would still apply.  */
3002#ifdef __cplusplus
3003extern "C"
3004#endif
3005char $2 ();
3006/* The GNU C library defines this for functions which it implements
3007    to always fail with ENOSYS.  Some functions are actually named
3008    something starting with __ and the normal name is an alias.  */
3009#if defined __stub_$2 || defined __stub___$2
3010choke me
3011#endif
3012
3013int
3014main ()
3015{
3016return $2 ();
3017  ;
3018  return 0;
3019}
3020_ACEOF
3021if ac_fn_cxx_try_link "$LINENO"; then :
3022  eval "$3=yes"
3023else
3024  eval "$3=no"
3025fi
3026rm -f core conftest.err conftest.$ac_objext \
3027    conftest$ac_exeext conftest.$ac_ext
3028fi
3029eval ac_res=\$$3
3030	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3031$as_echo "$ac_res" >&6; }
3032  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3033
3034} # ac_fn_cxx_check_func
3035
3036# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3037# -------------------------------------------------------
3038# Tests whether HEADER exists and can be compiled using the include files in
3039# INCLUDES, setting the cache variable VAR accordingly.
3040ac_fn_c_check_header_compile ()
3041{
3042  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3044$as_echo_n "checking for $2... " >&6; }
3045if eval \${$3+:} false; then :
3046  $as_echo_n "(cached) " >&6
3047else
3048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3049/* end confdefs.h.  */
3050$4
3051#include <$2>
3052_ACEOF
3053if ac_fn_c_try_compile "$LINENO"; then :
3054  eval "$3=yes"
3055else
3056  eval "$3=no"
3057fi
3058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3059fi
3060eval ac_res=\$$3
3061	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3062$as_echo "$ac_res" >&6; }
3063  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3064
3065} # ac_fn_c_check_header_compile
3066cat >config.log <<_ACEOF
3067This file contains any messages produced by compilers while
3068running configure, to aid debugging if configure makes a mistake.
3069
3070It was created by OpenJDK $as_me jdk9, which was
3071generated by GNU Autoconf 2.69.  Invocation command line was
3072
3073  $ $0 $@
3074
3075_ACEOF
3076exec 5>>config.log
3077{
3078cat <<_ASUNAME
3079## --------- ##
3080## Platform. ##
3081## --------- ##
3082
3083hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3084uname -m = `(uname -m) 2>/dev/null || echo unknown`
3085uname -r = `(uname -r) 2>/dev/null || echo unknown`
3086uname -s = `(uname -s) 2>/dev/null || echo unknown`
3087uname -v = `(uname -v) 2>/dev/null || echo unknown`
3088
3089/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3090/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3091
3092/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3093/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3094/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3095/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3096/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3097/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3098/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3099
3100_ASUNAME
3101
3102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3103for as_dir in $PATH
3104do
3105  IFS=$as_save_IFS
3106  test -z "$as_dir" && as_dir=.
3107    $as_echo "PATH: $as_dir"
3108  done
3109IFS=$as_save_IFS
3110
3111} >&5
3112
3113cat >&5 <<_ACEOF
3114
3115
3116## ----------- ##
3117## Core tests. ##
3118## ----------- ##
3119
3120_ACEOF
3121
3122
3123# Keep a trace of the command line.
3124# Strip out --no-create and --no-recursion so they do not pile up.
3125# Strip out --silent because we don't want to record it for future runs.
3126# Also quote any args containing shell meta-characters.
3127# Make two passes to allow for proper duplicate-argument suppression.
3128ac_configure_args=
3129ac_configure_args0=
3130ac_configure_args1=
3131ac_must_keep_next=false
3132for ac_pass in 1 2
3133do
3134  for ac_arg
3135  do
3136    case $ac_arg in
3137    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3138    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3139    | -silent | --silent | --silen | --sile | --sil)
3140      continue ;;
3141    *\'*)
3142      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3143    esac
3144    case $ac_pass in
3145    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3146    2)
3147      as_fn_append ac_configure_args1 " '$ac_arg'"
3148      if test $ac_must_keep_next = true; then
3149	ac_must_keep_next=false # Got value, back to normal.
3150      else
3151	case $ac_arg in
3152	  *=* | --config-cache | -C | -disable-* | --disable-* \
3153	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3154	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3155	  | -with-* | --with-* | -without-* | --without-* | --x)
3156	    case "$ac_configure_args0 " in
3157	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3158	    esac
3159	    ;;
3160	  -* ) ac_must_keep_next=true ;;
3161	esac
3162      fi
3163      as_fn_append ac_configure_args " '$ac_arg'"
3164      ;;
3165    esac
3166  done
3167done
3168{ ac_configure_args0=; unset ac_configure_args0;}
3169{ ac_configure_args1=; unset ac_configure_args1;}
3170
3171# When interrupted or exit'd, cleanup temporary files, and complete
3172# config.log.  We remove comments because anyway the quotes in there
3173# would cause problems or look ugly.
3174# WARNING: Use '\'' to represent an apostrophe within the trap.
3175# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3176trap 'exit_status=$?
3177  # Save into config.log some information that might help in debugging.
3178  {
3179    echo
3180
3181    $as_echo "## ---------------- ##
3182## Cache variables. ##
3183## ---------------- ##"
3184    echo
3185    # The following way of writing the cache mishandles newlines in values,
3186(
3187  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3188    eval ac_val=\$$ac_var
3189    case $ac_val in #(
3190    *${as_nl}*)
3191      case $ac_var in #(
3192      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3193$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3194      esac
3195      case $ac_var in #(
3196      _ | IFS | as_nl) ;; #(
3197      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3198      *) { eval $ac_var=; unset $ac_var;} ;;
3199      esac ;;
3200    esac
3201  done
3202  (set) 2>&1 |
3203    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3204    *${as_nl}ac_space=\ *)
3205      sed -n \
3206	"s/'\''/'\''\\\\'\'''\''/g;
3207	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3208      ;; #(
3209    *)
3210      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3211      ;;
3212    esac |
3213    sort
3214)
3215    echo
3216
3217    $as_echo "## ----------------- ##
3218## Output variables. ##
3219## ----------------- ##"
3220    echo
3221    for ac_var in $ac_subst_vars
3222    do
3223      eval ac_val=\$$ac_var
3224      case $ac_val in
3225      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3226      esac
3227      $as_echo "$ac_var='\''$ac_val'\''"
3228    done | sort
3229    echo
3230
3231    if test -n "$ac_subst_files"; then
3232      $as_echo "## ------------------- ##
3233## File substitutions. ##
3234## ------------------- ##"
3235      echo
3236      for ac_var in $ac_subst_files
3237      do
3238	eval ac_val=\$$ac_var
3239	case $ac_val in
3240	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3241	esac
3242	$as_echo "$ac_var='\''$ac_val'\''"
3243      done | sort
3244      echo
3245    fi
3246
3247    if test -s confdefs.h; then
3248      $as_echo "## ----------- ##
3249## confdefs.h. ##
3250## ----------- ##"
3251      echo
3252      cat confdefs.h
3253      echo
3254    fi
3255    test "$ac_signal" != 0 &&
3256      $as_echo "$as_me: caught signal $ac_signal"
3257    $as_echo "$as_me: exit $exit_status"
3258  } >&5
3259  rm -f core *.core core.conftest.* &&
3260    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3261    exit $exit_status
3262' 0
3263for ac_signal in 1 2 13 15; do
3264  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3265done
3266ac_signal=0
3267
3268# confdefs.h avoids OS command line length limits that DEFS can exceed.
3269rm -f -r conftest* confdefs.h
3270
3271$as_echo "/* confdefs.h */" > confdefs.h
3272
3273# Predefined preprocessor variables.
3274
3275cat >>confdefs.h <<_ACEOF
3276#define PACKAGE_NAME "$PACKAGE_NAME"
3277_ACEOF
3278
3279cat >>confdefs.h <<_ACEOF
3280#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3281_ACEOF
3282
3283cat >>confdefs.h <<_ACEOF
3284#define PACKAGE_VERSION "$PACKAGE_VERSION"
3285_ACEOF
3286
3287cat >>confdefs.h <<_ACEOF
3288#define PACKAGE_STRING "$PACKAGE_STRING"
3289_ACEOF
3290
3291cat >>confdefs.h <<_ACEOF
3292#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3293_ACEOF
3294
3295cat >>confdefs.h <<_ACEOF
3296#define PACKAGE_URL "$PACKAGE_URL"
3297_ACEOF
3298
3299
3300# Let the site file select an alternate cache file if it wants to.
3301# Prefer an explicitly selected file to automatically selected ones.
3302ac_site_file1=NONE
3303ac_site_file2=NONE
3304if test -n "$CONFIG_SITE"; then
3305  # We do not want a PATH search for config.site.
3306  case $CONFIG_SITE in #((
3307    -*)  ac_site_file1=./$CONFIG_SITE;;
3308    */*) ac_site_file1=$CONFIG_SITE;;
3309    *)   ac_site_file1=./$CONFIG_SITE;;
3310  esac
3311elif test "x$prefix" != xNONE; then
3312  ac_site_file1=$prefix/share/config.site
3313  ac_site_file2=$prefix/etc/config.site
3314else
3315  ac_site_file1=$ac_default_prefix/share/config.site
3316  ac_site_file2=$ac_default_prefix/etc/config.site
3317fi
3318for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3319do
3320  test "x$ac_site_file" = xNONE && continue
3321  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3322    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3323$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3324    sed 's/^/| /' "$ac_site_file" >&5
3325    . "$ac_site_file" \
3326      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3328as_fn_error $? "failed to load site script $ac_site_file
3329See \`config.log' for more details" "$LINENO" 5; }
3330  fi
3331done
3332
3333if test -r "$cache_file"; then
3334  # Some versions of bash will fail to source /dev/null (special files
3335  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3336  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3337    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3338$as_echo "$as_me: loading cache $cache_file" >&6;}
3339    case $cache_file in
3340      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3341      *)                      . "./$cache_file";;
3342    esac
3343  fi
3344else
3345  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3346$as_echo "$as_me: creating cache $cache_file" >&6;}
3347  >$cache_file
3348fi
3349
3350# Check that the precious variables saved in the cache have kept the same
3351# value.
3352ac_cache_corrupted=false
3353for ac_var in $ac_precious_vars; do
3354  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3355  eval ac_new_set=\$ac_env_${ac_var}_set
3356  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3357  eval ac_new_val=\$ac_env_${ac_var}_value
3358  case $ac_old_set,$ac_new_set in
3359    set,)
3360      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3361$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3362      ac_cache_corrupted=: ;;
3363    ,set)
3364      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3365$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3366      ac_cache_corrupted=: ;;
3367    ,);;
3368    *)
3369      if test "x$ac_old_val" != "x$ac_new_val"; then
3370	# differences in whitespace do not lead to failure.
3371	ac_old_val_w=`echo x $ac_old_val`
3372	ac_new_val_w=`echo x $ac_new_val`
3373	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3374	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3375$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3376	  ac_cache_corrupted=:
3377	else
3378	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3379$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3380	  eval $ac_var=\$ac_old_val
3381	fi
3382	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3383$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3384	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3385$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3386      fi;;
3387  esac
3388  # Pass precious variables to config.status.
3389  if test "$ac_new_set" = set; then
3390    case $ac_new_val in
3391    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3392    *) ac_arg=$ac_var=$ac_new_val ;;
3393    esac
3394    case " $ac_configure_args " in
3395      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3396      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3397    esac
3398  fi
3399done
3400if $ac_cache_corrupted; then
3401  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3402$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3403  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3404$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3405  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3406fi
3407## -------------------- ##
3408## Main body of script. ##
3409## -------------------- ##
3410
3411ac_ext=c
3412ac_cpp='$CPP $CPPFLAGS'
3413ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3414ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3415ac_compiler_gnu=$ac_cv_c_compiler_gnu
3416
3417
3418
3419ac_aux_dir=
3420for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3421  if test -f "$ac_dir/install-sh"; then
3422    ac_aux_dir=$ac_dir
3423    ac_install_sh="$ac_aux_dir/install-sh -c"
3424    break
3425  elif test -f "$ac_dir/install.sh"; then
3426    ac_aux_dir=$ac_dir
3427    ac_install_sh="$ac_aux_dir/install.sh -c"
3428    break
3429  elif test -f "$ac_dir/shtool"; then
3430    ac_aux_dir=$ac_dir
3431    ac_install_sh="$ac_aux_dir/shtool install -c"
3432    break
3433  fi
3434done
3435if test -z "$ac_aux_dir"; then
3436  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
3437fi
3438
3439# These three variables are undocumented and unsupported,
3440# and are intended to be withdrawn in a future Autoconf release.
3441# They can cause serious problems if a builder's source tree is in a directory
3442# whose full name contains unusual characters.
3443ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3444ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3445ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3446
3447
3448# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3449
3450#
3451# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3452# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3453#
3454# This code is free software; you can redistribute it and/or modify it
3455# under the terms of the GNU General Public License version 2 only, as
3456# published by the Free Software Foundation.  Oracle designates this
3457# particular file as subject to the "Classpath" exception as provided
3458# by Oracle in the LICENSE file that accompanied this code.
3459#
3460# This code is distributed in the hope that it will be useful, but WITHOUT
3461# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3462# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3463# version 2 for more details (a copy is included in the LICENSE file that
3464# accompanied this code).
3465#
3466# You should have received a copy of the GNU General Public License version
3467# 2 along with this work; if not, write to the Free Software Foundation,
3468# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3469#
3470# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3471# or visit www.oracle.com if you need additional information or have any
3472# questions.
3473#
3474
3475#
3476# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3477#
3478# This program is free software; you can redistribute it and/or modify
3479# it under the terms of the GNU General Public License as published by
3480# the Free Software Foundation; either version 2 of the License, or
3481# (at your option) any later version.
3482#
3483# This program is distributed in the hope that it will be useful, but
3484# WITHOUT ANY WARRANTY; without even the implied warranty of
3485# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3486# General Public License for more details.
3487#
3488# You should have received a copy of the GNU General Public License
3489# along with this program; if not, write to the Free Software
3490# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3491#
3492# As a special exception to the GNU General Public License, if you
3493# distribute this file as part of a program that contains a
3494# configuration script generated by Autoconf, you may include it under
3495# the same distribution terms that you use for the rest of that program.
3496
3497# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3498# ----------------------------------
3499# PKG_PROG_PKG_CONFIG
3500
3501# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3502#
3503# Check to see whether a particular set of modules exists.  Similar
3504# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3505#
3506#
3507# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3508# this or PKG_CHECK_MODULES is called, or make sure to call
3509# PKG_CHECK_EXISTS manually
3510# --------------------------------------------------------------
3511
3512
3513
3514# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3515# ---------------------------------------------
3516# _PKG_CONFIG
3517
3518# _PKG_SHORT_ERRORS_SUPPORTED
3519# -----------------------------
3520# _PKG_SHORT_ERRORS_SUPPORTED
3521
3522
3523# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3524# [ACTION-IF-NOT-FOUND])
3525#
3526#
3527# Note that if there is a possibility the first call to
3528# PKG_CHECK_MODULES might not happen, you should be sure to include an
3529# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3530#
3531#
3532# --------------------------------------------------------------
3533# PKG_CHECK_MODULES
3534
3535
3536# Include these first...
3537#
3538# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3539# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3540#
3541# This code is free software; you can redistribute it and/or modify it
3542# under the terms of the GNU General Public License version 2 only, as
3543# published by the Free Software Foundation.  Oracle designates this
3544# particular file as subject to the "Classpath" exception as provided
3545# by Oracle in the LICENSE file that accompanied this code.
3546#
3547# This code is distributed in the hope that it will be useful, but WITHOUT
3548# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3549# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3550# version 2 for more details (a copy is included in the LICENSE file that
3551# accompanied this code).
3552#
3553# You should have received a copy of the GNU General Public License version
3554# 2 along with this work; if not, write to the Free Software Foundation,
3555# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3556#
3557# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3558# or visit www.oracle.com if you need additional information or have any
3559# questions.
3560#
3561
3562# Create a function/macro that takes a series of named arguments. The call is
3563# similar to AC_DEFUN, but the setup of the function looks like this:
3564# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3565# ... do something
3566#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3567# ])
3568# A star (*) in front of a named argument means that it is required and it's
3569# presence will be verified. To pass e.g. the first value as a normal indexed
3570# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3571# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3572# "ARG_FOO".
3573#
3574# The generated function can be called like this:
3575# MYFUNC(FOO: [foo-val],
3576#     BAR: [
3577#         $ECHO hello world
3578#     ])
3579# Note that the argument value must start on the same line as the argument name.
3580#
3581# Argument 1: Name of the function to define
3582# Argument 2: List of legal named arguments, with a * prefix for required arguments
3583# Argument 3: Argument array to treat as named, typically $@
3584# Argument 4: The main function body
3585
3586
3587# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3588# If so, then append $1 to $2 \
3589# Also set JVM_ARG_OK to true/false depending on outcome.
3590
3591
3592# Appends a string to a path variable, only adding the : when needed.
3593
3594
3595# Prepends a string to a path variable, only adding the : when needed.
3596
3597
3598# This will make sure the given variable points to a full and proper
3599# path. This means:
3600# 1) There will be no spaces in the path. On unix platforms,
3601#    spaces in the path will result in an error. On Windows,
3602#    the path will be rewritten using short-style to be space-free.
3603# 2) The path will be absolute, and it will be in unix-style (on
3604#     cygwin).
3605# $1: The name of the variable to fix
3606
3607
3608# This will make sure the given variable points to a executable
3609# with a full and proper path. This means:
3610# 1) There will be no spaces in the path. On unix platforms,
3611#    spaces in the path will result in an error. On Windows,
3612#    the path will be rewritten using short-style to be space-free.
3613# 2) The path will be absolute, and it will be in unix-style (on
3614#     cygwin).
3615# Any arguments given to the executable is preserved.
3616# If the input variable does not have a directory specification, then
3617# it need to be in the PATH.
3618# $1: The name of the variable to fix
3619
3620
3621
3622
3623# Register a --with argument but mark it as deprecated
3624# $1: The name of the with argument to deprecate, not including --with-
3625
3626
3627# Register a --enable argument but mark it as deprecated
3628# $1: The name of the with argument to deprecate, not including --enable-
3629# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3630# $3: Messages to user.
3631
3632
3633
3634
3635# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3636# $1: variable to check
3637
3638
3639# Check that there are no unprocessed overridden variables left.
3640# If so, they are an incorrect argument and we will exit with an error.
3641
3642
3643# Setup a tool for the given variable. If correctly specified by the user,
3644# use that value, otherwise search for the tool using the supplied code snippet.
3645# $1: variable to set
3646# $2: code snippet to call to look for the tool
3647# $3: code snippet to call if variable was used to find tool
3648
3649
3650# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3651# $1: variable to set
3652# $2: executable name (or list of names) to look for
3653# $3: [path]
3654
3655
3656# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3657# $1: variable to set
3658# $2: executable name (or list of names) to look for
3659
3660
3661# Like BASIC_PATH_PROGS but fails if no tool was found.
3662# $1: variable to set
3663# $2: executable name (or list of names) to look for
3664# $3: [path]
3665
3666
3667# Like BASIC_SETUP_TOOL but fails if no tool was found.
3668# $1: variable to set
3669# $2: autoconf macro to call to look for the special tool
3670
3671
3672# Setup the most fundamental tools that relies on not much else to set up,
3673# but is used by much of the early bootstrap code.
3674
3675
3676# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3677
3678
3679# Evaluates platform specific overrides for devkit variables.
3680# $1: Name of variable
3681
3682
3683
3684
3685
3686
3687#%%% Simple tools %%%
3688
3689# Check if we have found a usable version of make
3690# $1: the path to a potential make binary (or empty)
3691# $2: the description on how we found this
3692
3693
3694
3695
3696# Goes looking for a usable version of GNU make.
3697
3698
3699
3700
3701
3702
3703
3704
3705# Check if build directory is on local disk. If not possible to determine,
3706# we prefer to claim it's local.
3707# Argument 1: directory to test
3708# Argument 2: what to do if it is on local disk
3709# Argument 3: what to do otherwise (remote disk or failure)
3710
3711
3712# Check that source files have basic read permissions set. This might
3713# not be the case in cygwin in certain conditions.
3714
3715
3716
3717
3718# Check for support for specific options in bash
3719
3720
3721################################################################################
3722#
3723# Default make target
3724#
3725
3726
3727# Code to run after AC_OUTPUT
3728
3729
3730#
3731# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3732# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3733#
3734# This code is free software; you can redistribute it and/or modify it
3735# under the terms of the GNU General Public License version 2 only, as
3736# published by the Free Software Foundation.  Oracle designates this
3737# particular file as subject to the "Classpath" exception as provided
3738# by Oracle in the LICENSE file that accompanied this code.
3739#
3740# This code is distributed in the hope that it will be useful, but WITHOUT
3741# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3742# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3743# version 2 for more details (a copy is included in the LICENSE file that
3744# accompanied this code).
3745#
3746# You should have received a copy of the GNU General Public License version
3747# 2 along with this work; if not, write to the Free Software Foundation,
3748# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3749#
3750# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3751# or visit www.oracle.com if you need additional information or have any
3752# questions.
3753#
3754
3755
3756
3757
3758
3759# Helper function which possibly converts a path using DOS-style short mode.
3760# If so, the updated path is stored in $new_path.
3761# $1: The path to check
3762
3763
3764# Helper function which possibly converts a path using DOS-style short mode.
3765# If so, the updated path is stored in $new_path.
3766# $1: The path to check
3767
3768
3769# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3770# and could probably be heavily simplified. However, all changes in this
3771# area tend to need lot of testing in different scenarios, and in lack of
3772# proper unit testing, cleaning this up has not been deemed worth the effort
3773# at the moment.
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3784
3785
3786
3787
3788# ... then the rest
3789#
3790# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3791# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3792#
3793# This code is free software; you can redistribute it and/or modify it
3794# under the terms of the GNU General Public License version 2 only, as
3795# published by the Free Software Foundation.  Oracle designates this
3796# particular file as subject to the "Classpath" exception as provided
3797# by Oracle in the LICENSE file that accompanied this code.
3798#
3799# This code is distributed in the hope that it will be useful, but WITHOUT
3800# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3801# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3802# version 2 for more details (a copy is included in the LICENSE file that
3803# accompanied this code).
3804#
3805# You should have received a copy of the GNU General Public License version
3806# 2 along with this work; if not, write to the Free Software Foundation,
3807# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3808#
3809# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3810# or visit www.oracle.com if you need additional information or have any
3811# questions.
3812#
3813
3814########################################################################
3815# This file handles detection of the Boot JDK. The Boot JDK detection
3816# process has been developed as a response to solve a complex real-world
3817# problem. Initially, it was simple, but it has grown as platform after
3818# platform, idiosyncracy after idiosyncracy has been supported.
3819#
3820# The basic idea is this:
3821# 1) You need an acceptable *) JDK to use as a Boot JDK
3822# 2) There are several ways to locate a JDK, that are mostly platform
3823#    dependent **)
3824# 3) You can have multiple JDKs installed
3825# 4) If possible, configure should try to dig out an acceptable JDK
3826#    automatically, without having to resort to command-line options
3827#
3828# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3829#     javac) and not a JRE, etc.
3830#
3831# **) On Windows we typically use a well-known path.
3832#     On MacOSX we typically use the tool java_home.
3833#     On Linux we typically find javac in the $PATH, and then follow a
3834#     chain of symlinks that often ends up in a real JDK.
3835#
3836# This leads to the code where we check in different ways to locate a
3837# JDK, and if one is found, check if it is acceptable. If not, we print
3838# our reasons for rejecting it (useful when debugging non-working
3839# configure situations) and continue checking the next one.
3840########################################################################
3841
3842# Execute the check given as argument, and verify the result
3843# If the Boot JDK was previously found, do nothing
3844# $1 A command line (typically autoconf macro) to execute
3845
3846
3847# Test: Is bootjdk explicitly set by command line arguments?
3848
3849
3850# Test: Is $JAVA_HOME set?
3851
3852
3853# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3854
3855
3856# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3857# $1: Argument to the java_home binary (optional)
3858
3859
3860# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3861
3862
3863# Look for a jdk in the given path. If there are multiple, try to select the newest.
3864# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3865# $1 = Path to directory containing jdk installations.
3866# $2 = String to append to the found JDK directory to get the proper JDK home
3867
3868
3869# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3870# environmental variable as base for where to look.
3871# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3872
3873
3874# Test: Is there a JDK installed in default, well-known locations?
3875
3876
3877# Check that a command-line tool in the Boot JDK is correct
3878# $1 = name of variable to assign
3879# $2 = name of binary
3880
3881
3882###############################################################################
3883#
3884# We need a Boot JDK to bootstrap the build.
3885#
3886
3887
3888
3889
3890
3891# BUILD_JDK: the location of the latest JDK that can run
3892#   on the host system and supports the target class file version
3893#   generated in this JDK build.  This variable should only be
3894#   used after the launchers are built.
3895#
3896
3897# Execute the check given as argument, and verify the result.
3898# If the JDK was previously found, do nothing.
3899# $1 A command line (typically autoconf macro) to execute
3900
3901
3902# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3903# is different than the host system doing the build (e.g. cross-compilation),
3904# a special BUILD_JDK is built as part of the build process.  An external
3905# prebuilt BUILD_JDK can also be supplied.
3906
3907
3908#
3909# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3910# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3911#
3912# This code is free software; you can redistribute it and/or modify it
3913# under the terms of the GNU General Public License version 2 only, as
3914# published by the Free Software Foundation.  Oracle designates this
3915# particular file as subject to the "Classpath" exception as provided
3916# by Oracle in the LICENSE file that accompanied this code.
3917#
3918# This code is distributed in the hope that it will be useful, but WITHOUT
3919# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3920# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3921# version 2 for more details (a copy is included in the LICENSE file that
3922# accompanied this code).
3923#
3924# You should have received a copy of the GNU General Public License version
3925# 2 along with this work; if not, write to the Free Software Foundation,
3926# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3927#
3928# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3929# or visit www.oracle.com if you need additional information or have any
3930# questions.
3931#
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949################################################################################
3950#
3951# Runs icecc-create-env once and prints the error if it fails
3952#
3953# $1: arguments to icecc-create-env
3954# $2: log file
3955#
3956
3957
3958################################################################################
3959#
3960# Optionally enable distributed compilation of native code using icecc/icecream
3961#
3962
3963
3964
3965
3966
3967
3968
3969#
3970# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3971# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3972#
3973# This code is free software; you can redistribute it and/or modify it
3974# under the terms of the GNU General Public License version 2 only, as
3975# published by the Free Software Foundation.  Oracle designates this
3976# particular file as subject to the "Classpath" exception as provided
3977# by Oracle in the LICENSE file that accompanied this code.
3978#
3979# This code is distributed in the hope that it will be useful, but WITHOUT
3980# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3981# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3982# version 2 for more details (a copy is included in the LICENSE file that
3983# accompanied this code).
3984#
3985# You should have received a copy of the GNU General Public License version
3986# 2 along with this work; if not, write to the Free Software Foundation,
3987# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3988#
3989# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3990# or visit www.oracle.com if you need additional information or have any
3991# questions.
3992#
3993
3994# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3995# corresponding configure arguments instead
3996
3997
3998# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3999# that configure can use them while detecting compilers.
4000# TOOLCHAIN_TYPE is available here.
4001# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4002
4003
4004
4005
4006
4007
4008# Documentation on common flags used for solstudio in HIGHEST.
4009#
4010# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4011#          done with care, there are some assumptions below that need to
4012#          be understood about the use of pointers, and IEEE behavior.
4013#
4014# -fns: Use non-standard floating point mode (not IEEE 754)
4015# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4016# -fsingle: Use single precision floating point with 'float'
4017# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4018#   (Source with excessing pointer casting and data access with mixed
4019#    pointer types are not recommended)
4020# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4021#   (If you expect perfect errno behavior, do not use this)
4022# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4023# -xrestrict: Pointer parameters to functions do not overlap
4024#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4025#    If you pass in multiple pointers to the same data, do not use this)
4026# -xlibmil: Inline some library routines
4027#   (If you expect perfect errno behavior, do not use this)
4028# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4029#   (If you expect perfect errno behavior, do not use this)
4030#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4031
4032    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4033    # Bug?
4034    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4035    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4036    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4037    #fi
4038
4039
4040
4041
4042
4043
4044################################################################################
4045# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4046#      conditionals against.
4047# $2 - Optional prefix for each variable defined.
4048
4049
4050# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4051#                                  IF_FALSE: [RUN-IF-FALSE])
4052# ------------------------------------------------------------
4053# Check that the C compiler supports an argument
4054
4055
4056
4057
4058# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4059#                                    IF_FALSE: [RUN-IF-FALSE])
4060# ------------------------------------------------------------
4061# Check that the C++ compiler supports an argument
4062
4063
4064
4065
4066# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4067#                                IF_FALSE: [RUN-IF-FALSE])
4068# ------------------------------------------------------------
4069# Check that the C and C++ compilers support an argument
4070
4071
4072
4073
4074# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4075#                                   IF_FALSE: [RUN-IF-FALSE])
4076# ------------------------------------------------------------
4077# Check that the linker support an argument
4078
4079
4080
4081
4082
4083
4084# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4085# Arguments:
4086# $1 - Optional prefix for each variable defined.
4087
4088
4089#
4090# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4091# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4092#
4093# This code is free software; you can redistribute it and/or modify it
4094# under the terms of the GNU General Public License version 2 only, as
4095# published by the Free Software Foundation.  Oracle designates this
4096# particular file as subject to the "Classpath" exception as provided
4097# by Oracle in the LICENSE file that accompanied this code.
4098#
4099# This code is distributed in the hope that it will be useful, but WITHOUT
4100# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4101# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4102# version 2 for more details (a copy is included in the LICENSE file that
4103# accompanied this code).
4104#
4105# You should have received a copy of the GNU General Public License version
4106# 2 along with this work; if not, write to the Free Software Foundation,
4107# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4108#
4109# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4110# or visit www.oracle.com if you need additional information or have any
4111# questions.
4112#
4113
4114
4115
4116
4117
4118cygwin_help() {
4119  case $1 in
4120    unzip)
4121      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4122      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4123      ;;
4124    zip)
4125      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4126      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4127      ;;
4128    make)
4129      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4130      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4131      ;;
4132    freetype)
4133      HELP_MSG="
4134The freetype library can now be build during the configure process.
4135Download the freetype sources and unpack them into an arbitrary directory:
4136
4137wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4138tar -xzf freetype-2.5.3.tar.gz
4139
4140Then run configure with '--with-freetype-src=<freetype_src>'. This will
4141automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4142builds or into '<freetype_src>/lib32' for 32-bit builds.
4143Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4144and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4145
4146Alternatively you can unpack the sources like this to use the default directory:
4147
4148tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4149      ;;
4150  esac
4151}
4152
4153msys_help() {
4154  PKGHANDLER_COMMAND=""
4155}
4156
4157apt_help() {
4158  case $1 in
4159    reduced)
4160      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4161    devkit)
4162      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4163    openjdk)
4164      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4165    alsa)
4166      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4167    cups)
4168      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4169    freetype)
4170      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4171    ffi)
4172      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4173    x11)
4174      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4175    ccache)
4176      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4177    dtrace)
4178      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4179  esac
4180}
4181
4182yum_help() {
4183  case $1 in
4184    devkit)
4185      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4186    openjdk)
4187      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4188    alsa)
4189      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4190    cups)
4191      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4192    freetype)
4193      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4194    x11)
4195      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4196    ccache)
4197      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4198  esac
4199}
4200
4201port_help() {
4202  PKGHANDLER_COMMAND=""
4203}
4204
4205pkgutil_help() {
4206  PKGHANDLER_COMMAND=""
4207}
4208
4209pkgadd_help() {
4210  PKGHANDLER_COMMAND=""
4211}
4212
4213# This function will check if we're called from the "configure" wrapper while
4214# printing --help. If so, we will print out additional information that can
4215# only be extracted within the autoconf script, and then exit. This must be
4216# called at the very beginning in configure.ac.
4217
4218
4219
4220
4221
4222
4223#
4224# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4225# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4226#
4227# This code is free software; you can redistribute it and/or modify it
4228# under the terms of the GNU General Public License version 2 only, as
4229# published by the Free Software Foundation.  Oracle designates this
4230# particular file as subject to the "Classpath" exception as provided
4231# by Oracle in the LICENSE file that accompanied this code.
4232#
4233# This code is distributed in the hope that it will be useful, but WITHOUT
4234# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4235# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4236# version 2 for more details (a copy is included in the LICENSE file that
4237# accompanied this code).
4238#
4239# You should have received a copy of the GNU General Public License version
4240# 2 along with this work; if not, write to the Free Software Foundation,
4241# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4242#
4243# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4244# or visit www.oracle.com if you need additional information or have any
4245# questions.
4246#
4247
4248# All valid JVM features, regardless of platform
4249VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4250    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4251
4252# All valid JVM variants
4253VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4254
4255###############################################################################
4256# Check if the specified JVM variant should be built. To be used in shell if
4257# constructs, like this:
4258# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4259#
4260# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4261
4262# Definition kept in one line to allow inlining in if statements.
4263# Additional [] needed to keep m4 from mangling shell constructs.
4264
4265
4266###############################################################################
4267# Check if the specified JVM features are explicitly enabled. To be used in
4268# shell if constructs, like this:
4269# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4270#
4271# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4272
4273# Definition kept in one line to allow inlining in if statements.
4274# Additional [] needed to keep m4 from mangling shell constructs.
4275
4276
4277###############################################################################
4278# Check which variants of the JVM that we want to build. Available variants are:
4279#   server: normal interpreter, and a tiered C1/C2 compiler
4280#   client: normal interpreter, and C1 (no C2 compiler)
4281#   minimal: reduced form of client with optional features stripped out
4282#   core: normal interpreter only, no compiler
4283#   zero: C++ based interpreter only, no compiler
4284#   zeroshark: C++ based interpreter, and a llvm-based compiler
4285#   custom: baseline JVM with no default features
4286#
4287
4288
4289###############################################################################
4290# Check if dtrace should be enabled and has all prerequisites present.
4291#
4292
4293
4294###############################################################################
4295# Set up all JVM features for each JVM variant.
4296#
4297
4298
4299###############################################################################
4300# Validate JVM features once all setup is complete, including custom setup.
4301#
4302
4303
4304################################################################################
4305# Check if gtest should be built
4306#
4307
4308
4309#
4310# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4311# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4312#
4313# This code is free software; you can redistribute it and/or modify it
4314# under the terms of the GNU General Public License version 2 only, as
4315# published by the Free Software Foundation.  Oracle designates this
4316# particular file as subject to the "Classpath" exception as provided
4317# by Oracle in the LICENSE file that accompanied this code.
4318#
4319# This code is distributed in the hope that it will be useful, but WITHOUT
4320# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4321# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4322# version 2 for more details (a copy is included in the LICENSE file that
4323# accompanied this code).
4324#
4325# You should have received a copy of the GNU General Public License version
4326# 2 along with this work; if not, write to the Free Software Foundation,
4327# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4328#
4329# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4330# or visit www.oracle.com if you need additional information or have any
4331# questions.
4332#
4333
4334###############################################################################
4335# Check which variant of the JDK that we want to build.
4336# Currently we have:
4337#    normal:   standard edition
4338# but the custom make system may add other variants
4339#
4340# Effectively the JDK variant gives a name to a specific set of
4341# modules to compile into the JDK.
4342
4343
4344###############################################################################
4345# Set the debug level
4346#    release: no debug information, all optimizations, no asserts.
4347#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4348#    fastdebug: debug information (-g), all optimizations, all asserts
4349#    slowdebug: debug information (-g), no optimizations, all asserts
4350
4351
4352###############################################################################
4353#
4354# Should we build only OpenJDK even if closed sources are present?
4355#
4356
4357
4358
4359
4360###############################################################################
4361#
4362# Enable or disable the elliptic curve crypto implementation
4363#
4364
4365
4366
4367
4368################################################################################
4369#
4370# Gcov coverage data for hotspot
4371#
4372
4373
4374################################################################################
4375#
4376# Static build support.  When enabled will generate static
4377# libraries instead of shared libraries for all JDK libs.
4378#
4379
4380
4381################################################################################
4382#
4383# jlink options.
4384# We always keep packaged modules in JDK image.
4385#
4386
4387
4388################################################################################
4389#
4390# Check if building of the jtreg failure handler should be enabled.
4391#
4392
4393
4394################################################################################
4395#
4396# Enable or disable generation of the classlist at build time
4397#
4398
4399
4400#
4401# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4402# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4403#
4404# This code is free software; you can redistribute it and/or modify it
4405# under the terms of the GNU General Public License version 2 only, as
4406# published by the Free Software Foundation.  Oracle designates this
4407# particular file as subject to the "Classpath" exception as provided
4408# by Oracle in the LICENSE file that accompanied this code.
4409#
4410# This code is distributed in the hope that it will be useful, but WITHOUT
4411# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4412# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4413# version 2 for more details (a copy is included in the LICENSE file that
4414# accompanied this code).
4415#
4416# You should have received a copy of the GNU General Public License version
4417# 2 along with this work; if not, write to the Free Software Foundation,
4418# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4419#
4420# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4421# or visit www.oracle.com if you need additional information or have any
4422# questions.
4423#
4424
4425###############################################################################
4426#
4427# Setup version numbers
4428#
4429
4430# Verify that a given string represents a valid version number, and assign it
4431# to a variable.
4432
4433# Argument 1: the variable to assign to
4434# Argument 2: the value given by the user
4435
4436
4437
4438
4439#
4440# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4441# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4442#
4443# This code is free software; you can redistribute it and/or modify it
4444# under the terms of the GNU General Public License version 2 only, as
4445# published by the Free Software Foundation.  Oracle designates this
4446# particular file as subject to the "Classpath" exception as provided
4447# by Oracle in the LICENSE file that accompanied this code.
4448#
4449# This code is distributed in the hope that it will be useful, but WITHOUT
4450# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4451# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4452# version 2 for more details (a copy is included in the LICENSE file that
4453# accompanied this code).
4454#
4455# You should have received a copy of the GNU General Public License version
4456# 2 along with this work; if not, write to the Free Software Foundation,
4457# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4458#
4459# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4460# or visit www.oracle.com if you need additional information or have any
4461# questions.
4462#
4463
4464# Major library component reside in separate files.
4465#
4466# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4467# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4468#
4469# This code is free software; you can redistribute it and/or modify it
4470# under the terms of the GNU General Public License version 2 only, as
4471# published by the Free Software Foundation.  Oracle designates this
4472# particular file as subject to the "Classpath" exception as provided
4473# by Oracle in the LICENSE file that accompanied this code.
4474#
4475# This code is distributed in the hope that it will be useful, but WITHOUT
4476# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4477# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4478# version 2 for more details (a copy is included in the LICENSE file that
4479# accompanied this code).
4480#
4481# You should have received a copy of the GNU General Public License version
4482# 2 along with this work; if not, write to the Free Software Foundation,
4483# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4484#
4485# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4486# or visit www.oracle.com if you need additional information or have any
4487# questions.
4488#
4489
4490################################################################################
4491# Setup alsa (Advanced Linux Sound Architecture)
4492################################################################################
4493
4494
4495#
4496# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4497# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4498#
4499# This code is free software; you can redistribute it and/or modify it
4500# under the terms of the GNU General Public License version 2 only, as
4501# published by the Free Software Foundation.  Oracle designates this
4502# particular file as subject to the "Classpath" exception as provided
4503# by Oracle in the LICENSE file that accompanied this code.
4504#
4505# This code is distributed in the hope that it will be useful, but WITHOUT
4506# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4507# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4508# version 2 for more details (a copy is included in the LICENSE file that
4509# accompanied this code).
4510#
4511# You should have received a copy of the GNU General Public License version
4512# 2 along with this work; if not, write to the Free Software Foundation,
4513# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4514#
4515# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4516# or visit www.oracle.com if you need additional information or have any
4517# questions.
4518#
4519
4520################################################################################
4521# Setup bundled libraries.
4522#
4523# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4524# OpenJDK repository. Default is to use these libraries as bundled, but they
4525# might be replaced by en external version by the user.
4526################################################################################
4527
4528
4529################################################################################
4530# Setup libjpeg
4531################################################################################
4532
4533
4534################################################################################
4535# Setup giflib
4536################################################################################
4537
4538
4539################################################################################
4540# Setup libpng
4541################################################################################
4542
4543
4544################################################################################
4545# Setup zlib
4546################################################################################
4547
4548
4549################################################################################
4550# Setup lcms (Little CMS)
4551################################################################################
4552
4553
4554#
4555# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4556# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4557#
4558# This code is free software; you can redistribute it and/or modify it
4559# under the terms of the GNU General Public License version 2 only, as
4560# published by the Free Software Foundation.  Oracle designates this
4561# particular file as subject to the "Classpath" exception as provided
4562# by Oracle in the LICENSE file that accompanied this code.
4563#
4564# This code is distributed in the hope that it will be useful, but WITHOUT
4565# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4566# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4567# version 2 for more details (a copy is included in the LICENSE file that
4568# accompanied this code).
4569#
4570# You should have received a copy of the GNU General Public License version
4571# 2 along with this work; if not, write to the Free Software Foundation,
4572# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4573#
4574# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4575# or visit www.oracle.com if you need additional information or have any
4576# questions.
4577#
4578
4579################################################################################
4580# Setup cups (Common Unix Printing System)
4581################################################################################
4582
4583
4584#
4585# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4586# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4587#
4588# This code is free software; you can redistribute it and/or modify it
4589# under the terms of the GNU General Public License version 2 only, as
4590# published by the Free Software Foundation.  Oracle designates this
4591# particular file as subject to the "Classpath" exception as provided
4592# by Oracle in the LICENSE file that accompanied this code.
4593#
4594# This code is distributed in the hope that it will be useful, but WITHOUT
4595# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4596# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4597# version 2 for more details (a copy is included in the LICENSE file that
4598# accompanied this code).
4599#
4600# You should have received a copy of the GNU General Public License version
4601# 2 along with this work; if not, write to the Free Software Foundation,
4602# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4603#
4604# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4605# or visit www.oracle.com if you need additional information or have any
4606# questions.
4607#
4608
4609################################################################################
4610# Setup libffi (Foreign Function Interface)
4611################################################################################
4612
4613
4614#
4615# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4616# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4617#
4618# This code is free software; you can redistribute it and/or modify it
4619# under the terms of the GNU General Public License version 2 only, as
4620# published by the Free Software Foundation.  Oracle designates this
4621# particular file as subject to the "Classpath" exception as provided
4622# by Oracle in the LICENSE file that accompanied this code.
4623#
4624# This code is distributed in the hope that it will be useful, but WITHOUT
4625# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4626# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4627# version 2 for more details (a copy is included in the LICENSE file that
4628# accompanied this code).
4629#
4630# You should have received a copy of the GNU General Public License version
4631# 2 along with this work; if not, write to the Free Software Foundation,
4632# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4633#
4634# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4635# or visit www.oracle.com if you need additional information or have any
4636# questions.
4637#
4638
4639################################################################################
4640# Build the freetype lib from source
4641################################################################################
4642
4643
4644################################################################################
4645# Check if a potential freeype library match is correct and usable
4646################################################################################
4647
4648
4649################################################################################
4650# Setup freetype (The FreeType2 font rendering library)
4651################################################################################
4652
4653
4654#
4655# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4656# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4657#
4658# This code is free software; you can redistribute it and/or modify it
4659# under the terms of the GNU General Public License version 2 only, as
4660# published by the Free Software Foundation.  Oracle designates this
4661# particular file as subject to the "Classpath" exception as provided
4662# by Oracle in the LICENSE file that accompanied this code.
4663#
4664# This code is distributed in the hope that it will be useful, but WITHOUT
4665# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4666# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4667# version 2 for more details (a copy is included in the LICENSE file that
4668# accompanied this code).
4669#
4670# You should have received a copy of the GNU General Public License version
4671# 2 along with this work; if not, write to the Free Software Foundation,
4672# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4673#
4674# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4675# or visit www.oracle.com if you need additional information or have any
4676# questions.
4677#
4678
4679################################################################################
4680# Setup the standard C/C++ runtime libraries.
4681#
4682# Most importantly, determine if stdc++ should be linked statically or
4683# dynamically.
4684################################################################################
4685
4686
4687#
4688# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4689# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4690#
4691# This code is free software; you can redistribute it and/or modify it
4692# under the terms of the GNU General Public License version 2 only, as
4693# published by the Free Software Foundation.  Oracle designates this
4694# particular file as subject to the "Classpath" exception as provided
4695# by Oracle in the LICENSE file that accompanied this code.
4696#
4697# This code is distributed in the hope that it will be useful, but WITHOUT
4698# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4699# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4700# version 2 for more details (a copy is included in the LICENSE file that
4701# accompanied this code).
4702#
4703# You should have received a copy of the GNU General Public License version
4704# 2 along with this work; if not, write to the Free Software Foundation,
4705# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4706#
4707# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4708# or visit www.oracle.com if you need additional information or have any
4709# questions.
4710#
4711
4712################################################################################
4713# Setup X11 Windows system
4714################################################################################
4715
4716
4717
4718################################################################################
4719# Determine which libraries are needed for this configuration
4720################################################################################
4721
4722
4723################################################################################
4724# Parse library options, and setup needed libraries
4725################################################################################
4726
4727
4728################################################################################
4729# Setup llvm (Low-Level VM)
4730################################################################################
4731
4732
4733################################################################################
4734# Setup various libraries, typically small system libraries
4735################################################################################
4736
4737
4738################################################################################
4739# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4740# redistribute it in the test image.
4741################################################################################
4742
4743
4744
4745#
4746# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4747# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4748#
4749# This code is free software; you can redistribute it and/or modify it
4750# under the terms of the GNU General Public License version 2 only, as
4751# published by the Free Software Foundation.  Oracle designates this
4752# particular file as subject to the "Classpath" exception as provided
4753# by Oracle in the LICENSE file that accompanied this code.
4754#
4755# This code is distributed in the hope that it will be useful, but WITHOUT
4756# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4757# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4758# version 2 for more details (a copy is included in the LICENSE file that
4759# accompanied this code).
4760#
4761# You should have received a copy of the GNU General Public License version
4762# 2 along with this work; if not, write to the Free Software Foundation,
4763# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4764#
4765# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4766# or visit www.oracle.com if you need additional information or have any
4767# questions.
4768#
4769
4770# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4771# Converts autoconf style CPU name to OpenJDK style, into
4772# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4773
4774
4775# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4776# Converts autoconf style OS name to OpenJDK style, into
4777# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4778
4779
4780# Expects $host_os $host_cpu $build_os and $build_cpu
4781# and $with_target_bits to have been setup!
4782#
4783# Translate the standard triplet(quadruplet) definition
4784# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4785# OPENJDK_BUILD_OS, etc.
4786
4787
4788# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4789# accordingly. Must be done after setting up build and target system, but before
4790# doing anything else with these values.
4791
4792
4793# Setup the legacy variables, for controlling the old makefiles.
4794#
4795
4796
4797# $1 - Either TARGET or BUILD to setup the variables for.
4798
4799
4800
4801
4802#%%% Build and target systems %%%
4803
4804
4805
4806
4807# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4808# Add -mX to various FLAGS variables.
4809
4810
4811
4812
4813
4814
4815#
4816# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4817# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4818#
4819# This code is free software; you can redistribute it and/or modify it
4820# under the terms of the GNU General Public License version 2 only, as
4821# published by the Free Software Foundation.  Oracle designates this
4822# particular file as subject to the "Classpath" exception as provided
4823# by Oracle in the LICENSE file that accompanied this code.
4824#
4825# This code is distributed in the hope that it will be useful, but WITHOUT
4826# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4827# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4828# version 2 for more details (a copy is included in the LICENSE file that
4829# accompanied this code).
4830#
4831# You should have received a copy of the GNU General Public License version
4832# 2 along with this work; if not, write to the Free Software Foundation,
4833# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4834#
4835# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4836# or visit www.oracle.com if you need additional information or have any
4837# questions.
4838#
4839
4840
4841
4842
4843
4844
4845
4846################################################################################
4847# Define a mechanism for importing extra prebuilt modules
4848#
4849
4850
4851
4852#
4853# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4854# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4855#
4856# This code is free software; you can redistribute it and/or modify it
4857# under the terms of the GNU General Public License version 2 only, as
4858# published by the Free Software Foundation.  Oracle designates this
4859# particular file as subject to the "Classpath" exception as provided
4860# by Oracle in the LICENSE file that accompanied this code.
4861#
4862# This code is distributed in the hope that it will be useful, but WITHOUT
4863# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4864# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4865# version 2 for more details (a copy is included in the LICENSE file that
4866# accompanied this code).
4867#
4868# You should have received a copy of the GNU General Public License version
4869# 2 along with this work; if not, write to the Free Software Foundation,
4870# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4871#
4872# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4873# or visit www.oracle.com if you need additional information or have any
4874# questions.
4875#
4876
4877########################################################################
4878# This file is responsible for detecting, verifying and setting up the
4879# toolchain, i.e. the compiler, linker and related utilities. It will setup
4880# proper paths to the binaries, but it will not setup any flags.
4881#
4882# The binaries used is determined by the toolchain type, which is the family of
4883# compilers and related tools that are used.
4884########################################################################
4885
4886
4887# All valid toolchains, regardless of platform (used by help.m4)
4888VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4889
4890# These toolchains are valid on different platforms
4891VALID_TOOLCHAINS_linux="gcc clang"
4892VALID_TOOLCHAINS_solaris="solstudio"
4893VALID_TOOLCHAINS_macosx="gcc clang"
4894VALID_TOOLCHAINS_aix="xlc"
4895VALID_TOOLCHAINS_windows="microsoft"
4896
4897# Toolchain descriptions
4898TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4899TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4900TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4901TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4902TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4903
4904# Minimum supported versions, empty means unspecified
4905TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4906TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4907TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4908TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4909TOOLCHAIN_MINIMUM_VERSION_xlc=""
4910
4911# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4912# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4913# $1 - optional variable prefix for compiler and version variables (BUILD_)
4914# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4915
4916
4917# Check if the configured compiler (C and C++) is of a specific version or
4918# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4919#
4920# Arguments:
4921#   VERSION:   The version string to check against the found version
4922#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4923#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4924#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4925
4926
4927
4928
4929# Setup a number of variables describing how native output files are
4930# named on this platform/toolchain.
4931
4932
4933# Determine which toolchain type to use, and make sure it is valid for this
4934# platform. Setup various information about the selected toolchain.
4935
4936
4937# Before we start detecting the toolchain executables, we might need some
4938# special setup, e.g. additional paths etc.
4939
4940
4941# Restore path, etc
4942
4943
4944# Check if a compiler is of the toolchain type we expect, and save the version
4945# information from it. If the compiler does not match the expected type,
4946# this function will abort using AC_MSG_ERROR. If it matches, the version will
4947# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4948# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4949#
4950# $1 = compiler to test (CC or CXX)
4951# $2 = human readable name of compiler (C or C++)
4952
4953
4954# Try to locate the given C or C++ compiler in the path, or otherwise.
4955#
4956# $1 = compiler to test (CC or CXX)
4957# $2 = human readable name of compiler (C or C++)
4958# $3 = list of compiler names to search for
4959
4960
4961# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4962# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4963# archiver (AR). Verify that the compilers are correct according to the
4964# toolchain type.
4965
4966
4967# Setup additional tools that is considered a part of the toolchain, but not the
4968# core part. Many of these are highly platform-specific and do not exist,
4969# and/or are not needed on all platforms.
4970
4971
4972# Setup the build tools (i.e, the compiler and linker used to build programs
4973# that should be run on the build platform, not the target platform, as a build
4974# helper). Since the non-cross-compile case uses the normal, target compilers
4975# for this, we can only do this after these have been setup.
4976
4977
4978# Do some additional checks on the detected tools.
4979
4980
4981# Setup the JTReg Regression Test Harness.
4982
4983
4984#
4985# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4986# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4987#
4988# This code is free software; you can redistribute it and/or modify it
4989# under the terms of the GNU General Public License version 2 only, as
4990# published by the Free Software Foundation.  Oracle designates this
4991# particular file as subject to the "Classpath" exception as provided
4992# by Oracle in the LICENSE file that accompanied this code.
4993#
4994# This code is distributed in the hope that it will be useful, but WITHOUT
4995# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4996# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4997# version 2 for more details (a copy is included in the LICENSE file that
4998# accompanied this code).
4999#
5000# You should have received a copy of the GNU General Public License version
5001# 2 along with this work; if not, write to the Free Software Foundation,
5002# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5003#
5004# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5005# or visit www.oracle.com if you need additional information or have any
5006# questions.
5007#
5008
5009################################################################################
5010# The order of these defines the priority by which we try to find them.
5011VALID_VS_VERSIONS="2013 2012 2010"
5012
5013VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5014VS_VERSION_INTERNAL_2010=100
5015VS_MSVCR_2010=msvcr100.dll
5016# We don't use msvcp on Visual Studio 2010
5017#VS_MSVCP_2010=msvcp100.dll
5018VS_ENVVAR_2010="VS100COMNTOOLS"
5019VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5020VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5021VS_VS_PLATFORM_NAME_2010="v100"
5022VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5023
5024VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5025VS_VERSION_INTERNAL_2012=110
5026VS_MSVCR_2012=msvcr110.dll
5027VS_MSVCP_2012=msvcp110.dll
5028VS_ENVVAR_2012="VS110COMNTOOLS"
5029VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5030VS_SDK_INSTALLDIR_2012=
5031VS_VS_PLATFORM_NAME_2012="v110"
5032VS_SDK_PLATFORM_NAME_2012=
5033
5034VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5035VS_VERSION_INTERNAL_2013=120
5036VS_MSVCR_2013=msvcr120.dll
5037VS_MSVCP_2013=msvcp120.dll
5038VS_ENVVAR_2013="VS120COMNTOOLS"
5039VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5040VS_SDK_INSTALLDIR_2013=
5041VS_VS_PLATFORM_NAME_2013="v120"
5042VS_SDK_PLATFORM_NAME_2013=
5043
5044################################################################################
5045
5046
5047
5048################################################################################
5049
5050
5051
5052################################################################################
5053# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5054# build environment and assigns it to VS_ENV_CMD
5055
5056
5057################################################################################
5058
5059
5060
5061################################################################################
5062# Check if the VS env variables were setup prior to running configure.
5063# If not, then find vcvarsall.bat and run it automatically, and integrate
5064# the set env variables into the spec file.
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079# This line needs to be here, verbatim, after all includes and the dummy hook
5080# definitions. It is replaced with custom functionality when building
5081# custom sources.
5082#CUSTOM_AUTOCONF_INCLUDE
5083
5084# Do not change or remove the following line, it is needed for consistency checks:
5085DATE_WHEN_GENERATED=1481213545
5086
5087###############################################################################
5088#
5089# Initialization / Boot-strapping
5090#
5091# The bootstrapping process needs to solve the "chicken or the egg" problem,
5092# thus it jumps back and forth, each time gaining something needed later on.
5093#
5094###############################################################################
5095
5096# If we are requested to print additional help, do that and then exit.
5097# This must be the very first call.
5098
5099  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5100
5101    # Print available toolchains
5102    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5103    $PRINTF "Which are valid to use depends on the build platform.\n"
5104    for toolchain in $VALID_TOOLCHAINS_all; do
5105      # Use indirect variable referencing
5106      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5107      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5108      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5109    done
5110    $PRINTF "\n"
5111
5112    # Print available jvm features
5113    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5114    $PRINTF "Which are valid to use depends on the target platform.\n  "
5115    $PRINTF "%s " $VALID_JVM_FEATURES
5116    $PRINTF "\n"
5117
5118    # And now exit directly
5119    exit 0
5120  fi
5121
5122
5123# Basic initialization that must happen first of all in the normal process.
5124
5125  # Save the original command line. This is passed to us by the wrapper configure script.
5126
5127  # Save the path variable before it gets changed
5128  ORIGINAL_PATH="$PATH"
5129
5130  DATE_WHEN_CONFIGURED=`LANG=C date`
5131
5132  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5133$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5134  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5135$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5136
5137
5138  # Start with tools that do not need have cross compilation support
5139  # and can be expected to be found in the default PATH. These tools are
5140  # used by configure.
5141
5142  # First are all the simple required tools.
5143
5144
5145
5146  # Publish this variable in the help.
5147
5148
5149  if [ -z "${BASENAME+x}" ]; then
5150    # The variable is not set by user, try to locate tool using the code snippet
5151    for ac_prog in basename
5152do
5153  # Extract the first word of "$ac_prog", so it can be a program name with args.
5154set dummy $ac_prog; ac_word=$2
5155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156$as_echo_n "checking for $ac_word... " >&6; }
5157if ${ac_cv_path_BASENAME+:} false; then :
5158  $as_echo_n "(cached) " >&6
5159else
5160  case $BASENAME in
5161  [\\/]* | ?:[\\/]*)
5162  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5163  ;;
5164  *)
5165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166for as_dir in $PATH
5167do
5168  IFS=$as_save_IFS
5169  test -z "$as_dir" && as_dir=.
5170    for ac_exec_ext in '' $ac_executable_extensions; do
5171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5172    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5174    break 2
5175  fi
5176done
5177  done
5178IFS=$as_save_IFS
5179
5180  ;;
5181esac
5182fi
5183BASENAME=$ac_cv_path_BASENAME
5184if test -n "$BASENAME"; then
5185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5186$as_echo "$BASENAME" >&6; }
5187else
5188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5189$as_echo "no" >&6; }
5190fi
5191
5192
5193  test -n "$BASENAME" && break
5194done
5195
5196  else
5197    # The variable is set, but is it from the command line or the environment?
5198
5199    # Try to remove the string !BASENAME! from our list.
5200    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5201    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5202      # If it failed, the variable was not from the command line. Ignore it,
5203      # but warn the user (except for BASH, which is always set by the calling BASH).
5204      if test "xBASENAME" != xBASH; then
5205        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5206$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5207      fi
5208      # Try to locate tool using the code snippet
5209      for ac_prog in basename
5210do
5211  # Extract the first word of "$ac_prog", so it can be a program name with args.
5212set dummy $ac_prog; ac_word=$2
5213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5214$as_echo_n "checking for $ac_word... " >&6; }
5215if ${ac_cv_path_BASENAME+:} false; then :
5216  $as_echo_n "(cached) " >&6
5217else
5218  case $BASENAME in
5219  [\\/]* | ?:[\\/]*)
5220  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5221  ;;
5222  *)
5223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5224for as_dir in $PATH
5225do
5226  IFS=$as_save_IFS
5227  test -z "$as_dir" && as_dir=.
5228    for ac_exec_ext in '' $ac_executable_extensions; do
5229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5230    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5232    break 2
5233  fi
5234done
5235  done
5236IFS=$as_save_IFS
5237
5238  ;;
5239esac
5240fi
5241BASENAME=$ac_cv_path_BASENAME
5242if test -n "$BASENAME"; then
5243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5244$as_echo "$BASENAME" >&6; }
5245else
5246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5247$as_echo "no" >&6; }
5248fi
5249
5250
5251  test -n "$BASENAME" && break
5252done
5253
5254    else
5255      # If it succeeded, then it was overridden by the user. We will use it
5256      # for the tool.
5257
5258      # First remove it from the list of overridden variables, so we can test
5259      # for unknown variables in the end.
5260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5261
5262      # Check if we try to supply an empty value
5263      if test "x$BASENAME" = x; then
5264        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5265$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5266        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5267$as_echo_n "checking for BASENAME... " >&6; }
5268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5269$as_echo "disabled" >&6; }
5270      else
5271        # Check if the provided tool contains a complete path.
5272        tool_specified="$BASENAME"
5273        tool_basename="${tool_specified##*/}"
5274        if test "x$tool_basename" = "x$tool_specified"; then
5275          # A command without a complete path is provided, search $PATH.
5276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5277$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5278          # Extract the first word of "$tool_basename", so it can be a program name with args.
5279set dummy $tool_basename; ac_word=$2
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281$as_echo_n "checking for $ac_word... " >&6; }
5282if ${ac_cv_path_BASENAME+:} false; then :
5283  $as_echo_n "(cached) " >&6
5284else
5285  case $BASENAME in
5286  [\\/]* | ?:[\\/]*)
5287  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5288  ;;
5289  *)
5290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5291for as_dir in $PATH
5292do
5293  IFS=$as_save_IFS
5294  test -z "$as_dir" && as_dir=.
5295    for ac_exec_ext in '' $ac_executable_extensions; do
5296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5297    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5299    break 2
5300  fi
5301done
5302  done
5303IFS=$as_save_IFS
5304
5305  ;;
5306esac
5307fi
5308BASENAME=$ac_cv_path_BASENAME
5309if test -n "$BASENAME"; then
5310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5311$as_echo "$BASENAME" >&6; }
5312else
5313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5314$as_echo "no" >&6; }
5315fi
5316
5317
5318          if test "x$BASENAME" = x; then
5319            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5320          fi
5321        else
5322          # Otherwise we believe it is a complete path. Use it as it is.
5323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5324$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5325          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5326$as_echo_n "checking for BASENAME... " >&6; }
5327          if test ! -x "$tool_specified"; then
5328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5329$as_echo "not found" >&6; }
5330            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5331          fi
5332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5333$as_echo "$tool_specified" >&6; }
5334        fi
5335      fi
5336    fi
5337
5338  fi
5339
5340
5341
5342  if test "x$BASENAME" = x; then
5343    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5344  fi
5345
5346
5347
5348
5349
5350  # Publish this variable in the help.
5351
5352
5353  if [ -z "${BASH+x}" ]; then
5354    # The variable is not set by user, try to locate tool using the code snippet
5355    for ac_prog in bash
5356do
5357  # Extract the first word of "$ac_prog", so it can be a program name with args.
5358set dummy $ac_prog; ac_word=$2
5359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5360$as_echo_n "checking for $ac_word... " >&6; }
5361if ${ac_cv_path_BASH+:} false; then :
5362  $as_echo_n "(cached) " >&6
5363else
5364  case $BASH in
5365  [\\/]* | ?:[\\/]*)
5366  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5367  ;;
5368  *)
5369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5370for as_dir in $PATH
5371do
5372  IFS=$as_save_IFS
5373  test -z "$as_dir" && as_dir=.
5374    for ac_exec_ext in '' $ac_executable_extensions; do
5375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5376    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5378    break 2
5379  fi
5380done
5381  done
5382IFS=$as_save_IFS
5383
5384  ;;
5385esac
5386fi
5387BASH=$ac_cv_path_BASH
5388if test -n "$BASH"; then
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5390$as_echo "$BASH" >&6; }
5391else
5392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5393$as_echo "no" >&6; }
5394fi
5395
5396
5397  test -n "$BASH" && break
5398done
5399
5400  else
5401    # The variable is set, but is it from the command line or the environment?
5402
5403    # Try to remove the string !BASH! from our list.
5404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5406      # If it failed, the variable was not from the command line. Ignore it,
5407      # but warn the user (except for BASH, which is always set by the calling BASH).
5408      if test "xBASH" != xBASH; then
5409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5410$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5411      fi
5412      # Try to locate tool using the code snippet
5413      for ac_prog in bash
5414do
5415  # Extract the first word of "$ac_prog", so it can be a program name with args.
5416set dummy $ac_prog; ac_word=$2
5417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5418$as_echo_n "checking for $ac_word... " >&6; }
5419if ${ac_cv_path_BASH+:} false; then :
5420  $as_echo_n "(cached) " >&6
5421else
5422  case $BASH in
5423  [\\/]* | ?:[\\/]*)
5424  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5425  ;;
5426  *)
5427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5428for as_dir in $PATH
5429do
5430  IFS=$as_save_IFS
5431  test -z "$as_dir" && as_dir=.
5432    for ac_exec_ext in '' $ac_executable_extensions; do
5433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5434    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5436    break 2
5437  fi
5438done
5439  done
5440IFS=$as_save_IFS
5441
5442  ;;
5443esac
5444fi
5445BASH=$ac_cv_path_BASH
5446if test -n "$BASH"; then
5447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5448$as_echo "$BASH" >&6; }
5449else
5450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5451$as_echo "no" >&6; }
5452fi
5453
5454
5455  test -n "$BASH" && break
5456done
5457
5458    else
5459      # If it succeeded, then it was overridden by the user. We will use it
5460      # for the tool.
5461
5462      # First remove it from the list of overridden variables, so we can test
5463      # for unknown variables in the end.
5464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5465
5466      # Check if we try to supply an empty value
5467      if test "x$BASH" = x; then
5468        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5469$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5471$as_echo_n "checking for BASH... " >&6; }
5472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5473$as_echo "disabled" >&6; }
5474      else
5475        # Check if the provided tool contains a complete path.
5476        tool_specified="$BASH"
5477        tool_basename="${tool_specified##*/}"
5478        if test "x$tool_basename" = "x$tool_specified"; then
5479          # A command without a complete path is provided, search $PATH.
5480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5481$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5482          # Extract the first word of "$tool_basename", so it can be a program name with args.
5483set dummy $tool_basename; ac_word=$2
5484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5485$as_echo_n "checking for $ac_word... " >&6; }
5486if ${ac_cv_path_BASH+:} false; then :
5487  $as_echo_n "(cached) " >&6
5488else
5489  case $BASH in
5490  [\\/]* | ?:[\\/]*)
5491  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5492  ;;
5493  *)
5494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5495for as_dir in $PATH
5496do
5497  IFS=$as_save_IFS
5498  test -z "$as_dir" && as_dir=.
5499    for ac_exec_ext in '' $ac_executable_extensions; do
5500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5501    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5503    break 2
5504  fi
5505done
5506  done
5507IFS=$as_save_IFS
5508
5509  ;;
5510esac
5511fi
5512BASH=$ac_cv_path_BASH
5513if test -n "$BASH"; then
5514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5515$as_echo "$BASH" >&6; }
5516else
5517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5518$as_echo "no" >&6; }
5519fi
5520
5521
5522          if test "x$BASH" = x; then
5523            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5524          fi
5525        else
5526          # Otherwise we believe it is a complete path. Use it as it is.
5527          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5528$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5529          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5530$as_echo_n "checking for BASH... " >&6; }
5531          if test ! -x "$tool_specified"; then
5532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5533$as_echo "not found" >&6; }
5534            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5535          fi
5536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5537$as_echo "$tool_specified" >&6; }
5538        fi
5539      fi
5540    fi
5541
5542  fi
5543
5544
5545
5546  if test "x$BASH" = x; then
5547    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5548  fi
5549
5550
5551
5552
5553
5554  # Publish this variable in the help.
5555
5556
5557  if [ -z "${CAT+x}" ]; then
5558    # The variable is not set by user, try to locate tool using the code snippet
5559    for ac_prog in cat
5560do
5561  # Extract the first word of "$ac_prog", so it can be a program name with args.
5562set dummy $ac_prog; ac_word=$2
5563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5564$as_echo_n "checking for $ac_word... " >&6; }
5565if ${ac_cv_path_CAT+:} false; then :
5566  $as_echo_n "(cached) " >&6
5567else
5568  case $CAT in
5569  [\\/]* | ?:[\\/]*)
5570  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5571  ;;
5572  *)
5573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5574for as_dir in $PATH
5575do
5576  IFS=$as_save_IFS
5577  test -z "$as_dir" && as_dir=.
5578    for ac_exec_ext in '' $ac_executable_extensions; do
5579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5580    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5582    break 2
5583  fi
5584done
5585  done
5586IFS=$as_save_IFS
5587
5588  ;;
5589esac
5590fi
5591CAT=$ac_cv_path_CAT
5592if test -n "$CAT"; then
5593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5594$as_echo "$CAT" >&6; }
5595else
5596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5597$as_echo "no" >&6; }
5598fi
5599
5600
5601  test -n "$CAT" && break
5602done
5603
5604  else
5605    # The variable is set, but is it from the command line or the environment?
5606
5607    # Try to remove the string !CAT! from our list.
5608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5610      # If it failed, the variable was not from the command line. Ignore it,
5611      # but warn the user (except for BASH, which is always set by the calling BASH).
5612      if test "xCAT" != xBASH; then
5613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5614$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5615      fi
5616      # Try to locate tool using the code snippet
5617      for ac_prog in cat
5618do
5619  # Extract the first word of "$ac_prog", so it can be a program name with args.
5620set dummy $ac_prog; ac_word=$2
5621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5622$as_echo_n "checking for $ac_word... " >&6; }
5623if ${ac_cv_path_CAT+:} false; then :
5624  $as_echo_n "(cached) " >&6
5625else
5626  case $CAT in
5627  [\\/]* | ?:[\\/]*)
5628  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5629  ;;
5630  *)
5631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5632for as_dir in $PATH
5633do
5634  IFS=$as_save_IFS
5635  test -z "$as_dir" && as_dir=.
5636    for ac_exec_ext in '' $ac_executable_extensions; do
5637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5638    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5640    break 2
5641  fi
5642done
5643  done
5644IFS=$as_save_IFS
5645
5646  ;;
5647esac
5648fi
5649CAT=$ac_cv_path_CAT
5650if test -n "$CAT"; then
5651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5652$as_echo "$CAT" >&6; }
5653else
5654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5655$as_echo "no" >&6; }
5656fi
5657
5658
5659  test -n "$CAT" && break
5660done
5661
5662    else
5663      # If it succeeded, then it was overridden by the user. We will use it
5664      # for the tool.
5665
5666      # First remove it from the list of overridden variables, so we can test
5667      # for unknown variables in the end.
5668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5669
5670      # Check if we try to supply an empty value
5671      if test "x$CAT" = x; then
5672        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5673$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5675$as_echo_n "checking for CAT... " >&6; }
5676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5677$as_echo "disabled" >&6; }
5678      else
5679        # Check if the provided tool contains a complete path.
5680        tool_specified="$CAT"
5681        tool_basename="${tool_specified##*/}"
5682        if test "x$tool_basename" = "x$tool_specified"; then
5683          # A command without a complete path is provided, search $PATH.
5684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5685$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5686          # Extract the first word of "$tool_basename", so it can be a program name with args.
5687set dummy $tool_basename; ac_word=$2
5688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5689$as_echo_n "checking for $ac_word... " >&6; }
5690if ${ac_cv_path_CAT+:} false; then :
5691  $as_echo_n "(cached) " >&6
5692else
5693  case $CAT in
5694  [\\/]* | ?:[\\/]*)
5695  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5696  ;;
5697  *)
5698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5699for as_dir in $PATH
5700do
5701  IFS=$as_save_IFS
5702  test -z "$as_dir" && as_dir=.
5703    for ac_exec_ext in '' $ac_executable_extensions; do
5704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5705    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5707    break 2
5708  fi
5709done
5710  done
5711IFS=$as_save_IFS
5712
5713  ;;
5714esac
5715fi
5716CAT=$ac_cv_path_CAT
5717if test -n "$CAT"; then
5718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5719$as_echo "$CAT" >&6; }
5720else
5721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5722$as_echo "no" >&6; }
5723fi
5724
5725
5726          if test "x$CAT" = x; then
5727            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5728          fi
5729        else
5730          # Otherwise we believe it is a complete path. Use it as it is.
5731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5732$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5733          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5734$as_echo_n "checking for CAT... " >&6; }
5735          if test ! -x "$tool_specified"; then
5736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5737$as_echo "not found" >&6; }
5738            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5739          fi
5740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5741$as_echo "$tool_specified" >&6; }
5742        fi
5743      fi
5744    fi
5745
5746  fi
5747
5748
5749
5750  if test "x$CAT" = x; then
5751    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5752  fi
5753
5754
5755
5756
5757
5758  # Publish this variable in the help.
5759
5760
5761  if [ -z "${CHMOD+x}" ]; then
5762    # The variable is not set by user, try to locate tool using the code snippet
5763    for ac_prog in chmod
5764do
5765  # Extract the first word of "$ac_prog", so it can be a program name with args.
5766set dummy $ac_prog; ac_word=$2
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5768$as_echo_n "checking for $ac_word... " >&6; }
5769if ${ac_cv_path_CHMOD+:} false; then :
5770  $as_echo_n "(cached) " >&6
5771else
5772  case $CHMOD in
5773  [\\/]* | ?:[\\/]*)
5774  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5775  ;;
5776  *)
5777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5778for as_dir in $PATH
5779do
5780  IFS=$as_save_IFS
5781  test -z "$as_dir" && as_dir=.
5782    for ac_exec_ext in '' $ac_executable_extensions; do
5783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5784    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5786    break 2
5787  fi
5788done
5789  done
5790IFS=$as_save_IFS
5791
5792  ;;
5793esac
5794fi
5795CHMOD=$ac_cv_path_CHMOD
5796if test -n "$CHMOD"; then
5797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5798$as_echo "$CHMOD" >&6; }
5799else
5800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5801$as_echo "no" >&6; }
5802fi
5803
5804
5805  test -n "$CHMOD" && break
5806done
5807
5808  else
5809    # The variable is set, but is it from the command line or the environment?
5810
5811    # Try to remove the string !CHMOD! from our list.
5812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5814      # If it failed, the variable was not from the command line. Ignore it,
5815      # but warn the user (except for BASH, which is always set by the calling BASH).
5816      if test "xCHMOD" != xBASH; then
5817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5818$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5819      fi
5820      # Try to locate tool using the code snippet
5821      for ac_prog in chmod
5822do
5823  # Extract the first word of "$ac_prog", so it can be a program name with args.
5824set dummy $ac_prog; ac_word=$2
5825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5826$as_echo_n "checking for $ac_word... " >&6; }
5827if ${ac_cv_path_CHMOD+:} false; then :
5828  $as_echo_n "(cached) " >&6
5829else
5830  case $CHMOD in
5831  [\\/]* | ?:[\\/]*)
5832  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5833  ;;
5834  *)
5835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5836for as_dir in $PATH
5837do
5838  IFS=$as_save_IFS
5839  test -z "$as_dir" && as_dir=.
5840    for ac_exec_ext in '' $ac_executable_extensions; do
5841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5842    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5844    break 2
5845  fi
5846done
5847  done
5848IFS=$as_save_IFS
5849
5850  ;;
5851esac
5852fi
5853CHMOD=$ac_cv_path_CHMOD
5854if test -n "$CHMOD"; then
5855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5856$as_echo "$CHMOD" >&6; }
5857else
5858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5859$as_echo "no" >&6; }
5860fi
5861
5862
5863  test -n "$CHMOD" && break
5864done
5865
5866    else
5867      # If it succeeded, then it was overridden by the user. We will use it
5868      # for the tool.
5869
5870      # First remove it from the list of overridden variables, so we can test
5871      # for unknown variables in the end.
5872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5873
5874      # Check if we try to supply an empty value
5875      if test "x$CHMOD" = x; then
5876        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5877$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5878        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5879$as_echo_n "checking for CHMOD... " >&6; }
5880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5881$as_echo "disabled" >&6; }
5882      else
5883        # Check if the provided tool contains a complete path.
5884        tool_specified="$CHMOD"
5885        tool_basename="${tool_specified##*/}"
5886        if test "x$tool_basename" = "x$tool_specified"; then
5887          # A command without a complete path is provided, search $PATH.
5888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5889$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5890          # Extract the first word of "$tool_basename", so it can be a program name with args.
5891set dummy $tool_basename; ac_word=$2
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5893$as_echo_n "checking for $ac_word... " >&6; }
5894if ${ac_cv_path_CHMOD+:} false; then :
5895  $as_echo_n "(cached) " >&6
5896else
5897  case $CHMOD in
5898  [\\/]* | ?:[\\/]*)
5899  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5900  ;;
5901  *)
5902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5903for as_dir in $PATH
5904do
5905  IFS=$as_save_IFS
5906  test -z "$as_dir" && as_dir=.
5907    for ac_exec_ext in '' $ac_executable_extensions; do
5908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5909    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5911    break 2
5912  fi
5913done
5914  done
5915IFS=$as_save_IFS
5916
5917  ;;
5918esac
5919fi
5920CHMOD=$ac_cv_path_CHMOD
5921if test -n "$CHMOD"; then
5922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5923$as_echo "$CHMOD" >&6; }
5924else
5925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5926$as_echo "no" >&6; }
5927fi
5928
5929
5930          if test "x$CHMOD" = x; then
5931            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5932          fi
5933        else
5934          # Otherwise we believe it is a complete path. Use it as it is.
5935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5936$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5937          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5938$as_echo_n "checking for CHMOD... " >&6; }
5939          if test ! -x "$tool_specified"; then
5940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5941$as_echo "not found" >&6; }
5942            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5943          fi
5944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5945$as_echo "$tool_specified" >&6; }
5946        fi
5947      fi
5948    fi
5949
5950  fi
5951
5952
5953
5954  if test "x$CHMOD" = x; then
5955    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5956  fi
5957
5958
5959
5960
5961
5962  # Publish this variable in the help.
5963
5964
5965  if [ -z "${CMP+x}" ]; then
5966    # The variable is not set by user, try to locate tool using the code snippet
5967    for ac_prog in cmp
5968do
5969  # Extract the first word of "$ac_prog", so it can be a program name with args.
5970set dummy $ac_prog; 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_CMP+:} false; then :
5974  $as_echo_n "(cached) " >&6
5975else
5976  case $CMP in
5977  [\\/]* | ?:[\\/]*)
5978  ac_cv_path_CMP="$CMP" # 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_CMP="$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
5999CMP=$ac_cv_path_CMP
6000if test -n "$CMP"; then
6001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6002$as_echo "$CMP" >&6; }
6003else
6004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005$as_echo "no" >&6; }
6006fi
6007
6008
6009  test -n "$CMP" && break
6010done
6011
6012  else
6013    # The variable is set, but is it from the command line or the environment?
6014
6015    # Try to remove the string !CMP! from our list.
6016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6018      # If it failed, the variable was not from the command line. Ignore it,
6019      # but warn the user (except for BASH, which is always set by the calling BASH).
6020      if test "xCMP" != xBASH; then
6021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6022$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6023      fi
6024      # Try to locate tool using the code snippet
6025      for ac_prog in cmp
6026do
6027  # Extract the first word of "$ac_prog", so it can be a program name with args.
6028set dummy $ac_prog; ac_word=$2
6029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6030$as_echo_n "checking for $ac_word... " >&6; }
6031if ${ac_cv_path_CMP+:} false; then :
6032  $as_echo_n "(cached) " >&6
6033else
6034  case $CMP in
6035  [\\/]* | ?:[\\/]*)
6036  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6037  ;;
6038  *)
6039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6040for as_dir in $PATH
6041do
6042  IFS=$as_save_IFS
6043  test -z "$as_dir" && as_dir=.
6044    for ac_exec_ext in '' $ac_executable_extensions; do
6045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6046    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6048    break 2
6049  fi
6050done
6051  done
6052IFS=$as_save_IFS
6053
6054  ;;
6055esac
6056fi
6057CMP=$ac_cv_path_CMP
6058if test -n "$CMP"; then
6059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6060$as_echo "$CMP" >&6; }
6061else
6062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6063$as_echo "no" >&6; }
6064fi
6065
6066
6067  test -n "$CMP" && break
6068done
6069
6070    else
6071      # If it succeeded, then it was overridden by the user. We will use it
6072      # for the tool.
6073
6074      # First remove it from the list of overridden variables, so we can test
6075      # for unknown variables in the end.
6076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6077
6078      # Check if we try to supply an empty value
6079      if test "x$CMP" = x; then
6080        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6081$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6083$as_echo_n "checking for CMP... " >&6; }
6084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6085$as_echo "disabled" >&6; }
6086      else
6087        # Check if the provided tool contains a complete path.
6088        tool_specified="$CMP"
6089        tool_basename="${tool_specified##*/}"
6090        if test "x$tool_basename" = "x$tool_specified"; then
6091          # A command without a complete path is provided, search $PATH.
6092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6093$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6094          # Extract the first word of "$tool_basename", so it can be a program name with args.
6095set dummy $tool_basename; ac_word=$2
6096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6097$as_echo_n "checking for $ac_word... " >&6; }
6098if ${ac_cv_path_CMP+:} false; then :
6099  $as_echo_n "(cached) " >&6
6100else
6101  case $CMP in
6102  [\\/]* | ?:[\\/]*)
6103  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6104  ;;
6105  *)
6106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107for as_dir in $PATH
6108do
6109  IFS=$as_save_IFS
6110  test -z "$as_dir" && as_dir=.
6111    for ac_exec_ext in '' $ac_executable_extensions; do
6112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6113    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6115    break 2
6116  fi
6117done
6118  done
6119IFS=$as_save_IFS
6120
6121  ;;
6122esac
6123fi
6124CMP=$ac_cv_path_CMP
6125if test -n "$CMP"; then
6126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6127$as_echo "$CMP" >&6; }
6128else
6129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6130$as_echo "no" >&6; }
6131fi
6132
6133
6134          if test "x$CMP" = x; then
6135            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6136          fi
6137        else
6138          # Otherwise we believe it is a complete path. Use it as it is.
6139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6140$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6141          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6142$as_echo_n "checking for CMP... " >&6; }
6143          if test ! -x "$tool_specified"; then
6144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6145$as_echo "not found" >&6; }
6146            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6147          fi
6148          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6149$as_echo "$tool_specified" >&6; }
6150        fi
6151      fi
6152    fi
6153
6154  fi
6155
6156
6157
6158  if test "x$CMP" = x; then
6159    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6160  fi
6161
6162
6163
6164
6165
6166  # Publish this variable in the help.
6167
6168
6169  if [ -z "${COMM+x}" ]; then
6170    # The variable is not set by user, try to locate tool using the code snippet
6171    for ac_prog in comm
6172do
6173  # Extract the first word of "$ac_prog", so it can be a program name with args.
6174set dummy $ac_prog; ac_word=$2
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6176$as_echo_n "checking for $ac_word... " >&6; }
6177if ${ac_cv_path_COMM+:} false; then :
6178  $as_echo_n "(cached) " >&6
6179else
6180  case $COMM in
6181  [\\/]* | ?:[\\/]*)
6182  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6183  ;;
6184  *)
6185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6186for as_dir in $PATH
6187do
6188  IFS=$as_save_IFS
6189  test -z "$as_dir" && as_dir=.
6190    for ac_exec_ext in '' $ac_executable_extensions; do
6191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6192    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6194    break 2
6195  fi
6196done
6197  done
6198IFS=$as_save_IFS
6199
6200  ;;
6201esac
6202fi
6203COMM=$ac_cv_path_COMM
6204if test -n "$COMM"; then
6205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6206$as_echo "$COMM" >&6; }
6207else
6208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6209$as_echo "no" >&6; }
6210fi
6211
6212
6213  test -n "$COMM" && break
6214done
6215
6216  else
6217    # The variable is set, but is it from the command line or the environment?
6218
6219    # Try to remove the string !COMM! from our list.
6220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6222      # If it failed, the variable was not from the command line. Ignore it,
6223      # but warn the user (except for BASH, which is always set by the calling BASH).
6224      if test "xCOMM" != xBASH; then
6225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6226$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6227      fi
6228      # Try to locate tool using the code snippet
6229      for ac_prog in comm
6230do
6231  # Extract the first word of "$ac_prog", so it can be a program name with args.
6232set dummy $ac_prog; ac_word=$2
6233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6234$as_echo_n "checking for $ac_word... " >&6; }
6235if ${ac_cv_path_COMM+:} false; then :
6236  $as_echo_n "(cached) " >&6
6237else
6238  case $COMM in
6239  [\\/]* | ?:[\\/]*)
6240  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6241  ;;
6242  *)
6243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6244for as_dir in $PATH
6245do
6246  IFS=$as_save_IFS
6247  test -z "$as_dir" && as_dir=.
6248    for ac_exec_ext in '' $ac_executable_extensions; do
6249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6250    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6252    break 2
6253  fi
6254done
6255  done
6256IFS=$as_save_IFS
6257
6258  ;;
6259esac
6260fi
6261COMM=$ac_cv_path_COMM
6262if test -n "$COMM"; then
6263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6264$as_echo "$COMM" >&6; }
6265else
6266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6267$as_echo "no" >&6; }
6268fi
6269
6270
6271  test -n "$COMM" && break
6272done
6273
6274    else
6275      # If it succeeded, then it was overridden by the user. We will use it
6276      # for the tool.
6277
6278      # First remove it from the list of overridden variables, so we can test
6279      # for unknown variables in the end.
6280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6281
6282      # Check if we try to supply an empty value
6283      if test "x$COMM" = x; then
6284        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6285$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6287$as_echo_n "checking for COMM... " >&6; }
6288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6289$as_echo "disabled" >&6; }
6290      else
6291        # Check if the provided tool contains a complete path.
6292        tool_specified="$COMM"
6293        tool_basename="${tool_specified##*/}"
6294        if test "x$tool_basename" = "x$tool_specified"; then
6295          # A command without a complete path is provided, search $PATH.
6296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6297$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6298          # Extract the first word of "$tool_basename", so it can be a program name with args.
6299set dummy $tool_basename; ac_word=$2
6300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6301$as_echo_n "checking for $ac_word... " >&6; }
6302if ${ac_cv_path_COMM+:} false; then :
6303  $as_echo_n "(cached) " >&6
6304else
6305  case $COMM in
6306  [\\/]* | ?:[\\/]*)
6307  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6308  ;;
6309  *)
6310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6311for as_dir in $PATH
6312do
6313  IFS=$as_save_IFS
6314  test -z "$as_dir" && as_dir=.
6315    for ac_exec_ext in '' $ac_executable_extensions; do
6316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6317    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6319    break 2
6320  fi
6321done
6322  done
6323IFS=$as_save_IFS
6324
6325  ;;
6326esac
6327fi
6328COMM=$ac_cv_path_COMM
6329if test -n "$COMM"; then
6330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6331$as_echo "$COMM" >&6; }
6332else
6333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6334$as_echo "no" >&6; }
6335fi
6336
6337
6338          if test "x$COMM" = x; then
6339            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6340          fi
6341        else
6342          # Otherwise we believe it is a complete path. Use it as it is.
6343          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6344$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6345          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6346$as_echo_n "checking for COMM... " >&6; }
6347          if test ! -x "$tool_specified"; then
6348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6349$as_echo "not found" >&6; }
6350            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6351          fi
6352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6353$as_echo "$tool_specified" >&6; }
6354        fi
6355      fi
6356    fi
6357
6358  fi
6359
6360
6361
6362  if test "x$COMM" = x; then
6363    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6364  fi
6365
6366
6367
6368
6369
6370  # Publish this variable in the help.
6371
6372
6373  if [ -z "${CP+x}" ]; then
6374    # The variable is not set by user, try to locate tool using the code snippet
6375    for ac_prog in cp
6376do
6377  # Extract the first word of "$ac_prog", so it can be a program name with args.
6378set dummy $ac_prog; ac_word=$2
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6380$as_echo_n "checking for $ac_word... " >&6; }
6381if ${ac_cv_path_CP+:} false; then :
6382  $as_echo_n "(cached) " >&6
6383else
6384  case $CP in
6385  [\\/]* | ?:[\\/]*)
6386  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6387  ;;
6388  *)
6389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6390for as_dir in $PATH
6391do
6392  IFS=$as_save_IFS
6393  test -z "$as_dir" && as_dir=.
6394    for ac_exec_ext in '' $ac_executable_extensions; do
6395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6396    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6398    break 2
6399  fi
6400done
6401  done
6402IFS=$as_save_IFS
6403
6404  ;;
6405esac
6406fi
6407CP=$ac_cv_path_CP
6408if test -n "$CP"; then
6409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6410$as_echo "$CP" >&6; }
6411else
6412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413$as_echo "no" >&6; }
6414fi
6415
6416
6417  test -n "$CP" && break
6418done
6419
6420  else
6421    # The variable is set, but is it from the command line or the environment?
6422
6423    # Try to remove the string !CP! from our list.
6424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6426      # If it failed, the variable was not from the command line. Ignore it,
6427      # but warn the user (except for BASH, which is always set by the calling BASH).
6428      if test "xCP" != xBASH; then
6429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6430$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6431      fi
6432      # Try to locate tool using the code snippet
6433      for ac_prog in cp
6434do
6435  # Extract the first word of "$ac_prog", so it can be a program name with args.
6436set dummy $ac_prog; ac_word=$2
6437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6438$as_echo_n "checking for $ac_word... " >&6; }
6439if ${ac_cv_path_CP+:} false; then :
6440  $as_echo_n "(cached) " >&6
6441else
6442  case $CP in
6443  [\\/]* | ?:[\\/]*)
6444  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6445  ;;
6446  *)
6447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6448for as_dir in $PATH
6449do
6450  IFS=$as_save_IFS
6451  test -z "$as_dir" && as_dir=.
6452    for ac_exec_ext in '' $ac_executable_extensions; do
6453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6454    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6456    break 2
6457  fi
6458done
6459  done
6460IFS=$as_save_IFS
6461
6462  ;;
6463esac
6464fi
6465CP=$ac_cv_path_CP
6466if test -n "$CP"; then
6467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6468$as_echo "$CP" >&6; }
6469else
6470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6471$as_echo "no" >&6; }
6472fi
6473
6474
6475  test -n "$CP" && break
6476done
6477
6478    else
6479      # If it succeeded, then it was overridden by the user. We will use it
6480      # for the tool.
6481
6482      # First remove it from the list of overridden variables, so we can test
6483      # for unknown variables in the end.
6484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6485
6486      # Check if we try to supply an empty value
6487      if test "x$CP" = x; then
6488        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6489$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6491$as_echo_n "checking for CP... " >&6; }
6492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6493$as_echo "disabled" >&6; }
6494      else
6495        # Check if the provided tool contains a complete path.
6496        tool_specified="$CP"
6497        tool_basename="${tool_specified##*/}"
6498        if test "x$tool_basename" = "x$tool_specified"; then
6499          # A command without a complete path is provided, search $PATH.
6500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6501$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6502          # Extract the first word of "$tool_basename", so it can be a program name with args.
6503set dummy $tool_basename; ac_word=$2
6504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6505$as_echo_n "checking for $ac_word... " >&6; }
6506if ${ac_cv_path_CP+:} false; then :
6507  $as_echo_n "(cached) " >&6
6508else
6509  case $CP in
6510  [\\/]* | ?:[\\/]*)
6511  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6512  ;;
6513  *)
6514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6515for as_dir in $PATH
6516do
6517  IFS=$as_save_IFS
6518  test -z "$as_dir" && as_dir=.
6519    for ac_exec_ext in '' $ac_executable_extensions; do
6520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6521    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6523    break 2
6524  fi
6525done
6526  done
6527IFS=$as_save_IFS
6528
6529  ;;
6530esac
6531fi
6532CP=$ac_cv_path_CP
6533if test -n "$CP"; then
6534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6535$as_echo "$CP" >&6; }
6536else
6537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6538$as_echo "no" >&6; }
6539fi
6540
6541
6542          if test "x$CP" = x; then
6543            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6544          fi
6545        else
6546          # Otherwise we believe it is a complete path. Use it as it is.
6547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6548$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6549          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6550$as_echo_n "checking for CP... " >&6; }
6551          if test ! -x "$tool_specified"; then
6552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6553$as_echo "not found" >&6; }
6554            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6555          fi
6556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6557$as_echo "$tool_specified" >&6; }
6558        fi
6559      fi
6560    fi
6561
6562  fi
6563
6564
6565
6566  if test "x$CP" = x; then
6567    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6568  fi
6569
6570
6571
6572
6573
6574  # Publish this variable in the help.
6575
6576
6577  if [ -z "${CUT+x}" ]; then
6578    # The variable is not set by user, try to locate tool using the code snippet
6579    for ac_prog in cut
6580do
6581  # Extract the first word of "$ac_prog", so it can be a program name with args.
6582set dummy $ac_prog; ac_word=$2
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6584$as_echo_n "checking for $ac_word... " >&6; }
6585if ${ac_cv_path_CUT+:} false; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  case $CUT in
6589  [\\/]* | ?:[\\/]*)
6590  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6591  ;;
6592  *)
6593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6594for as_dir in $PATH
6595do
6596  IFS=$as_save_IFS
6597  test -z "$as_dir" && as_dir=.
6598    for ac_exec_ext in '' $ac_executable_extensions; do
6599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6600    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6602    break 2
6603  fi
6604done
6605  done
6606IFS=$as_save_IFS
6607
6608  ;;
6609esac
6610fi
6611CUT=$ac_cv_path_CUT
6612if test -n "$CUT"; then
6613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6614$as_echo "$CUT" >&6; }
6615else
6616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6617$as_echo "no" >&6; }
6618fi
6619
6620
6621  test -n "$CUT" && break
6622done
6623
6624  else
6625    # The variable is set, but is it from the command line or the environment?
6626
6627    # Try to remove the string !CUT! from our list.
6628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6630      # If it failed, the variable was not from the command line. Ignore it,
6631      # but warn the user (except for BASH, which is always set by the calling BASH).
6632      if test "xCUT" != xBASH; then
6633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6634$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6635      fi
6636      # Try to locate tool using the code snippet
6637      for ac_prog in cut
6638do
6639  # Extract the first word of "$ac_prog", so it can be a program name with args.
6640set dummy $ac_prog; ac_word=$2
6641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6642$as_echo_n "checking for $ac_word... " >&6; }
6643if ${ac_cv_path_CUT+:} false; then :
6644  $as_echo_n "(cached) " >&6
6645else
6646  case $CUT in
6647  [\\/]* | ?:[\\/]*)
6648  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6649  ;;
6650  *)
6651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6652for as_dir in $PATH
6653do
6654  IFS=$as_save_IFS
6655  test -z "$as_dir" && as_dir=.
6656    for ac_exec_ext in '' $ac_executable_extensions; do
6657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6658    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6660    break 2
6661  fi
6662done
6663  done
6664IFS=$as_save_IFS
6665
6666  ;;
6667esac
6668fi
6669CUT=$ac_cv_path_CUT
6670if test -n "$CUT"; then
6671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6672$as_echo "$CUT" >&6; }
6673else
6674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6675$as_echo "no" >&6; }
6676fi
6677
6678
6679  test -n "$CUT" && break
6680done
6681
6682    else
6683      # If it succeeded, then it was overridden by the user. We will use it
6684      # for the tool.
6685
6686      # First remove it from the list of overridden variables, so we can test
6687      # for unknown variables in the end.
6688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6689
6690      # Check if we try to supply an empty value
6691      if test "x$CUT" = x; then
6692        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6693$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6695$as_echo_n "checking for CUT... " >&6; }
6696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6697$as_echo "disabled" >&6; }
6698      else
6699        # Check if the provided tool contains a complete path.
6700        tool_specified="$CUT"
6701        tool_basename="${tool_specified##*/}"
6702        if test "x$tool_basename" = "x$tool_specified"; then
6703          # A command without a complete path is provided, search $PATH.
6704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6705$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6706          # Extract the first word of "$tool_basename", so it can be a program name with args.
6707set dummy $tool_basename; ac_word=$2
6708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6709$as_echo_n "checking for $ac_word... " >&6; }
6710if ${ac_cv_path_CUT+:} false; then :
6711  $as_echo_n "(cached) " >&6
6712else
6713  case $CUT in
6714  [\\/]* | ?:[\\/]*)
6715  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6716  ;;
6717  *)
6718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6719for as_dir in $PATH
6720do
6721  IFS=$as_save_IFS
6722  test -z "$as_dir" && as_dir=.
6723    for ac_exec_ext in '' $ac_executable_extensions; do
6724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6725    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6727    break 2
6728  fi
6729done
6730  done
6731IFS=$as_save_IFS
6732
6733  ;;
6734esac
6735fi
6736CUT=$ac_cv_path_CUT
6737if test -n "$CUT"; then
6738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6739$as_echo "$CUT" >&6; }
6740else
6741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6742$as_echo "no" >&6; }
6743fi
6744
6745
6746          if test "x$CUT" = x; then
6747            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6748          fi
6749        else
6750          # Otherwise we believe it is a complete path. Use it as it is.
6751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6752$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6753          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6754$as_echo_n "checking for CUT... " >&6; }
6755          if test ! -x "$tool_specified"; then
6756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6757$as_echo "not found" >&6; }
6758            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6759          fi
6760          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6761$as_echo "$tool_specified" >&6; }
6762        fi
6763      fi
6764    fi
6765
6766  fi
6767
6768
6769
6770  if test "x$CUT" = x; then
6771    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6772  fi
6773
6774
6775
6776
6777
6778  # Publish this variable in the help.
6779
6780
6781  if [ -z "${DATE+x}" ]; then
6782    # The variable is not set by user, try to locate tool using the code snippet
6783    for ac_prog in date
6784do
6785  # Extract the first word of "$ac_prog", so it can be a program name with args.
6786set dummy $ac_prog; ac_word=$2
6787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6788$as_echo_n "checking for $ac_word... " >&6; }
6789if ${ac_cv_path_DATE+:} false; then :
6790  $as_echo_n "(cached) " >&6
6791else
6792  case $DATE in
6793  [\\/]* | ?:[\\/]*)
6794  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6795  ;;
6796  *)
6797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6798for as_dir in $PATH
6799do
6800  IFS=$as_save_IFS
6801  test -z "$as_dir" && as_dir=.
6802    for ac_exec_ext in '' $ac_executable_extensions; do
6803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6804    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6806    break 2
6807  fi
6808done
6809  done
6810IFS=$as_save_IFS
6811
6812  ;;
6813esac
6814fi
6815DATE=$ac_cv_path_DATE
6816if test -n "$DATE"; then
6817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6818$as_echo "$DATE" >&6; }
6819else
6820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6821$as_echo "no" >&6; }
6822fi
6823
6824
6825  test -n "$DATE" && break
6826done
6827
6828  else
6829    # The variable is set, but is it from the command line or the environment?
6830
6831    # Try to remove the string !DATE! from our list.
6832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6834      # If it failed, the variable was not from the command line. Ignore it,
6835      # but warn the user (except for BASH, which is always set by the calling BASH).
6836      if test "xDATE" != xBASH; then
6837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6838$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6839      fi
6840      # Try to locate tool using the code snippet
6841      for ac_prog in date
6842do
6843  # Extract the first word of "$ac_prog", so it can be a program name with args.
6844set dummy $ac_prog; ac_word=$2
6845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6846$as_echo_n "checking for $ac_word... " >&6; }
6847if ${ac_cv_path_DATE+:} false; then :
6848  $as_echo_n "(cached) " >&6
6849else
6850  case $DATE in
6851  [\\/]* | ?:[\\/]*)
6852  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6853  ;;
6854  *)
6855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6856for as_dir in $PATH
6857do
6858  IFS=$as_save_IFS
6859  test -z "$as_dir" && as_dir=.
6860    for ac_exec_ext in '' $ac_executable_extensions; do
6861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6862    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6864    break 2
6865  fi
6866done
6867  done
6868IFS=$as_save_IFS
6869
6870  ;;
6871esac
6872fi
6873DATE=$ac_cv_path_DATE
6874if test -n "$DATE"; then
6875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6876$as_echo "$DATE" >&6; }
6877else
6878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6879$as_echo "no" >&6; }
6880fi
6881
6882
6883  test -n "$DATE" && break
6884done
6885
6886    else
6887      # If it succeeded, then it was overridden by the user. We will use it
6888      # for the tool.
6889
6890      # First remove it from the list of overridden variables, so we can test
6891      # for unknown variables in the end.
6892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6893
6894      # Check if we try to supply an empty value
6895      if test "x$DATE" = x; then
6896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6897$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6899$as_echo_n "checking for DATE... " >&6; }
6900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6901$as_echo "disabled" >&6; }
6902      else
6903        # Check if the provided tool contains a complete path.
6904        tool_specified="$DATE"
6905        tool_basename="${tool_specified##*/}"
6906        if test "x$tool_basename" = "x$tool_specified"; then
6907          # A command without a complete path is provided, search $PATH.
6908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6909$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6910          # Extract the first word of "$tool_basename", so it can be a program name with args.
6911set dummy $tool_basename; ac_word=$2
6912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6913$as_echo_n "checking for $ac_word... " >&6; }
6914if ${ac_cv_path_DATE+:} false; then :
6915  $as_echo_n "(cached) " >&6
6916else
6917  case $DATE in
6918  [\\/]* | ?:[\\/]*)
6919  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6920  ;;
6921  *)
6922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6923for as_dir in $PATH
6924do
6925  IFS=$as_save_IFS
6926  test -z "$as_dir" && as_dir=.
6927    for ac_exec_ext in '' $ac_executable_extensions; do
6928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6929    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6931    break 2
6932  fi
6933done
6934  done
6935IFS=$as_save_IFS
6936
6937  ;;
6938esac
6939fi
6940DATE=$ac_cv_path_DATE
6941if test -n "$DATE"; then
6942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6943$as_echo "$DATE" >&6; }
6944else
6945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6946$as_echo "no" >&6; }
6947fi
6948
6949
6950          if test "x$DATE" = x; then
6951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6952          fi
6953        else
6954          # Otherwise we believe it is a complete path. Use it as it is.
6955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6956$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6958$as_echo_n "checking for DATE... " >&6; }
6959          if test ! -x "$tool_specified"; then
6960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6961$as_echo "not found" >&6; }
6962            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6963          fi
6964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6965$as_echo "$tool_specified" >&6; }
6966        fi
6967      fi
6968    fi
6969
6970  fi
6971
6972
6973
6974  if test "x$DATE" = x; then
6975    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6976  fi
6977
6978
6979
6980
6981
6982  # Publish this variable in the help.
6983
6984
6985  if [ -z "${DIFF+x}" ]; then
6986    # The variable is not set by user, try to locate tool using the code snippet
6987    for ac_prog in gdiff diff
6988do
6989  # Extract the first word of "$ac_prog", so it can be a program name with args.
6990set dummy $ac_prog; ac_word=$2
6991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6992$as_echo_n "checking for $ac_word... " >&6; }
6993if ${ac_cv_path_DIFF+:} false; then :
6994  $as_echo_n "(cached) " >&6
6995else
6996  case $DIFF in
6997  [\\/]* | ?:[\\/]*)
6998  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6999  ;;
7000  *)
7001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7002for as_dir in $PATH
7003do
7004  IFS=$as_save_IFS
7005  test -z "$as_dir" && as_dir=.
7006    for ac_exec_ext in '' $ac_executable_extensions; do
7007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7008    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7010    break 2
7011  fi
7012done
7013  done
7014IFS=$as_save_IFS
7015
7016  ;;
7017esac
7018fi
7019DIFF=$ac_cv_path_DIFF
7020if test -n "$DIFF"; then
7021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7022$as_echo "$DIFF" >&6; }
7023else
7024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7025$as_echo "no" >&6; }
7026fi
7027
7028
7029  test -n "$DIFF" && break
7030done
7031
7032  else
7033    # The variable is set, but is it from the command line or the environment?
7034
7035    # Try to remove the string !DIFF! from our list.
7036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7038      # If it failed, the variable was not from the command line. Ignore it,
7039      # but warn the user (except for BASH, which is always set by the calling BASH).
7040      if test "xDIFF" != xBASH; then
7041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7042$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7043      fi
7044      # Try to locate tool using the code snippet
7045      for ac_prog in gdiff diff
7046do
7047  # Extract the first word of "$ac_prog", so it can be a program name with args.
7048set dummy $ac_prog; ac_word=$2
7049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7050$as_echo_n "checking for $ac_word... " >&6; }
7051if ${ac_cv_path_DIFF+:} false; then :
7052  $as_echo_n "(cached) " >&6
7053else
7054  case $DIFF in
7055  [\\/]* | ?:[\\/]*)
7056  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7057  ;;
7058  *)
7059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7060for as_dir in $PATH
7061do
7062  IFS=$as_save_IFS
7063  test -z "$as_dir" && as_dir=.
7064    for ac_exec_ext in '' $ac_executable_extensions; do
7065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7066    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7068    break 2
7069  fi
7070done
7071  done
7072IFS=$as_save_IFS
7073
7074  ;;
7075esac
7076fi
7077DIFF=$ac_cv_path_DIFF
7078if test -n "$DIFF"; then
7079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7080$as_echo "$DIFF" >&6; }
7081else
7082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7083$as_echo "no" >&6; }
7084fi
7085
7086
7087  test -n "$DIFF" && break
7088done
7089
7090    else
7091      # If it succeeded, then it was overridden by the user. We will use it
7092      # for the tool.
7093
7094      # First remove it from the list of overridden variables, so we can test
7095      # for unknown variables in the end.
7096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7097
7098      # Check if we try to supply an empty value
7099      if test "x$DIFF" = x; then
7100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7101$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7103$as_echo_n "checking for DIFF... " >&6; }
7104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7105$as_echo "disabled" >&6; }
7106      else
7107        # Check if the provided tool contains a complete path.
7108        tool_specified="$DIFF"
7109        tool_basename="${tool_specified##*/}"
7110        if test "x$tool_basename" = "x$tool_specified"; then
7111          # A command without a complete path is provided, search $PATH.
7112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7113$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7114          # Extract the first word of "$tool_basename", so it can be a program name with args.
7115set dummy $tool_basename; ac_word=$2
7116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7117$as_echo_n "checking for $ac_word... " >&6; }
7118if ${ac_cv_path_DIFF+:} false; then :
7119  $as_echo_n "(cached) " >&6
7120else
7121  case $DIFF in
7122  [\\/]* | ?:[\\/]*)
7123  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7124  ;;
7125  *)
7126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7127for as_dir in $PATH
7128do
7129  IFS=$as_save_IFS
7130  test -z "$as_dir" && as_dir=.
7131    for ac_exec_ext in '' $ac_executable_extensions; do
7132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7133    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7135    break 2
7136  fi
7137done
7138  done
7139IFS=$as_save_IFS
7140
7141  ;;
7142esac
7143fi
7144DIFF=$ac_cv_path_DIFF
7145if test -n "$DIFF"; then
7146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7147$as_echo "$DIFF" >&6; }
7148else
7149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7150$as_echo "no" >&6; }
7151fi
7152
7153
7154          if test "x$DIFF" = x; then
7155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7156          fi
7157        else
7158          # Otherwise we believe it is a complete path. Use it as it is.
7159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7160$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7162$as_echo_n "checking for DIFF... " >&6; }
7163          if test ! -x "$tool_specified"; then
7164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7165$as_echo "not found" >&6; }
7166            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7167          fi
7168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7169$as_echo "$tool_specified" >&6; }
7170        fi
7171      fi
7172    fi
7173
7174  fi
7175
7176
7177
7178  if test "x$DIFF" = x; then
7179    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7180  fi
7181
7182
7183
7184
7185
7186  # Publish this variable in the help.
7187
7188
7189  if [ -z "${DIRNAME+x}" ]; then
7190    # The variable is not set by user, try to locate tool using the code snippet
7191    for ac_prog in dirname
7192do
7193  # Extract the first word of "$ac_prog", so it can be a program name with args.
7194set dummy $ac_prog; ac_word=$2
7195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7196$as_echo_n "checking for $ac_word... " >&6; }
7197if ${ac_cv_path_DIRNAME+:} false; then :
7198  $as_echo_n "(cached) " >&6
7199else
7200  case $DIRNAME in
7201  [\\/]* | ?:[\\/]*)
7202  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7203  ;;
7204  *)
7205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7206for as_dir in $PATH
7207do
7208  IFS=$as_save_IFS
7209  test -z "$as_dir" && as_dir=.
7210    for ac_exec_ext in '' $ac_executable_extensions; do
7211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7212    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7214    break 2
7215  fi
7216done
7217  done
7218IFS=$as_save_IFS
7219
7220  ;;
7221esac
7222fi
7223DIRNAME=$ac_cv_path_DIRNAME
7224if test -n "$DIRNAME"; then
7225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7226$as_echo "$DIRNAME" >&6; }
7227else
7228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7229$as_echo "no" >&6; }
7230fi
7231
7232
7233  test -n "$DIRNAME" && break
7234done
7235
7236  else
7237    # The variable is set, but is it from the command line or the environment?
7238
7239    # Try to remove the string !DIRNAME! from our list.
7240    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7241    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7242      # If it failed, the variable was not from the command line. Ignore it,
7243      # but warn the user (except for BASH, which is always set by the calling BASH).
7244      if test "xDIRNAME" != xBASH; then
7245        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7246$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7247      fi
7248      # Try to locate tool using the code snippet
7249      for ac_prog in dirname
7250do
7251  # Extract the first word of "$ac_prog", so it can be a program name with args.
7252set dummy $ac_prog; ac_word=$2
7253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7254$as_echo_n "checking for $ac_word... " >&6; }
7255if ${ac_cv_path_DIRNAME+:} false; then :
7256  $as_echo_n "(cached) " >&6
7257else
7258  case $DIRNAME in
7259  [\\/]* | ?:[\\/]*)
7260  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7261  ;;
7262  *)
7263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7264for as_dir in $PATH
7265do
7266  IFS=$as_save_IFS
7267  test -z "$as_dir" && as_dir=.
7268    for ac_exec_ext in '' $ac_executable_extensions; do
7269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7270    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7272    break 2
7273  fi
7274done
7275  done
7276IFS=$as_save_IFS
7277
7278  ;;
7279esac
7280fi
7281DIRNAME=$ac_cv_path_DIRNAME
7282if test -n "$DIRNAME"; then
7283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7284$as_echo "$DIRNAME" >&6; }
7285else
7286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7287$as_echo "no" >&6; }
7288fi
7289
7290
7291  test -n "$DIRNAME" && break
7292done
7293
7294    else
7295      # If it succeeded, then it was overridden by the user. We will use it
7296      # for the tool.
7297
7298      # First remove it from the list of overridden variables, so we can test
7299      # for unknown variables in the end.
7300      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7301
7302      # Check if we try to supply an empty value
7303      if test "x$DIRNAME" = x; then
7304        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7305$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7306        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7307$as_echo_n "checking for DIRNAME... " >&6; }
7308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7309$as_echo "disabled" >&6; }
7310      else
7311        # Check if the provided tool contains a complete path.
7312        tool_specified="$DIRNAME"
7313        tool_basename="${tool_specified##*/}"
7314        if test "x$tool_basename" = "x$tool_specified"; then
7315          # A command without a complete path is provided, search $PATH.
7316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7317$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7318          # Extract the first word of "$tool_basename", so it can be a program name with args.
7319set dummy $tool_basename; ac_word=$2
7320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7321$as_echo_n "checking for $ac_word... " >&6; }
7322if ${ac_cv_path_DIRNAME+:} false; then :
7323  $as_echo_n "(cached) " >&6
7324else
7325  case $DIRNAME in
7326  [\\/]* | ?:[\\/]*)
7327  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7328  ;;
7329  *)
7330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7331for as_dir in $PATH
7332do
7333  IFS=$as_save_IFS
7334  test -z "$as_dir" && as_dir=.
7335    for ac_exec_ext in '' $ac_executable_extensions; do
7336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7337    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7339    break 2
7340  fi
7341done
7342  done
7343IFS=$as_save_IFS
7344
7345  ;;
7346esac
7347fi
7348DIRNAME=$ac_cv_path_DIRNAME
7349if test -n "$DIRNAME"; then
7350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7351$as_echo "$DIRNAME" >&6; }
7352else
7353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7354$as_echo "no" >&6; }
7355fi
7356
7357
7358          if test "x$DIRNAME" = x; then
7359            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7360          fi
7361        else
7362          # Otherwise we believe it is a complete path. Use it as it is.
7363          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7364$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7365          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7366$as_echo_n "checking for DIRNAME... " >&6; }
7367          if test ! -x "$tool_specified"; then
7368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7369$as_echo "not found" >&6; }
7370            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7371          fi
7372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7373$as_echo "$tool_specified" >&6; }
7374        fi
7375      fi
7376    fi
7377
7378  fi
7379
7380
7381
7382  if test "x$DIRNAME" = x; then
7383    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7384  fi
7385
7386
7387
7388
7389
7390  # Publish this variable in the help.
7391
7392
7393  if [ -z "${ECHO+x}" ]; then
7394    # The variable is not set by user, try to locate tool using the code snippet
7395    for ac_prog in echo
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_ECHO+:} false; then :
7402  $as_echo_n "(cached) " >&6
7403else
7404  case $ECHO in
7405  [\\/]* | ?:[\\/]*)
7406  ac_cv_path_ECHO="$ECHO" # 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_ECHO="$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
7427ECHO=$ac_cv_path_ECHO
7428if test -n "$ECHO"; then
7429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7430$as_echo "$ECHO" >&6; }
7431else
7432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7433$as_echo "no" >&6; }
7434fi
7435
7436
7437  test -n "$ECHO" && 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 !ECHO! from our list.
7444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
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 "xECHO" != xBASH; then
7449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7450$as_echo "$as_me: WARNING: Ignoring value of ECHO 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 echo
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_ECHO+:} false; then :
7460  $as_echo_n "(cached) " >&6
7461else
7462  case $ECHO in
7463  [\\/]* | ?:[\\/]*)
7464  ac_cv_path_ECHO="$ECHO" # 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_ECHO="$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
7485ECHO=$ac_cv_path_ECHO
7486if test -n "$ECHO"; then
7487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7488$as_echo "$ECHO" >&6; }
7489else
7490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7491$as_echo "no" >&6; }
7492fi
7493
7494
7495  test -n "$ECHO" && 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 we try to supply an empty value
7507      if test "x$ECHO" = x; then
7508        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7509$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7511$as_echo_n "checking for ECHO... " >&6; }
7512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7513$as_echo "disabled" >&6; }
7514      else
7515        # Check if the provided tool contains a complete path.
7516        tool_specified="$ECHO"
7517        tool_basename="${tool_specified##*/}"
7518        if test "x$tool_basename" = "x$tool_specified"; then
7519          # A command without a complete path is provided, search $PATH.
7520          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7521$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7522          # Extract the first word of "$tool_basename", so it can be a program name with args.
7523set dummy $tool_basename; ac_word=$2
7524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7525$as_echo_n "checking for $ac_word... " >&6; }
7526if ${ac_cv_path_ECHO+:} false; then :
7527  $as_echo_n "(cached) " >&6
7528else
7529  case $ECHO in
7530  [\\/]* | ?:[\\/]*)
7531  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7532  ;;
7533  *)
7534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7535for as_dir in $PATH
7536do
7537  IFS=$as_save_IFS
7538  test -z "$as_dir" && as_dir=.
7539    for ac_exec_ext in '' $ac_executable_extensions; do
7540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7541    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7543    break 2
7544  fi
7545done
7546  done
7547IFS=$as_save_IFS
7548
7549  ;;
7550esac
7551fi
7552ECHO=$ac_cv_path_ECHO
7553if test -n "$ECHO"; then
7554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7555$as_echo "$ECHO" >&6; }
7556else
7557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7558$as_echo "no" >&6; }
7559fi
7560
7561
7562          if test "x$ECHO" = x; then
7563            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7564          fi
7565        else
7566          # Otherwise we believe it is a complete path. Use it as it is.
7567          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7568$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7569          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7570$as_echo_n "checking for ECHO... " >&6; }
7571          if test ! -x "$tool_specified"; then
7572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7573$as_echo "not found" >&6; }
7574            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7575          fi
7576          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7577$as_echo "$tool_specified" >&6; }
7578        fi
7579      fi
7580    fi
7581
7582  fi
7583
7584
7585
7586  if test "x$ECHO" = x; then
7587    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7588  fi
7589
7590
7591
7592
7593
7594  # Publish this variable in the help.
7595
7596
7597  if [ -z "${EXPR+x}" ]; then
7598    # The variable is not set by user, try to locate tool using the code snippet
7599    for ac_prog in expr
7600do
7601  # Extract the first word of "$ac_prog", so it can be a program name with args.
7602set dummy $ac_prog; ac_word=$2
7603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7604$as_echo_n "checking for $ac_word... " >&6; }
7605if ${ac_cv_path_EXPR+:} false; then :
7606  $as_echo_n "(cached) " >&6
7607else
7608  case $EXPR in
7609  [\\/]* | ?:[\\/]*)
7610  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7611  ;;
7612  *)
7613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7614for as_dir in $PATH
7615do
7616  IFS=$as_save_IFS
7617  test -z "$as_dir" && as_dir=.
7618    for ac_exec_ext in '' $ac_executable_extensions; do
7619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7620    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7622    break 2
7623  fi
7624done
7625  done
7626IFS=$as_save_IFS
7627
7628  ;;
7629esac
7630fi
7631EXPR=$ac_cv_path_EXPR
7632if test -n "$EXPR"; then
7633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7634$as_echo "$EXPR" >&6; }
7635else
7636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7637$as_echo "no" >&6; }
7638fi
7639
7640
7641  test -n "$EXPR" && break
7642done
7643
7644  else
7645    # The variable is set, but is it from the command line or the environment?
7646
7647    # Try to remove the string !EXPR! from our list.
7648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7650      # If it failed, the variable was not from the command line. Ignore it,
7651      # but warn the user (except for BASH, which is always set by the calling BASH).
7652      if test "xEXPR" != xBASH; then
7653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7654$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7655      fi
7656      # Try to locate tool using the code snippet
7657      for ac_prog in expr
7658do
7659  # Extract the first word of "$ac_prog", so it can be a program name with args.
7660set dummy $ac_prog; ac_word=$2
7661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7662$as_echo_n "checking for $ac_word... " >&6; }
7663if ${ac_cv_path_EXPR+:} false; then :
7664  $as_echo_n "(cached) " >&6
7665else
7666  case $EXPR in
7667  [\\/]* | ?:[\\/]*)
7668  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7669  ;;
7670  *)
7671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7672for as_dir in $PATH
7673do
7674  IFS=$as_save_IFS
7675  test -z "$as_dir" && as_dir=.
7676    for ac_exec_ext in '' $ac_executable_extensions; do
7677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7678    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7680    break 2
7681  fi
7682done
7683  done
7684IFS=$as_save_IFS
7685
7686  ;;
7687esac
7688fi
7689EXPR=$ac_cv_path_EXPR
7690if test -n "$EXPR"; then
7691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7692$as_echo "$EXPR" >&6; }
7693else
7694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7695$as_echo "no" >&6; }
7696fi
7697
7698
7699  test -n "$EXPR" && break
7700done
7701
7702    else
7703      # If it succeeded, then it was overridden by the user. We will use it
7704      # for the tool.
7705
7706      # First remove it from the list of overridden variables, so we can test
7707      # for unknown variables in the end.
7708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7709
7710      # Check if we try to supply an empty value
7711      if test "x$EXPR" = x; then
7712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7713$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7715$as_echo_n "checking for EXPR... " >&6; }
7716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7717$as_echo "disabled" >&6; }
7718      else
7719        # Check if the provided tool contains a complete path.
7720        tool_specified="$EXPR"
7721        tool_basename="${tool_specified##*/}"
7722        if test "x$tool_basename" = "x$tool_specified"; then
7723          # A command without a complete path is provided, search $PATH.
7724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7725$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7726          # Extract the first word of "$tool_basename", so it can be a program name with args.
7727set dummy $tool_basename; ac_word=$2
7728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7729$as_echo_n "checking for $ac_word... " >&6; }
7730if ${ac_cv_path_EXPR+:} false; then :
7731  $as_echo_n "(cached) " >&6
7732else
7733  case $EXPR in
7734  [\\/]* | ?:[\\/]*)
7735  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7736  ;;
7737  *)
7738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7739for as_dir in $PATH
7740do
7741  IFS=$as_save_IFS
7742  test -z "$as_dir" && as_dir=.
7743    for ac_exec_ext in '' $ac_executable_extensions; do
7744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7745    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7747    break 2
7748  fi
7749done
7750  done
7751IFS=$as_save_IFS
7752
7753  ;;
7754esac
7755fi
7756EXPR=$ac_cv_path_EXPR
7757if test -n "$EXPR"; then
7758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7759$as_echo "$EXPR" >&6; }
7760else
7761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7762$as_echo "no" >&6; }
7763fi
7764
7765
7766          if test "x$EXPR" = x; then
7767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7768          fi
7769        else
7770          # Otherwise we believe it is a complete path. Use it as it is.
7771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7772$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7774$as_echo_n "checking for EXPR... " >&6; }
7775          if test ! -x "$tool_specified"; then
7776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7777$as_echo "not found" >&6; }
7778            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7779          fi
7780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7781$as_echo "$tool_specified" >&6; }
7782        fi
7783      fi
7784    fi
7785
7786  fi
7787
7788
7789
7790  if test "x$EXPR" = x; then
7791    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7792  fi
7793
7794
7795
7796
7797
7798  # Publish this variable in the help.
7799
7800
7801  if [ -z "${FILE+x}" ]; then
7802    # The variable is not set by user, try to locate tool using the code snippet
7803    for ac_prog in file
7804do
7805  # Extract the first word of "$ac_prog", so it can be a program name with args.
7806set dummy $ac_prog; ac_word=$2
7807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7808$as_echo_n "checking for $ac_word... " >&6; }
7809if ${ac_cv_path_FILE+:} false; then :
7810  $as_echo_n "(cached) " >&6
7811else
7812  case $FILE in
7813  [\\/]* | ?:[\\/]*)
7814  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7815  ;;
7816  *)
7817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7818for as_dir in $PATH
7819do
7820  IFS=$as_save_IFS
7821  test -z "$as_dir" && as_dir=.
7822    for ac_exec_ext in '' $ac_executable_extensions; do
7823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7824    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7826    break 2
7827  fi
7828done
7829  done
7830IFS=$as_save_IFS
7831
7832  ;;
7833esac
7834fi
7835FILE=$ac_cv_path_FILE
7836if test -n "$FILE"; then
7837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7838$as_echo "$FILE" >&6; }
7839else
7840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7841$as_echo "no" >&6; }
7842fi
7843
7844
7845  test -n "$FILE" && break
7846done
7847
7848  else
7849    # The variable is set, but is it from the command line or the environment?
7850
7851    # Try to remove the string !FILE! from our list.
7852    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7853    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7854      # If it failed, the variable was not from the command line. Ignore it,
7855      # but warn the user (except for BASH, which is always set by the calling BASH).
7856      if test "xFILE" != xBASH; then
7857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7858$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7859      fi
7860      # Try to locate tool using the code snippet
7861      for ac_prog in file
7862do
7863  # Extract the first word of "$ac_prog", so it can be a program name with args.
7864set dummy $ac_prog; ac_word=$2
7865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7866$as_echo_n "checking for $ac_word... " >&6; }
7867if ${ac_cv_path_FILE+:} false; then :
7868  $as_echo_n "(cached) " >&6
7869else
7870  case $FILE in
7871  [\\/]* | ?:[\\/]*)
7872  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7873  ;;
7874  *)
7875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7876for as_dir in $PATH
7877do
7878  IFS=$as_save_IFS
7879  test -z "$as_dir" && as_dir=.
7880    for ac_exec_ext in '' $ac_executable_extensions; do
7881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7882    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7884    break 2
7885  fi
7886done
7887  done
7888IFS=$as_save_IFS
7889
7890  ;;
7891esac
7892fi
7893FILE=$ac_cv_path_FILE
7894if test -n "$FILE"; then
7895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7896$as_echo "$FILE" >&6; }
7897else
7898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7899$as_echo "no" >&6; }
7900fi
7901
7902
7903  test -n "$FILE" && break
7904done
7905
7906    else
7907      # If it succeeded, then it was overridden by the user. We will use it
7908      # for the tool.
7909
7910      # First remove it from the list of overridden variables, so we can test
7911      # for unknown variables in the end.
7912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7913
7914      # Check if we try to supply an empty value
7915      if test "x$FILE" = x; then
7916        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7917$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7919$as_echo_n "checking for FILE... " >&6; }
7920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7921$as_echo "disabled" >&6; }
7922      else
7923        # Check if the provided tool contains a complete path.
7924        tool_specified="$FILE"
7925        tool_basename="${tool_specified##*/}"
7926        if test "x$tool_basename" = "x$tool_specified"; then
7927          # A command without a complete path is provided, search $PATH.
7928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7929$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7930          # Extract the first word of "$tool_basename", so it can be a program name with args.
7931set dummy $tool_basename; ac_word=$2
7932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7933$as_echo_n "checking for $ac_word... " >&6; }
7934if ${ac_cv_path_FILE+:} false; then :
7935  $as_echo_n "(cached) " >&6
7936else
7937  case $FILE in
7938  [\\/]* | ?:[\\/]*)
7939  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7940  ;;
7941  *)
7942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7943for as_dir in $PATH
7944do
7945  IFS=$as_save_IFS
7946  test -z "$as_dir" && as_dir=.
7947    for ac_exec_ext in '' $ac_executable_extensions; do
7948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7949    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7951    break 2
7952  fi
7953done
7954  done
7955IFS=$as_save_IFS
7956
7957  ;;
7958esac
7959fi
7960FILE=$ac_cv_path_FILE
7961if test -n "$FILE"; then
7962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7963$as_echo "$FILE" >&6; }
7964else
7965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7966$as_echo "no" >&6; }
7967fi
7968
7969
7970          if test "x$FILE" = x; then
7971            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7972          fi
7973        else
7974          # Otherwise we believe it is a complete path. Use it as it is.
7975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7976$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7977          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7978$as_echo_n "checking for FILE... " >&6; }
7979          if test ! -x "$tool_specified"; then
7980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7981$as_echo "not found" >&6; }
7982            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7983          fi
7984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7985$as_echo "$tool_specified" >&6; }
7986        fi
7987      fi
7988    fi
7989
7990  fi
7991
7992
7993
7994  if test "x$FILE" = x; then
7995    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7996  fi
7997
7998
7999
8000
8001
8002  # Publish this variable in the help.
8003
8004
8005  if [ -z "${FIND+x}" ]; then
8006    # The variable is not set by user, try to locate tool using the code snippet
8007    for ac_prog in find
8008do
8009  # Extract the first word of "$ac_prog", so it can be a program name with args.
8010set dummy $ac_prog; ac_word=$2
8011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8012$as_echo_n "checking for $ac_word... " >&6; }
8013if ${ac_cv_path_FIND+:} false; then :
8014  $as_echo_n "(cached) " >&6
8015else
8016  case $FIND in
8017  [\\/]* | ?:[\\/]*)
8018  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8019  ;;
8020  *)
8021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8022for as_dir in $PATH
8023do
8024  IFS=$as_save_IFS
8025  test -z "$as_dir" && as_dir=.
8026    for ac_exec_ext in '' $ac_executable_extensions; do
8027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8028    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8030    break 2
8031  fi
8032done
8033  done
8034IFS=$as_save_IFS
8035
8036  ;;
8037esac
8038fi
8039FIND=$ac_cv_path_FIND
8040if test -n "$FIND"; then
8041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8042$as_echo "$FIND" >&6; }
8043else
8044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8045$as_echo "no" >&6; }
8046fi
8047
8048
8049  test -n "$FIND" && break
8050done
8051
8052  else
8053    # The variable is set, but is it from the command line or the environment?
8054
8055    # Try to remove the string !FIND! from our list.
8056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8058      # If it failed, the variable was not from the command line. Ignore it,
8059      # but warn the user (except for BASH, which is always set by the calling BASH).
8060      if test "xFIND" != xBASH; then
8061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8062$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8063      fi
8064      # Try to locate tool using the code snippet
8065      for ac_prog in find
8066do
8067  # Extract the first word of "$ac_prog", so it can be a program name with args.
8068set dummy $ac_prog; ac_word=$2
8069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8070$as_echo_n "checking for $ac_word... " >&6; }
8071if ${ac_cv_path_FIND+:} false; then :
8072  $as_echo_n "(cached) " >&6
8073else
8074  case $FIND in
8075  [\\/]* | ?:[\\/]*)
8076  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8077  ;;
8078  *)
8079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8080for as_dir in $PATH
8081do
8082  IFS=$as_save_IFS
8083  test -z "$as_dir" && as_dir=.
8084    for ac_exec_ext in '' $ac_executable_extensions; do
8085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8086    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8088    break 2
8089  fi
8090done
8091  done
8092IFS=$as_save_IFS
8093
8094  ;;
8095esac
8096fi
8097FIND=$ac_cv_path_FIND
8098if test -n "$FIND"; then
8099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8100$as_echo "$FIND" >&6; }
8101else
8102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8103$as_echo "no" >&6; }
8104fi
8105
8106
8107  test -n "$FIND" && break
8108done
8109
8110    else
8111      # If it succeeded, then it was overridden by the user. We will use it
8112      # for the tool.
8113
8114      # First remove it from the list of overridden variables, so we can test
8115      # for unknown variables in the end.
8116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8117
8118      # Check if we try to supply an empty value
8119      if test "x$FIND" = x; then
8120        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8121$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8123$as_echo_n "checking for FIND... " >&6; }
8124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8125$as_echo "disabled" >&6; }
8126      else
8127        # Check if the provided tool contains a complete path.
8128        tool_specified="$FIND"
8129        tool_basename="${tool_specified##*/}"
8130        if test "x$tool_basename" = "x$tool_specified"; then
8131          # A command without a complete path is provided, search $PATH.
8132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8133$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8134          # Extract the first word of "$tool_basename", so it can be a program name with args.
8135set dummy $tool_basename; ac_word=$2
8136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8137$as_echo_n "checking for $ac_word... " >&6; }
8138if ${ac_cv_path_FIND+:} false; then :
8139  $as_echo_n "(cached) " >&6
8140else
8141  case $FIND in
8142  [\\/]* | ?:[\\/]*)
8143  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8144  ;;
8145  *)
8146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8147for as_dir in $PATH
8148do
8149  IFS=$as_save_IFS
8150  test -z "$as_dir" && as_dir=.
8151    for ac_exec_ext in '' $ac_executable_extensions; do
8152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8153    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8155    break 2
8156  fi
8157done
8158  done
8159IFS=$as_save_IFS
8160
8161  ;;
8162esac
8163fi
8164FIND=$ac_cv_path_FIND
8165if test -n "$FIND"; then
8166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8167$as_echo "$FIND" >&6; }
8168else
8169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8170$as_echo "no" >&6; }
8171fi
8172
8173
8174          if test "x$FIND" = x; then
8175            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8176          fi
8177        else
8178          # Otherwise we believe it is a complete path. Use it as it is.
8179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8180$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8181          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8182$as_echo_n "checking for FIND... " >&6; }
8183          if test ! -x "$tool_specified"; then
8184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8185$as_echo "not found" >&6; }
8186            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8187          fi
8188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8189$as_echo "$tool_specified" >&6; }
8190        fi
8191      fi
8192    fi
8193
8194  fi
8195
8196
8197
8198  if test "x$FIND" = x; then
8199    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8200  fi
8201
8202
8203
8204
8205
8206  # Publish this variable in the help.
8207
8208
8209  if [ -z "${HEAD+x}" ]; then
8210    # The variable is not set by user, try to locate tool using the code snippet
8211    for ac_prog in head
8212do
8213  # Extract the first word of "$ac_prog", so it can be a program name with args.
8214set dummy $ac_prog; ac_word=$2
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216$as_echo_n "checking for $ac_word... " >&6; }
8217if ${ac_cv_path_HEAD+:} false; then :
8218  $as_echo_n "(cached) " >&6
8219else
8220  case $HEAD in
8221  [\\/]* | ?:[\\/]*)
8222  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8223  ;;
8224  *)
8225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8226for as_dir in $PATH
8227do
8228  IFS=$as_save_IFS
8229  test -z "$as_dir" && as_dir=.
8230    for ac_exec_ext in '' $ac_executable_extensions; do
8231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8232    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8234    break 2
8235  fi
8236done
8237  done
8238IFS=$as_save_IFS
8239
8240  ;;
8241esac
8242fi
8243HEAD=$ac_cv_path_HEAD
8244if test -n "$HEAD"; then
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8246$as_echo "$HEAD" >&6; }
8247else
8248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8249$as_echo "no" >&6; }
8250fi
8251
8252
8253  test -n "$HEAD" && break
8254done
8255
8256  else
8257    # The variable is set, but is it from the command line or the environment?
8258
8259    # Try to remove the string !HEAD! from our list.
8260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8262      # If it failed, the variable was not from the command line. Ignore it,
8263      # but warn the user (except for BASH, which is always set by the calling BASH).
8264      if test "xHEAD" != xBASH; then
8265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8266$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8267      fi
8268      # Try to locate tool using the code snippet
8269      for ac_prog in head
8270do
8271  # Extract the first word of "$ac_prog", so it can be a program name with args.
8272set dummy $ac_prog; ac_word=$2
8273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8274$as_echo_n "checking for $ac_word... " >&6; }
8275if ${ac_cv_path_HEAD+:} false; then :
8276  $as_echo_n "(cached) " >&6
8277else
8278  case $HEAD in
8279  [\\/]* | ?:[\\/]*)
8280  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8281  ;;
8282  *)
8283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8284for as_dir in $PATH
8285do
8286  IFS=$as_save_IFS
8287  test -z "$as_dir" && as_dir=.
8288    for ac_exec_ext in '' $ac_executable_extensions; do
8289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8290    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8292    break 2
8293  fi
8294done
8295  done
8296IFS=$as_save_IFS
8297
8298  ;;
8299esac
8300fi
8301HEAD=$ac_cv_path_HEAD
8302if test -n "$HEAD"; then
8303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8304$as_echo "$HEAD" >&6; }
8305else
8306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8307$as_echo "no" >&6; }
8308fi
8309
8310
8311  test -n "$HEAD" && break
8312done
8313
8314    else
8315      # If it succeeded, then it was overridden by the user. We will use it
8316      # for the tool.
8317
8318      # First remove it from the list of overridden variables, so we can test
8319      # for unknown variables in the end.
8320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8321
8322      # Check if we try to supply an empty value
8323      if test "x$HEAD" = x; then
8324        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8325$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8326        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8327$as_echo_n "checking for HEAD... " >&6; }
8328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8329$as_echo "disabled" >&6; }
8330      else
8331        # Check if the provided tool contains a complete path.
8332        tool_specified="$HEAD"
8333        tool_basename="${tool_specified##*/}"
8334        if test "x$tool_basename" = "x$tool_specified"; then
8335          # A command without a complete path is provided, search $PATH.
8336          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8337$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8338          # Extract the first word of "$tool_basename", so it can be a program name with args.
8339set dummy $tool_basename; ac_word=$2
8340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8341$as_echo_n "checking for $ac_word... " >&6; }
8342if ${ac_cv_path_HEAD+:} false; then :
8343  $as_echo_n "(cached) " >&6
8344else
8345  case $HEAD in
8346  [\\/]* | ?:[\\/]*)
8347  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8348  ;;
8349  *)
8350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8351for as_dir in $PATH
8352do
8353  IFS=$as_save_IFS
8354  test -z "$as_dir" && as_dir=.
8355    for ac_exec_ext in '' $ac_executable_extensions; do
8356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8357    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8359    break 2
8360  fi
8361done
8362  done
8363IFS=$as_save_IFS
8364
8365  ;;
8366esac
8367fi
8368HEAD=$ac_cv_path_HEAD
8369if test -n "$HEAD"; then
8370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8371$as_echo "$HEAD" >&6; }
8372else
8373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8374$as_echo "no" >&6; }
8375fi
8376
8377
8378          if test "x$HEAD" = x; then
8379            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8380          fi
8381        else
8382          # Otherwise we believe it is a complete path. Use it as it is.
8383          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8384$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8385          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8386$as_echo_n "checking for HEAD... " >&6; }
8387          if test ! -x "$tool_specified"; then
8388            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8389$as_echo "not found" >&6; }
8390            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8391          fi
8392          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8393$as_echo "$tool_specified" >&6; }
8394        fi
8395      fi
8396    fi
8397
8398  fi
8399
8400
8401
8402  if test "x$HEAD" = x; then
8403    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8404  fi
8405
8406
8407
8408
8409
8410  # Publish this variable in the help.
8411
8412
8413  if [ -z "${GUNZIP+x}" ]; then
8414    # The variable is not set by user, try to locate tool using the code snippet
8415    for ac_prog in gunzip
8416do
8417  # Extract the first word of "$ac_prog", so it can be a program name with args.
8418set dummy $ac_prog; ac_word=$2
8419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8420$as_echo_n "checking for $ac_word... " >&6; }
8421if ${ac_cv_path_GUNZIP+:} false; then :
8422  $as_echo_n "(cached) " >&6
8423else
8424  case $GUNZIP in
8425  [\\/]* | ?:[\\/]*)
8426  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8427  ;;
8428  *)
8429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8430for as_dir in $PATH
8431do
8432  IFS=$as_save_IFS
8433  test -z "$as_dir" && as_dir=.
8434    for ac_exec_ext in '' $ac_executable_extensions; do
8435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8436    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8438    break 2
8439  fi
8440done
8441  done
8442IFS=$as_save_IFS
8443
8444  ;;
8445esac
8446fi
8447GUNZIP=$ac_cv_path_GUNZIP
8448if test -n "$GUNZIP"; then
8449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8450$as_echo "$GUNZIP" >&6; }
8451else
8452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8453$as_echo "no" >&6; }
8454fi
8455
8456
8457  test -n "$GUNZIP" && break
8458done
8459
8460  else
8461    # The variable is set, but is it from the command line or the environment?
8462
8463    # Try to remove the string !GUNZIP! from our list.
8464    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8465    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8466      # If it failed, the variable was not from the command line. Ignore it,
8467      # but warn the user (except for BASH, which is always set by the calling BASH).
8468      if test "xGUNZIP" != xBASH; then
8469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8470$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8471      fi
8472      # Try to locate tool using the code snippet
8473      for ac_prog in gunzip
8474do
8475  # Extract the first word of "$ac_prog", so it can be a program name with args.
8476set dummy $ac_prog; ac_word=$2
8477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8478$as_echo_n "checking for $ac_word... " >&6; }
8479if ${ac_cv_path_GUNZIP+:} false; then :
8480  $as_echo_n "(cached) " >&6
8481else
8482  case $GUNZIP in
8483  [\\/]* | ?:[\\/]*)
8484  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8485  ;;
8486  *)
8487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8488for as_dir in $PATH
8489do
8490  IFS=$as_save_IFS
8491  test -z "$as_dir" && as_dir=.
8492    for ac_exec_ext in '' $ac_executable_extensions; do
8493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8494    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8496    break 2
8497  fi
8498done
8499  done
8500IFS=$as_save_IFS
8501
8502  ;;
8503esac
8504fi
8505GUNZIP=$ac_cv_path_GUNZIP
8506if test -n "$GUNZIP"; then
8507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8508$as_echo "$GUNZIP" >&6; }
8509else
8510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8511$as_echo "no" >&6; }
8512fi
8513
8514
8515  test -n "$GUNZIP" && break
8516done
8517
8518    else
8519      # If it succeeded, then it was overridden by the user. We will use it
8520      # for the tool.
8521
8522      # First remove it from the list of overridden variables, so we can test
8523      # for unknown variables in the end.
8524      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8525
8526      # Check if we try to supply an empty value
8527      if test "x$GUNZIP" = x; then
8528        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8529$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8531$as_echo_n "checking for GUNZIP... " >&6; }
8532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8533$as_echo "disabled" >&6; }
8534      else
8535        # Check if the provided tool contains a complete path.
8536        tool_specified="$GUNZIP"
8537        tool_basename="${tool_specified##*/}"
8538        if test "x$tool_basename" = "x$tool_specified"; then
8539          # A command without a complete path is provided, search $PATH.
8540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8541$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8542          # Extract the first word of "$tool_basename", so it can be a program name with args.
8543set dummy $tool_basename; ac_word=$2
8544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8545$as_echo_n "checking for $ac_word... " >&6; }
8546if ${ac_cv_path_GUNZIP+:} false; then :
8547  $as_echo_n "(cached) " >&6
8548else
8549  case $GUNZIP in
8550  [\\/]* | ?:[\\/]*)
8551  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8552  ;;
8553  *)
8554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8555for as_dir in $PATH
8556do
8557  IFS=$as_save_IFS
8558  test -z "$as_dir" && as_dir=.
8559    for ac_exec_ext in '' $ac_executable_extensions; do
8560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8561    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8563    break 2
8564  fi
8565done
8566  done
8567IFS=$as_save_IFS
8568
8569  ;;
8570esac
8571fi
8572GUNZIP=$ac_cv_path_GUNZIP
8573if test -n "$GUNZIP"; then
8574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8575$as_echo "$GUNZIP" >&6; }
8576else
8577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8578$as_echo "no" >&6; }
8579fi
8580
8581
8582          if test "x$GUNZIP" = x; then
8583            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8584          fi
8585        else
8586          # Otherwise we believe it is a complete path. Use it as it is.
8587          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8588$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8589          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8590$as_echo_n "checking for GUNZIP... " >&6; }
8591          if test ! -x "$tool_specified"; then
8592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8593$as_echo "not found" >&6; }
8594            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8595          fi
8596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8597$as_echo "$tool_specified" >&6; }
8598        fi
8599      fi
8600    fi
8601
8602  fi
8603
8604
8605
8606  if test "x$GUNZIP" = x; then
8607    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8608  fi
8609
8610
8611
8612
8613
8614  # Publish this variable in the help.
8615
8616
8617  if [ -z "${GZIP+x}" ]; then
8618    # The variable is not set by user, try to locate tool using the code snippet
8619    for ac_prog in pigz gzip
8620do
8621  # Extract the first word of "$ac_prog", so it can be a program name with args.
8622set dummy $ac_prog; ac_word=$2
8623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8624$as_echo_n "checking for $ac_word... " >&6; }
8625if ${ac_cv_path_GZIP+:} false; then :
8626  $as_echo_n "(cached) " >&6
8627else
8628  case $GZIP in
8629  [\\/]* | ?:[\\/]*)
8630  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8631  ;;
8632  *)
8633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8634for as_dir in $PATH
8635do
8636  IFS=$as_save_IFS
8637  test -z "$as_dir" && as_dir=.
8638    for ac_exec_ext in '' $ac_executable_extensions; do
8639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8640    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8642    break 2
8643  fi
8644done
8645  done
8646IFS=$as_save_IFS
8647
8648  ;;
8649esac
8650fi
8651GZIP=$ac_cv_path_GZIP
8652if test -n "$GZIP"; then
8653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8654$as_echo "$GZIP" >&6; }
8655else
8656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8657$as_echo "no" >&6; }
8658fi
8659
8660
8661  test -n "$GZIP" && break
8662done
8663
8664  else
8665    # The variable is set, but is it from the command line or the environment?
8666
8667    # Try to remove the string !GZIP! from our list.
8668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8670      # If it failed, the variable was not from the command line. Ignore it,
8671      # but warn the user (except for BASH, which is always set by the calling BASH).
8672      if test "xGZIP" != xBASH; then
8673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8674$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8675      fi
8676      # Try to locate tool using the code snippet
8677      for ac_prog in pigz gzip
8678do
8679  # Extract the first word of "$ac_prog", so it can be a program name with args.
8680set dummy $ac_prog; ac_word=$2
8681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8682$as_echo_n "checking for $ac_word... " >&6; }
8683if ${ac_cv_path_GZIP+:} false; then :
8684  $as_echo_n "(cached) " >&6
8685else
8686  case $GZIP in
8687  [\\/]* | ?:[\\/]*)
8688  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8689  ;;
8690  *)
8691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8692for as_dir in $PATH
8693do
8694  IFS=$as_save_IFS
8695  test -z "$as_dir" && as_dir=.
8696    for ac_exec_ext in '' $ac_executable_extensions; do
8697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8698    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8700    break 2
8701  fi
8702done
8703  done
8704IFS=$as_save_IFS
8705
8706  ;;
8707esac
8708fi
8709GZIP=$ac_cv_path_GZIP
8710if test -n "$GZIP"; then
8711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8712$as_echo "$GZIP" >&6; }
8713else
8714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8715$as_echo "no" >&6; }
8716fi
8717
8718
8719  test -n "$GZIP" && break
8720done
8721
8722    else
8723      # If it succeeded, then it was overridden by the user. We will use it
8724      # for the tool.
8725
8726      # First remove it from the list of overridden variables, so we can test
8727      # for unknown variables in the end.
8728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8729
8730      # Check if we try to supply an empty value
8731      if test "x$GZIP" = x; then
8732        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8733$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8735$as_echo_n "checking for GZIP... " >&6; }
8736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8737$as_echo "disabled" >&6; }
8738      else
8739        # Check if the provided tool contains a complete path.
8740        tool_specified="$GZIP"
8741        tool_basename="${tool_specified##*/}"
8742        if test "x$tool_basename" = "x$tool_specified"; then
8743          # A command without a complete path is provided, search $PATH.
8744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8745$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8746          # Extract the first word of "$tool_basename", so it can be a program name with args.
8747set dummy $tool_basename; ac_word=$2
8748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8749$as_echo_n "checking for $ac_word... " >&6; }
8750if ${ac_cv_path_GZIP+:} false; then :
8751  $as_echo_n "(cached) " >&6
8752else
8753  case $GZIP in
8754  [\\/]* | ?:[\\/]*)
8755  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8756  ;;
8757  *)
8758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8759for as_dir in $PATH
8760do
8761  IFS=$as_save_IFS
8762  test -z "$as_dir" && as_dir=.
8763    for ac_exec_ext in '' $ac_executable_extensions; do
8764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8765    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8767    break 2
8768  fi
8769done
8770  done
8771IFS=$as_save_IFS
8772
8773  ;;
8774esac
8775fi
8776GZIP=$ac_cv_path_GZIP
8777if test -n "$GZIP"; then
8778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8779$as_echo "$GZIP" >&6; }
8780else
8781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8782$as_echo "no" >&6; }
8783fi
8784
8785
8786          if test "x$GZIP" = x; then
8787            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8788          fi
8789        else
8790          # Otherwise we believe it is a complete path. Use it as it is.
8791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8792$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8793          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8794$as_echo_n "checking for GZIP... " >&6; }
8795          if test ! -x "$tool_specified"; then
8796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8797$as_echo "not found" >&6; }
8798            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8799          fi
8800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8801$as_echo "$tool_specified" >&6; }
8802        fi
8803      fi
8804    fi
8805
8806  fi
8807
8808
8809
8810  if test "x$GZIP" = x; then
8811    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8812  fi
8813
8814
8815
8816
8817
8818  # Publish this variable in the help.
8819
8820
8821  if [ -z "${LN+x}" ]; then
8822    # The variable is not set by user, try to locate tool using the code snippet
8823    for ac_prog in ln
8824do
8825  # Extract the first word of "$ac_prog", so it can be a program name with args.
8826set dummy $ac_prog; ac_word=$2
8827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8828$as_echo_n "checking for $ac_word... " >&6; }
8829if ${ac_cv_path_LN+:} false; then :
8830  $as_echo_n "(cached) " >&6
8831else
8832  case $LN in
8833  [\\/]* | ?:[\\/]*)
8834  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8835  ;;
8836  *)
8837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8838for as_dir in $PATH
8839do
8840  IFS=$as_save_IFS
8841  test -z "$as_dir" && as_dir=.
8842    for ac_exec_ext in '' $ac_executable_extensions; do
8843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8844    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8846    break 2
8847  fi
8848done
8849  done
8850IFS=$as_save_IFS
8851
8852  ;;
8853esac
8854fi
8855LN=$ac_cv_path_LN
8856if test -n "$LN"; then
8857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8858$as_echo "$LN" >&6; }
8859else
8860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8861$as_echo "no" >&6; }
8862fi
8863
8864
8865  test -n "$LN" && break
8866done
8867
8868  else
8869    # The variable is set, but is it from the command line or the environment?
8870
8871    # Try to remove the string !LN! from our list.
8872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8874      # If it failed, the variable was not from the command line. Ignore it,
8875      # but warn the user (except for BASH, which is always set by the calling BASH).
8876      if test "xLN" != xBASH; then
8877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8878$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8879      fi
8880      # Try to locate tool using the code snippet
8881      for ac_prog in ln
8882do
8883  # Extract the first word of "$ac_prog", so it can be a program name with args.
8884set dummy $ac_prog; ac_word=$2
8885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8886$as_echo_n "checking for $ac_word... " >&6; }
8887if ${ac_cv_path_LN+:} false; then :
8888  $as_echo_n "(cached) " >&6
8889else
8890  case $LN in
8891  [\\/]* | ?:[\\/]*)
8892  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8893  ;;
8894  *)
8895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8896for as_dir in $PATH
8897do
8898  IFS=$as_save_IFS
8899  test -z "$as_dir" && as_dir=.
8900    for ac_exec_ext in '' $ac_executable_extensions; do
8901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8902    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8904    break 2
8905  fi
8906done
8907  done
8908IFS=$as_save_IFS
8909
8910  ;;
8911esac
8912fi
8913LN=$ac_cv_path_LN
8914if test -n "$LN"; then
8915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8916$as_echo "$LN" >&6; }
8917else
8918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8919$as_echo "no" >&6; }
8920fi
8921
8922
8923  test -n "$LN" && break
8924done
8925
8926    else
8927      # If it succeeded, then it was overridden by the user. We will use it
8928      # for the tool.
8929
8930      # First remove it from the list of overridden variables, so we can test
8931      # for unknown variables in the end.
8932      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8933
8934      # Check if we try to supply an empty value
8935      if test "x$LN" = x; then
8936        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8937$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8938        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8939$as_echo_n "checking for LN... " >&6; }
8940        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8941$as_echo "disabled" >&6; }
8942      else
8943        # Check if the provided tool contains a complete path.
8944        tool_specified="$LN"
8945        tool_basename="${tool_specified##*/}"
8946        if test "x$tool_basename" = "x$tool_specified"; then
8947          # A command without a complete path is provided, search $PATH.
8948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8949$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8950          # Extract the first word of "$tool_basename", so it can be a program name with args.
8951set dummy $tool_basename; ac_word=$2
8952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8953$as_echo_n "checking for $ac_word... " >&6; }
8954if ${ac_cv_path_LN+:} false; then :
8955  $as_echo_n "(cached) " >&6
8956else
8957  case $LN in
8958  [\\/]* | ?:[\\/]*)
8959  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8960  ;;
8961  *)
8962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8963for as_dir in $PATH
8964do
8965  IFS=$as_save_IFS
8966  test -z "$as_dir" && as_dir=.
8967    for ac_exec_ext in '' $ac_executable_extensions; do
8968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8969    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8971    break 2
8972  fi
8973done
8974  done
8975IFS=$as_save_IFS
8976
8977  ;;
8978esac
8979fi
8980LN=$ac_cv_path_LN
8981if test -n "$LN"; then
8982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8983$as_echo "$LN" >&6; }
8984else
8985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8986$as_echo "no" >&6; }
8987fi
8988
8989
8990          if test "x$LN" = x; then
8991            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8992          fi
8993        else
8994          # Otherwise we believe it is a complete path. Use it as it is.
8995          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8996$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8997          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8998$as_echo_n "checking for LN... " >&6; }
8999          if test ! -x "$tool_specified"; then
9000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9001$as_echo "not found" >&6; }
9002            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9003          fi
9004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9005$as_echo "$tool_specified" >&6; }
9006        fi
9007      fi
9008    fi
9009
9010  fi
9011
9012
9013
9014  if test "x$LN" = x; then
9015    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9016  fi
9017
9018
9019
9020
9021
9022  # Publish this variable in the help.
9023
9024
9025  if [ -z "${LS+x}" ]; then
9026    # The variable is not set by user, try to locate tool using the code snippet
9027    for ac_prog in ls
9028do
9029  # Extract the first word of "$ac_prog", so it can be a program name with args.
9030set dummy $ac_prog; ac_word=$2
9031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9032$as_echo_n "checking for $ac_word... " >&6; }
9033if ${ac_cv_path_LS+:} false; then :
9034  $as_echo_n "(cached) " >&6
9035else
9036  case $LS in
9037  [\\/]* | ?:[\\/]*)
9038  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9039  ;;
9040  *)
9041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9042for as_dir in $PATH
9043do
9044  IFS=$as_save_IFS
9045  test -z "$as_dir" && as_dir=.
9046    for ac_exec_ext in '' $ac_executable_extensions; do
9047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9048    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9050    break 2
9051  fi
9052done
9053  done
9054IFS=$as_save_IFS
9055
9056  ;;
9057esac
9058fi
9059LS=$ac_cv_path_LS
9060if test -n "$LS"; then
9061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9062$as_echo "$LS" >&6; }
9063else
9064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9065$as_echo "no" >&6; }
9066fi
9067
9068
9069  test -n "$LS" && break
9070done
9071
9072  else
9073    # The variable is set, but is it from the command line or the environment?
9074
9075    # Try to remove the string !LS! from our list.
9076    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9077    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9078      # If it failed, the variable was not from the command line. Ignore it,
9079      # but warn the user (except for BASH, which is always set by the calling BASH).
9080      if test "xLS" != xBASH; then
9081        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9082$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9083      fi
9084      # Try to locate tool using the code snippet
9085      for ac_prog in ls
9086do
9087  # Extract the first word of "$ac_prog", so it can be a program name with args.
9088set dummy $ac_prog; ac_word=$2
9089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9090$as_echo_n "checking for $ac_word... " >&6; }
9091if ${ac_cv_path_LS+:} false; then :
9092  $as_echo_n "(cached) " >&6
9093else
9094  case $LS in
9095  [\\/]* | ?:[\\/]*)
9096  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9097  ;;
9098  *)
9099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9100for as_dir in $PATH
9101do
9102  IFS=$as_save_IFS
9103  test -z "$as_dir" && as_dir=.
9104    for ac_exec_ext in '' $ac_executable_extensions; do
9105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9106    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9108    break 2
9109  fi
9110done
9111  done
9112IFS=$as_save_IFS
9113
9114  ;;
9115esac
9116fi
9117LS=$ac_cv_path_LS
9118if test -n "$LS"; then
9119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9120$as_echo "$LS" >&6; }
9121else
9122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9123$as_echo "no" >&6; }
9124fi
9125
9126
9127  test -n "$LS" && break
9128done
9129
9130    else
9131      # If it succeeded, then it was overridden by the user. We will use it
9132      # for the tool.
9133
9134      # First remove it from the list of overridden variables, so we can test
9135      # for unknown variables in the end.
9136      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9137
9138      # Check if we try to supply an empty value
9139      if test "x$LS" = x; then
9140        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9141$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9142        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9143$as_echo_n "checking for LS... " >&6; }
9144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9145$as_echo "disabled" >&6; }
9146      else
9147        # Check if the provided tool contains a complete path.
9148        tool_specified="$LS"
9149        tool_basename="${tool_specified##*/}"
9150        if test "x$tool_basename" = "x$tool_specified"; then
9151          # A command without a complete path is provided, search $PATH.
9152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9153$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9154          # Extract the first word of "$tool_basename", so it can be a program name with args.
9155set dummy $tool_basename; ac_word=$2
9156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9157$as_echo_n "checking for $ac_word... " >&6; }
9158if ${ac_cv_path_LS+:} false; then :
9159  $as_echo_n "(cached) " >&6
9160else
9161  case $LS in
9162  [\\/]* | ?:[\\/]*)
9163  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9164  ;;
9165  *)
9166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9167for as_dir in $PATH
9168do
9169  IFS=$as_save_IFS
9170  test -z "$as_dir" && as_dir=.
9171    for ac_exec_ext in '' $ac_executable_extensions; do
9172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9173    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9175    break 2
9176  fi
9177done
9178  done
9179IFS=$as_save_IFS
9180
9181  ;;
9182esac
9183fi
9184LS=$ac_cv_path_LS
9185if test -n "$LS"; then
9186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9187$as_echo "$LS" >&6; }
9188else
9189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9190$as_echo "no" >&6; }
9191fi
9192
9193
9194          if test "x$LS" = x; then
9195            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9196          fi
9197        else
9198          # Otherwise we believe it is a complete path. Use it as it is.
9199          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9200$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9201          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9202$as_echo_n "checking for LS... " >&6; }
9203          if test ! -x "$tool_specified"; then
9204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9205$as_echo "not found" >&6; }
9206            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9207          fi
9208          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9209$as_echo "$tool_specified" >&6; }
9210        fi
9211      fi
9212    fi
9213
9214  fi
9215
9216
9217
9218  if test "x$LS" = x; then
9219    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9220  fi
9221
9222
9223
9224
9225
9226  # Publish this variable in the help.
9227
9228
9229  if [ -z "${MKDIR+x}" ]; then
9230    # The variable is not set by user, try to locate tool using the code snippet
9231    for ac_prog in mkdir
9232do
9233  # Extract the first word of "$ac_prog", so it can be a program name with args.
9234set dummy $ac_prog; ac_word=$2
9235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9236$as_echo_n "checking for $ac_word... " >&6; }
9237if ${ac_cv_path_MKDIR+:} false; then :
9238  $as_echo_n "(cached) " >&6
9239else
9240  case $MKDIR in
9241  [\\/]* | ?:[\\/]*)
9242  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9243  ;;
9244  *)
9245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9246for as_dir in $PATH
9247do
9248  IFS=$as_save_IFS
9249  test -z "$as_dir" && as_dir=.
9250    for ac_exec_ext in '' $ac_executable_extensions; do
9251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9252    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9254    break 2
9255  fi
9256done
9257  done
9258IFS=$as_save_IFS
9259
9260  ;;
9261esac
9262fi
9263MKDIR=$ac_cv_path_MKDIR
9264if test -n "$MKDIR"; then
9265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9266$as_echo "$MKDIR" >&6; }
9267else
9268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9269$as_echo "no" >&6; }
9270fi
9271
9272
9273  test -n "$MKDIR" && break
9274done
9275
9276  else
9277    # The variable is set, but is it from the command line or the environment?
9278
9279    # Try to remove the string !MKDIR! from our list.
9280    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9281    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9282      # If it failed, the variable was not from the command line. Ignore it,
9283      # but warn the user (except for BASH, which is always set by the calling BASH).
9284      if test "xMKDIR" != xBASH; then
9285        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9286$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9287      fi
9288      # Try to locate tool using the code snippet
9289      for ac_prog in mkdir
9290do
9291  # Extract the first word of "$ac_prog", so it can be a program name with args.
9292set dummy $ac_prog; ac_word=$2
9293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9294$as_echo_n "checking for $ac_word... " >&6; }
9295if ${ac_cv_path_MKDIR+:} false; then :
9296  $as_echo_n "(cached) " >&6
9297else
9298  case $MKDIR in
9299  [\\/]* | ?:[\\/]*)
9300  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9301  ;;
9302  *)
9303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9304for as_dir in $PATH
9305do
9306  IFS=$as_save_IFS
9307  test -z "$as_dir" && as_dir=.
9308    for ac_exec_ext in '' $ac_executable_extensions; do
9309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9310    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9312    break 2
9313  fi
9314done
9315  done
9316IFS=$as_save_IFS
9317
9318  ;;
9319esac
9320fi
9321MKDIR=$ac_cv_path_MKDIR
9322if test -n "$MKDIR"; then
9323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9324$as_echo "$MKDIR" >&6; }
9325else
9326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9327$as_echo "no" >&6; }
9328fi
9329
9330
9331  test -n "$MKDIR" && break
9332done
9333
9334    else
9335      # If it succeeded, then it was overridden by the user. We will use it
9336      # for the tool.
9337
9338      # First remove it from the list of overridden variables, so we can test
9339      # for unknown variables in the end.
9340      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9341
9342      # Check if we try to supply an empty value
9343      if test "x$MKDIR" = x; then
9344        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9345$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9347$as_echo_n "checking for MKDIR... " >&6; }
9348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9349$as_echo "disabled" >&6; }
9350      else
9351        # Check if the provided tool contains a complete path.
9352        tool_specified="$MKDIR"
9353        tool_basename="${tool_specified##*/}"
9354        if test "x$tool_basename" = "x$tool_specified"; then
9355          # A command without a complete path is provided, search $PATH.
9356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9357$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9358          # Extract the first word of "$tool_basename", so it can be a program name with args.
9359set dummy $tool_basename; ac_word=$2
9360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9361$as_echo_n "checking for $ac_word... " >&6; }
9362if ${ac_cv_path_MKDIR+:} false; then :
9363  $as_echo_n "(cached) " >&6
9364else
9365  case $MKDIR in
9366  [\\/]* | ?:[\\/]*)
9367  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9368  ;;
9369  *)
9370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9371for as_dir in $PATH
9372do
9373  IFS=$as_save_IFS
9374  test -z "$as_dir" && as_dir=.
9375    for ac_exec_ext in '' $ac_executable_extensions; do
9376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9377    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9379    break 2
9380  fi
9381done
9382  done
9383IFS=$as_save_IFS
9384
9385  ;;
9386esac
9387fi
9388MKDIR=$ac_cv_path_MKDIR
9389if test -n "$MKDIR"; then
9390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9391$as_echo "$MKDIR" >&6; }
9392else
9393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9394$as_echo "no" >&6; }
9395fi
9396
9397
9398          if test "x$MKDIR" = x; then
9399            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9400          fi
9401        else
9402          # Otherwise we believe it is a complete path. Use it as it is.
9403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9404$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9405          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9406$as_echo_n "checking for MKDIR... " >&6; }
9407          if test ! -x "$tool_specified"; then
9408            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9409$as_echo "not found" >&6; }
9410            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9411          fi
9412          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9413$as_echo "$tool_specified" >&6; }
9414        fi
9415      fi
9416    fi
9417
9418  fi
9419
9420
9421
9422  if test "x$MKDIR" = x; then
9423    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9424  fi
9425
9426
9427
9428
9429
9430  # Publish this variable in the help.
9431
9432
9433  if [ -z "${MKTEMP+x}" ]; then
9434    # The variable is not set by user, try to locate tool using the code snippet
9435    for ac_prog in mktemp
9436do
9437  # Extract the first word of "$ac_prog", so it can be a program name with args.
9438set dummy $ac_prog; ac_word=$2
9439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9440$as_echo_n "checking for $ac_word... " >&6; }
9441if ${ac_cv_path_MKTEMP+:} false; then :
9442  $as_echo_n "(cached) " >&6
9443else
9444  case $MKTEMP in
9445  [\\/]* | ?:[\\/]*)
9446  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9447  ;;
9448  *)
9449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9450for as_dir in $PATH
9451do
9452  IFS=$as_save_IFS
9453  test -z "$as_dir" && as_dir=.
9454    for ac_exec_ext in '' $ac_executable_extensions; do
9455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9456    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9458    break 2
9459  fi
9460done
9461  done
9462IFS=$as_save_IFS
9463
9464  ;;
9465esac
9466fi
9467MKTEMP=$ac_cv_path_MKTEMP
9468if test -n "$MKTEMP"; then
9469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9470$as_echo "$MKTEMP" >&6; }
9471else
9472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9473$as_echo "no" >&6; }
9474fi
9475
9476
9477  test -n "$MKTEMP" && break
9478done
9479
9480  else
9481    # The variable is set, but is it from the command line or the environment?
9482
9483    # Try to remove the string !MKTEMP! from our list.
9484    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9485    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9486      # If it failed, the variable was not from the command line. Ignore it,
9487      # but warn the user (except for BASH, which is always set by the calling BASH).
9488      if test "xMKTEMP" != xBASH; then
9489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9490$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9491      fi
9492      # Try to locate tool using the code snippet
9493      for ac_prog in mktemp
9494do
9495  # Extract the first word of "$ac_prog", so it can be a program name with args.
9496set dummy $ac_prog; ac_word=$2
9497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9498$as_echo_n "checking for $ac_word... " >&6; }
9499if ${ac_cv_path_MKTEMP+:} false; then :
9500  $as_echo_n "(cached) " >&6
9501else
9502  case $MKTEMP in
9503  [\\/]* | ?:[\\/]*)
9504  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9505  ;;
9506  *)
9507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9508for as_dir in $PATH
9509do
9510  IFS=$as_save_IFS
9511  test -z "$as_dir" && as_dir=.
9512    for ac_exec_ext in '' $ac_executable_extensions; do
9513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9514    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9516    break 2
9517  fi
9518done
9519  done
9520IFS=$as_save_IFS
9521
9522  ;;
9523esac
9524fi
9525MKTEMP=$ac_cv_path_MKTEMP
9526if test -n "$MKTEMP"; then
9527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9528$as_echo "$MKTEMP" >&6; }
9529else
9530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9531$as_echo "no" >&6; }
9532fi
9533
9534
9535  test -n "$MKTEMP" && break
9536done
9537
9538    else
9539      # If it succeeded, then it was overridden by the user. We will use it
9540      # for the tool.
9541
9542      # First remove it from the list of overridden variables, so we can test
9543      # for unknown variables in the end.
9544      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9545
9546      # Check if we try to supply an empty value
9547      if test "x$MKTEMP" = x; then
9548        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9549$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9551$as_echo_n "checking for MKTEMP... " >&6; }
9552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9553$as_echo "disabled" >&6; }
9554      else
9555        # Check if the provided tool contains a complete path.
9556        tool_specified="$MKTEMP"
9557        tool_basename="${tool_specified##*/}"
9558        if test "x$tool_basename" = "x$tool_specified"; then
9559          # A command without a complete path is provided, search $PATH.
9560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9561$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9562          # Extract the first word of "$tool_basename", so it can be a program name with args.
9563set dummy $tool_basename; ac_word=$2
9564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9565$as_echo_n "checking for $ac_word... " >&6; }
9566if ${ac_cv_path_MKTEMP+:} false; then :
9567  $as_echo_n "(cached) " >&6
9568else
9569  case $MKTEMP in
9570  [\\/]* | ?:[\\/]*)
9571  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9572  ;;
9573  *)
9574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9575for as_dir in $PATH
9576do
9577  IFS=$as_save_IFS
9578  test -z "$as_dir" && as_dir=.
9579    for ac_exec_ext in '' $ac_executable_extensions; do
9580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9581    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9583    break 2
9584  fi
9585done
9586  done
9587IFS=$as_save_IFS
9588
9589  ;;
9590esac
9591fi
9592MKTEMP=$ac_cv_path_MKTEMP
9593if test -n "$MKTEMP"; then
9594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9595$as_echo "$MKTEMP" >&6; }
9596else
9597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9598$as_echo "no" >&6; }
9599fi
9600
9601
9602          if test "x$MKTEMP" = x; then
9603            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9604          fi
9605        else
9606          # Otherwise we believe it is a complete path. Use it as it is.
9607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9608$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9609          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9610$as_echo_n "checking for MKTEMP... " >&6; }
9611          if test ! -x "$tool_specified"; then
9612            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9613$as_echo "not found" >&6; }
9614            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9615          fi
9616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9617$as_echo "$tool_specified" >&6; }
9618        fi
9619      fi
9620    fi
9621
9622  fi
9623
9624
9625
9626  if test "x$MKTEMP" = x; then
9627    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9628  fi
9629
9630
9631
9632
9633
9634  # Publish this variable in the help.
9635
9636
9637  if [ -z "${MV+x}" ]; then
9638    # The variable is not set by user, try to locate tool using the code snippet
9639    for ac_prog in mv
9640do
9641  # Extract the first word of "$ac_prog", so it can be a program name with args.
9642set dummy $ac_prog; ac_word=$2
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9644$as_echo_n "checking for $ac_word... " >&6; }
9645if ${ac_cv_path_MV+:} false; then :
9646  $as_echo_n "(cached) " >&6
9647else
9648  case $MV in
9649  [\\/]* | ?:[\\/]*)
9650  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9651  ;;
9652  *)
9653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9654for as_dir in $PATH
9655do
9656  IFS=$as_save_IFS
9657  test -z "$as_dir" && as_dir=.
9658    for ac_exec_ext in '' $ac_executable_extensions; do
9659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9660    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9662    break 2
9663  fi
9664done
9665  done
9666IFS=$as_save_IFS
9667
9668  ;;
9669esac
9670fi
9671MV=$ac_cv_path_MV
9672if test -n "$MV"; then
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9674$as_echo "$MV" >&6; }
9675else
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677$as_echo "no" >&6; }
9678fi
9679
9680
9681  test -n "$MV" && break
9682done
9683
9684  else
9685    # The variable is set, but is it from the command line or the environment?
9686
9687    # Try to remove the string !MV! from our list.
9688    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9689    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9690      # If it failed, the variable was not from the command line. Ignore it,
9691      # but warn the user (except for BASH, which is always set by the calling BASH).
9692      if test "xMV" != xBASH; then
9693        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9694$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9695      fi
9696      # Try to locate tool using the code snippet
9697      for ac_prog in mv
9698do
9699  # Extract the first word of "$ac_prog", so it can be a program name with args.
9700set dummy $ac_prog; ac_word=$2
9701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9702$as_echo_n "checking for $ac_word... " >&6; }
9703if ${ac_cv_path_MV+:} false; then :
9704  $as_echo_n "(cached) " >&6
9705else
9706  case $MV in
9707  [\\/]* | ?:[\\/]*)
9708  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9709  ;;
9710  *)
9711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9712for as_dir in $PATH
9713do
9714  IFS=$as_save_IFS
9715  test -z "$as_dir" && as_dir=.
9716    for ac_exec_ext in '' $ac_executable_extensions; do
9717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9718    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9720    break 2
9721  fi
9722done
9723  done
9724IFS=$as_save_IFS
9725
9726  ;;
9727esac
9728fi
9729MV=$ac_cv_path_MV
9730if test -n "$MV"; then
9731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9732$as_echo "$MV" >&6; }
9733else
9734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9735$as_echo "no" >&6; }
9736fi
9737
9738
9739  test -n "$MV" && break
9740done
9741
9742    else
9743      # If it succeeded, then it was overridden by the user. We will use it
9744      # for the tool.
9745
9746      # First remove it from the list of overridden variables, so we can test
9747      # for unknown variables in the end.
9748      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9749
9750      # Check if we try to supply an empty value
9751      if test "x$MV" = x; then
9752        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9753$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9755$as_echo_n "checking for MV... " >&6; }
9756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9757$as_echo "disabled" >&6; }
9758      else
9759        # Check if the provided tool contains a complete path.
9760        tool_specified="$MV"
9761        tool_basename="${tool_specified##*/}"
9762        if test "x$tool_basename" = "x$tool_specified"; then
9763          # A command without a complete path is provided, search $PATH.
9764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9765$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9766          # Extract the first word of "$tool_basename", so it can be a program name with args.
9767set dummy $tool_basename; ac_word=$2
9768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9769$as_echo_n "checking for $ac_word... " >&6; }
9770if ${ac_cv_path_MV+:} false; then :
9771  $as_echo_n "(cached) " >&6
9772else
9773  case $MV in
9774  [\\/]* | ?:[\\/]*)
9775  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9776  ;;
9777  *)
9778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9779for as_dir in $PATH
9780do
9781  IFS=$as_save_IFS
9782  test -z "$as_dir" && as_dir=.
9783    for ac_exec_ext in '' $ac_executable_extensions; do
9784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9785    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9787    break 2
9788  fi
9789done
9790  done
9791IFS=$as_save_IFS
9792
9793  ;;
9794esac
9795fi
9796MV=$ac_cv_path_MV
9797if test -n "$MV"; then
9798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9799$as_echo "$MV" >&6; }
9800else
9801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802$as_echo "no" >&6; }
9803fi
9804
9805
9806          if test "x$MV" = x; then
9807            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9808          fi
9809        else
9810          # Otherwise we believe it is a complete path. Use it as it is.
9811          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9812$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9813          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9814$as_echo_n "checking for MV... " >&6; }
9815          if test ! -x "$tool_specified"; then
9816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9817$as_echo "not found" >&6; }
9818            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9819          fi
9820          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9821$as_echo "$tool_specified" >&6; }
9822        fi
9823      fi
9824    fi
9825
9826  fi
9827
9828
9829
9830  if test "x$MV" = x; then
9831    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9832  fi
9833
9834
9835
9836
9837
9838  # Publish this variable in the help.
9839
9840
9841  if [ -z "${NAWK+x}" ]; then
9842    # The variable is not set by user, try to locate tool using the code snippet
9843    for ac_prog in nawk gawk awk
9844do
9845  # Extract the first word of "$ac_prog", so it can be a program name with args.
9846set dummy $ac_prog; ac_word=$2
9847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9848$as_echo_n "checking for $ac_word... " >&6; }
9849if ${ac_cv_path_NAWK+:} false; then :
9850  $as_echo_n "(cached) " >&6
9851else
9852  case $NAWK in
9853  [\\/]* | ?:[\\/]*)
9854  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9855  ;;
9856  *)
9857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9858for as_dir in $PATH
9859do
9860  IFS=$as_save_IFS
9861  test -z "$as_dir" && as_dir=.
9862    for ac_exec_ext in '' $ac_executable_extensions; do
9863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9864    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9866    break 2
9867  fi
9868done
9869  done
9870IFS=$as_save_IFS
9871
9872  ;;
9873esac
9874fi
9875NAWK=$ac_cv_path_NAWK
9876if test -n "$NAWK"; then
9877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9878$as_echo "$NAWK" >&6; }
9879else
9880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
9882fi
9883
9884
9885  test -n "$NAWK" && break
9886done
9887
9888  else
9889    # The variable is set, but is it from the command line or the environment?
9890
9891    # Try to remove the string !NAWK! from our list.
9892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9894      # If it failed, the variable was not from the command line. Ignore it,
9895      # but warn the user (except for BASH, which is always set by the calling BASH).
9896      if test "xNAWK" != xBASH; then
9897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9898$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9899      fi
9900      # Try to locate tool using the code snippet
9901      for ac_prog in nawk gawk awk
9902do
9903  # Extract the first word of "$ac_prog", so it can be a program name with args.
9904set dummy $ac_prog; ac_word=$2
9905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9906$as_echo_n "checking for $ac_word... " >&6; }
9907if ${ac_cv_path_NAWK+:} false; then :
9908  $as_echo_n "(cached) " >&6
9909else
9910  case $NAWK in
9911  [\\/]* | ?:[\\/]*)
9912  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9913  ;;
9914  *)
9915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9916for as_dir in $PATH
9917do
9918  IFS=$as_save_IFS
9919  test -z "$as_dir" && as_dir=.
9920    for ac_exec_ext in '' $ac_executable_extensions; do
9921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9922    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9924    break 2
9925  fi
9926done
9927  done
9928IFS=$as_save_IFS
9929
9930  ;;
9931esac
9932fi
9933NAWK=$ac_cv_path_NAWK
9934if test -n "$NAWK"; then
9935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9936$as_echo "$NAWK" >&6; }
9937else
9938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9939$as_echo "no" >&6; }
9940fi
9941
9942
9943  test -n "$NAWK" && break
9944done
9945
9946    else
9947      # If it succeeded, then it was overridden by the user. We will use it
9948      # for the tool.
9949
9950      # First remove it from the list of overridden variables, so we can test
9951      # for unknown variables in the end.
9952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9953
9954      # Check if we try to supply an empty value
9955      if test "x$NAWK" = x; then
9956        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9957$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9959$as_echo_n "checking for NAWK... " >&6; }
9960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9961$as_echo "disabled" >&6; }
9962      else
9963        # Check if the provided tool contains a complete path.
9964        tool_specified="$NAWK"
9965        tool_basename="${tool_specified##*/}"
9966        if test "x$tool_basename" = "x$tool_specified"; then
9967          # A command without a complete path is provided, search $PATH.
9968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9969$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9970          # Extract the first word of "$tool_basename", so it can be a program name with args.
9971set dummy $tool_basename; ac_word=$2
9972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9973$as_echo_n "checking for $ac_word... " >&6; }
9974if ${ac_cv_path_NAWK+:} false; then :
9975  $as_echo_n "(cached) " >&6
9976else
9977  case $NAWK in
9978  [\\/]* | ?:[\\/]*)
9979  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9980  ;;
9981  *)
9982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9983for as_dir in $PATH
9984do
9985  IFS=$as_save_IFS
9986  test -z "$as_dir" && as_dir=.
9987    for ac_exec_ext in '' $ac_executable_extensions; do
9988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9989    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9991    break 2
9992  fi
9993done
9994  done
9995IFS=$as_save_IFS
9996
9997  ;;
9998esac
9999fi
10000NAWK=$ac_cv_path_NAWK
10001if test -n "$NAWK"; then
10002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10003$as_echo "$NAWK" >&6; }
10004else
10005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10006$as_echo "no" >&6; }
10007fi
10008
10009
10010          if test "x$NAWK" = x; then
10011            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10012          fi
10013        else
10014          # Otherwise we believe it is a complete path. Use it as it is.
10015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10016$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10017          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10018$as_echo_n "checking for NAWK... " >&6; }
10019          if test ! -x "$tool_specified"; then
10020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10021$as_echo "not found" >&6; }
10022            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10023          fi
10024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10025$as_echo "$tool_specified" >&6; }
10026        fi
10027      fi
10028    fi
10029
10030  fi
10031
10032
10033
10034  if test "x$NAWK" = x; then
10035    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10036  fi
10037
10038
10039
10040
10041
10042  # Publish this variable in the help.
10043
10044
10045  if [ -z "${PRINTF+x}" ]; then
10046    # The variable is not set by user, try to locate tool using the code snippet
10047    for ac_prog in printf
10048do
10049  # Extract the first word of "$ac_prog", so it can be a program name with args.
10050set dummy $ac_prog; ac_word=$2
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10052$as_echo_n "checking for $ac_word... " >&6; }
10053if ${ac_cv_path_PRINTF+:} false; then :
10054  $as_echo_n "(cached) " >&6
10055else
10056  case $PRINTF in
10057  [\\/]* | ?:[\\/]*)
10058  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10059  ;;
10060  *)
10061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10062for as_dir in $PATH
10063do
10064  IFS=$as_save_IFS
10065  test -z "$as_dir" && as_dir=.
10066    for ac_exec_ext in '' $ac_executable_extensions; do
10067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10068    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10070    break 2
10071  fi
10072done
10073  done
10074IFS=$as_save_IFS
10075
10076  ;;
10077esac
10078fi
10079PRINTF=$ac_cv_path_PRINTF
10080if test -n "$PRINTF"; then
10081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10082$as_echo "$PRINTF" >&6; }
10083else
10084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
10086fi
10087
10088
10089  test -n "$PRINTF" && break
10090done
10091
10092  else
10093    # The variable is set, but is it from the command line or the environment?
10094
10095    # Try to remove the string !PRINTF! from our list.
10096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10098      # If it failed, the variable was not from the command line. Ignore it,
10099      # but warn the user (except for BASH, which is always set by the calling BASH).
10100      if test "xPRINTF" != xBASH; then
10101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10102$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10103      fi
10104      # Try to locate tool using the code snippet
10105      for ac_prog in printf
10106do
10107  # Extract the first word of "$ac_prog", so it can be a program name with args.
10108set dummy $ac_prog; ac_word=$2
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10110$as_echo_n "checking for $ac_word... " >&6; }
10111if ${ac_cv_path_PRINTF+:} false; then :
10112  $as_echo_n "(cached) " >&6
10113else
10114  case $PRINTF in
10115  [\\/]* | ?:[\\/]*)
10116  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10117  ;;
10118  *)
10119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10120for as_dir in $PATH
10121do
10122  IFS=$as_save_IFS
10123  test -z "$as_dir" && as_dir=.
10124    for ac_exec_ext in '' $ac_executable_extensions; do
10125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10126    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10128    break 2
10129  fi
10130done
10131  done
10132IFS=$as_save_IFS
10133
10134  ;;
10135esac
10136fi
10137PRINTF=$ac_cv_path_PRINTF
10138if test -n "$PRINTF"; then
10139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10140$as_echo "$PRINTF" >&6; }
10141else
10142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10143$as_echo "no" >&6; }
10144fi
10145
10146
10147  test -n "$PRINTF" && break
10148done
10149
10150    else
10151      # If it succeeded, then it was overridden by the user. We will use it
10152      # for the tool.
10153
10154      # First remove it from the list of overridden variables, so we can test
10155      # for unknown variables in the end.
10156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10157
10158      # Check if we try to supply an empty value
10159      if test "x$PRINTF" = x; then
10160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10161$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10163$as_echo_n "checking for PRINTF... " >&6; }
10164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10165$as_echo "disabled" >&6; }
10166      else
10167        # Check if the provided tool contains a complete path.
10168        tool_specified="$PRINTF"
10169        tool_basename="${tool_specified##*/}"
10170        if test "x$tool_basename" = "x$tool_specified"; then
10171          # A command without a complete path is provided, search $PATH.
10172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10173$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10174          # Extract the first word of "$tool_basename", so it can be a program name with args.
10175set dummy $tool_basename; ac_word=$2
10176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10177$as_echo_n "checking for $ac_word... " >&6; }
10178if ${ac_cv_path_PRINTF+:} false; then :
10179  $as_echo_n "(cached) " >&6
10180else
10181  case $PRINTF in
10182  [\\/]* | ?:[\\/]*)
10183  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10184  ;;
10185  *)
10186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10187for as_dir in $PATH
10188do
10189  IFS=$as_save_IFS
10190  test -z "$as_dir" && as_dir=.
10191    for ac_exec_ext in '' $ac_executable_extensions; do
10192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10193    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10195    break 2
10196  fi
10197done
10198  done
10199IFS=$as_save_IFS
10200
10201  ;;
10202esac
10203fi
10204PRINTF=$ac_cv_path_PRINTF
10205if test -n "$PRINTF"; then
10206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10207$as_echo "$PRINTF" >&6; }
10208else
10209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10210$as_echo "no" >&6; }
10211fi
10212
10213
10214          if test "x$PRINTF" = x; then
10215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10216          fi
10217        else
10218          # Otherwise we believe it is a complete path. Use it as it is.
10219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10220$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10222$as_echo_n "checking for PRINTF... " >&6; }
10223          if test ! -x "$tool_specified"; then
10224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10225$as_echo "not found" >&6; }
10226            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10227          fi
10228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10229$as_echo "$tool_specified" >&6; }
10230        fi
10231      fi
10232    fi
10233
10234  fi
10235
10236
10237
10238  if test "x$PRINTF" = x; then
10239    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10240  fi
10241
10242
10243
10244
10245
10246  # Publish this variable in the help.
10247
10248
10249  if [ -z "${RM+x}" ]; then
10250    # The variable is not set by user, try to locate tool using the code snippet
10251    for ac_prog in rm
10252do
10253  # Extract the first word of "$ac_prog", so it can be a program name with args.
10254set dummy $ac_prog; ac_word=$2
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10256$as_echo_n "checking for $ac_word... " >&6; }
10257if ${ac_cv_path_RM+:} false; then :
10258  $as_echo_n "(cached) " >&6
10259else
10260  case $RM in
10261  [\\/]* | ?:[\\/]*)
10262  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10263  ;;
10264  *)
10265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10266for as_dir in $PATH
10267do
10268  IFS=$as_save_IFS
10269  test -z "$as_dir" && as_dir=.
10270    for ac_exec_ext in '' $ac_executable_extensions; do
10271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10272    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10274    break 2
10275  fi
10276done
10277  done
10278IFS=$as_save_IFS
10279
10280  ;;
10281esac
10282fi
10283RM=$ac_cv_path_RM
10284if test -n "$RM"; then
10285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10286$as_echo "$RM" >&6; }
10287else
10288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10289$as_echo "no" >&6; }
10290fi
10291
10292
10293  test -n "$RM" && break
10294done
10295
10296  else
10297    # The variable is set, but is it from the command line or the environment?
10298
10299    # Try to remove the string !RM! from our list.
10300    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10301    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10302      # If it failed, the variable was not from the command line. Ignore it,
10303      # but warn the user (except for BASH, which is always set by the calling BASH).
10304      if test "xRM" != xBASH; then
10305        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10306$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10307      fi
10308      # Try to locate tool using the code snippet
10309      for ac_prog in rm
10310do
10311  # Extract the first word of "$ac_prog", so it can be a program name with args.
10312set dummy $ac_prog; ac_word=$2
10313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10314$as_echo_n "checking for $ac_word... " >&6; }
10315if ${ac_cv_path_RM+:} false; then :
10316  $as_echo_n "(cached) " >&6
10317else
10318  case $RM in
10319  [\\/]* | ?:[\\/]*)
10320  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10321  ;;
10322  *)
10323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10324for as_dir in $PATH
10325do
10326  IFS=$as_save_IFS
10327  test -z "$as_dir" && as_dir=.
10328    for ac_exec_ext in '' $ac_executable_extensions; do
10329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10330    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10332    break 2
10333  fi
10334done
10335  done
10336IFS=$as_save_IFS
10337
10338  ;;
10339esac
10340fi
10341RM=$ac_cv_path_RM
10342if test -n "$RM"; then
10343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10344$as_echo "$RM" >&6; }
10345else
10346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10347$as_echo "no" >&6; }
10348fi
10349
10350
10351  test -n "$RM" && break
10352done
10353
10354    else
10355      # If it succeeded, then it was overridden by the user. We will use it
10356      # for the tool.
10357
10358      # First remove it from the list of overridden variables, so we can test
10359      # for unknown variables in the end.
10360      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10361
10362      # Check if we try to supply an empty value
10363      if test "x$RM" = x; then
10364        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10365$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10366        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10367$as_echo_n "checking for RM... " >&6; }
10368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10369$as_echo "disabled" >&6; }
10370      else
10371        # Check if the provided tool contains a complete path.
10372        tool_specified="$RM"
10373        tool_basename="${tool_specified##*/}"
10374        if test "x$tool_basename" = "x$tool_specified"; then
10375          # A command without a complete path is provided, search $PATH.
10376          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10377$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10378          # Extract the first word of "$tool_basename", so it can be a program name with args.
10379set dummy $tool_basename; ac_word=$2
10380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10381$as_echo_n "checking for $ac_word... " >&6; }
10382if ${ac_cv_path_RM+:} false; then :
10383  $as_echo_n "(cached) " >&6
10384else
10385  case $RM in
10386  [\\/]* | ?:[\\/]*)
10387  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10388  ;;
10389  *)
10390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10391for as_dir in $PATH
10392do
10393  IFS=$as_save_IFS
10394  test -z "$as_dir" && as_dir=.
10395    for ac_exec_ext in '' $ac_executable_extensions; do
10396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10397    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10399    break 2
10400  fi
10401done
10402  done
10403IFS=$as_save_IFS
10404
10405  ;;
10406esac
10407fi
10408RM=$ac_cv_path_RM
10409if test -n "$RM"; then
10410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10411$as_echo "$RM" >&6; }
10412else
10413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10414$as_echo "no" >&6; }
10415fi
10416
10417
10418          if test "x$RM" = x; then
10419            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10420          fi
10421        else
10422          # Otherwise we believe it is a complete path. Use it as it is.
10423          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10424$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10425          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10426$as_echo_n "checking for RM... " >&6; }
10427          if test ! -x "$tool_specified"; then
10428            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10429$as_echo "not found" >&6; }
10430            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10431          fi
10432          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10433$as_echo "$tool_specified" >&6; }
10434        fi
10435      fi
10436    fi
10437
10438  fi
10439
10440
10441
10442  if test "x$RM" = x; then
10443    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10444  fi
10445
10446
10447
10448
10449
10450  # Publish this variable in the help.
10451
10452
10453  if [ -z "${RMDIR+x}" ]; then
10454    # The variable is not set by user, try to locate tool using the code snippet
10455    for ac_prog in rmdir
10456do
10457  # Extract the first word of "$ac_prog", so it can be a program name with args.
10458set dummy $ac_prog; ac_word=$2
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10460$as_echo_n "checking for $ac_word... " >&6; }
10461if ${ac_cv_path_RMDIR+:} false; then :
10462  $as_echo_n "(cached) " >&6
10463else
10464  case $RMDIR in
10465  [\\/]* | ?:[\\/]*)
10466  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10467  ;;
10468  *)
10469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10470for as_dir in $PATH
10471do
10472  IFS=$as_save_IFS
10473  test -z "$as_dir" && as_dir=.
10474    for ac_exec_ext in '' $ac_executable_extensions; do
10475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10476    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10478    break 2
10479  fi
10480done
10481  done
10482IFS=$as_save_IFS
10483
10484  ;;
10485esac
10486fi
10487RMDIR=$ac_cv_path_RMDIR
10488if test -n "$RMDIR"; then
10489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10490$as_echo "$RMDIR" >&6; }
10491else
10492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
10494fi
10495
10496
10497  test -n "$RMDIR" && break
10498done
10499
10500  else
10501    # The variable is set, but is it from the command line or the environment?
10502
10503    # Try to remove the string !RMDIR! from our list.
10504    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10505    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10506      # If it failed, the variable was not from the command line. Ignore it,
10507      # but warn the user (except for BASH, which is always set by the calling BASH).
10508      if test "xRMDIR" != xBASH; then
10509        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10510$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10511      fi
10512      # Try to locate tool using the code snippet
10513      for ac_prog in rmdir
10514do
10515  # Extract the first word of "$ac_prog", so it can be a program name with args.
10516set dummy $ac_prog; ac_word=$2
10517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10518$as_echo_n "checking for $ac_word... " >&6; }
10519if ${ac_cv_path_RMDIR+:} false; then :
10520  $as_echo_n "(cached) " >&6
10521else
10522  case $RMDIR in
10523  [\\/]* | ?:[\\/]*)
10524  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10525  ;;
10526  *)
10527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10528for as_dir in $PATH
10529do
10530  IFS=$as_save_IFS
10531  test -z "$as_dir" && as_dir=.
10532    for ac_exec_ext in '' $ac_executable_extensions; do
10533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10534    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10536    break 2
10537  fi
10538done
10539  done
10540IFS=$as_save_IFS
10541
10542  ;;
10543esac
10544fi
10545RMDIR=$ac_cv_path_RMDIR
10546if test -n "$RMDIR"; then
10547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10548$as_echo "$RMDIR" >&6; }
10549else
10550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10551$as_echo "no" >&6; }
10552fi
10553
10554
10555  test -n "$RMDIR" && break
10556done
10557
10558    else
10559      # If it succeeded, then it was overridden by the user. We will use it
10560      # for the tool.
10561
10562      # First remove it from the list of overridden variables, so we can test
10563      # for unknown variables in the end.
10564      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10565
10566      # Check if we try to supply an empty value
10567      if test "x$RMDIR" = x; then
10568        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10569$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10570        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10571$as_echo_n "checking for RMDIR... " >&6; }
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10573$as_echo "disabled" >&6; }
10574      else
10575        # Check if the provided tool contains a complete path.
10576        tool_specified="$RMDIR"
10577        tool_basename="${tool_specified##*/}"
10578        if test "x$tool_basename" = "x$tool_specified"; then
10579          # A command without a complete path is provided, search $PATH.
10580          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10581$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10582          # Extract the first word of "$tool_basename", so it can be a program name with args.
10583set dummy $tool_basename; ac_word=$2
10584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10585$as_echo_n "checking for $ac_word... " >&6; }
10586if ${ac_cv_path_RMDIR+:} false; then :
10587  $as_echo_n "(cached) " >&6
10588else
10589  case $RMDIR in
10590  [\\/]* | ?:[\\/]*)
10591  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10592  ;;
10593  *)
10594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10595for as_dir in $PATH
10596do
10597  IFS=$as_save_IFS
10598  test -z "$as_dir" && as_dir=.
10599    for ac_exec_ext in '' $ac_executable_extensions; do
10600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10601    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10603    break 2
10604  fi
10605done
10606  done
10607IFS=$as_save_IFS
10608
10609  ;;
10610esac
10611fi
10612RMDIR=$ac_cv_path_RMDIR
10613if test -n "$RMDIR"; then
10614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10615$as_echo "$RMDIR" >&6; }
10616else
10617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10618$as_echo "no" >&6; }
10619fi
10620
10621
10622          if test "x$RMDIR" = x; then
10623            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10624          fi
10625        else
10626          # Otherwise we believe it is a complete path. Use it as it is.
10627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10628$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10629          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10630$as_echo_n "checking for RMDIR... " >&6; }
10631          if test ! -x "$tool_specified"; then
10632            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10633$as_echo "not found" >&6; }
10634            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10635          fi
10636          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10637$as_echo "$tool_specified" >&6; }
10638        fi
10639      fi
10640    fi
10641
10642  fi
10643
10644
10645
10646  if test "x$RMDIR" = x; then
10647    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10648  fi
10649
10650
10651
10652
10653
10654  # Publish this variable in the help.
10655
10656
10657  if [ -z "${SH+x}" ]; then
10658    # The variable is not set by user, try to locate tool using the code snippet
10659    for ac_prog in sh
10660do
10661  # Extract the first word of "$ac_prog", so it can be a program name with args.
10662set dummy $ac_prog; ac_word=$2
10663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10664$as_echo_n "checking for $ac_word... " >&6; }
10665if ${ac_cv_path_SH+:} false; then :
10666  $as_echo_n "(cached) " >&6
10667else
10668  case $SH in
10669  [\\/]* | ?:[\\/]*)
10670  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10671  ;;
10672  *)
10673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10674for as_dir in $PATH
10675do
10676  IFS=$as_save_IFS
10677  test -z "$as_dir" && as_dir=.
10678    for ac_exec_ext in '' $ac_executable_extensions; do
10679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10680    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10682    break 2
10683  fi
10684done
10685  done
10686IFS=$as_save_IFS
10687
10688  ;;
10689esac
10690fi
10691SH=$ac_cv_path_SH
10692if test -n "$SH"; then
10693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10694$as_echo "$SH" >&6; }
10695else
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
10698fi
10699
10700
10701  test -n "$SH" && break
10702done
10703
10704  else
10705    # The variable is set, but is it from the command line or the environment?
10706
10707    # Try to remove the string !SH! from our list.
10708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10710      # If it failed, the variable was not from the command line. Ignore it,
10711      # but warn the user (except for BASH, which is always set by the calling BASH).
10712      if test "xSH" != xBASH; then
10713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10714$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10715      fi
10716      # Try to locate tool using the code snippet
10717      for ac_prog in sh
10718do
10719  # Extract the first word of "$ac_prog", so it can be a program name with args.
10720set dummy $ac_prog; ac_word=$2
10721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10722$as_echo_n "checking for $ac_word... " >&6; }
10723if ${ac_cv_path_SH+:} false; then :
10724  $as_echo_n "(cached) " >&6
10725else
10726  case $SH in
10727  [\\/]* | ?:[\\/]*)
10728  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10729  ;;
10730  *)
10731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10732for as_dir in $PATH
10733do
10734  IFS=$as_save_IFS
10735  test -z "$as_dir" && as_dir=.
10736    for ac_exec_ext in '' $ac_executable_extensions; do
10737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10738    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10740    break 2
10741  fi
10742done
10743  done
10744IFS=$as_save_IFS
10745
10746  ;;
10747esac
10748fi
10749SH=$ac_cv_path_SH
10750if test -n "$SH"; then
10751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10752$as_echo "$SH" >&6; }
10753else
10754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10755$as_echo "no" >&6; }
10756fi
10757
10758
10759  test -n "$SH" && break
10760done
10761
10762    else
10763      # If it succeeded, then it was overridden by the user. We will use it
10764      # for the tool.
10765
10766      # First remove it from the list of overridden variables, so we can test
10767      # for unknown variables in the end.
10768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10769
10770      # Check if we try to supply an empty value
10771      if test "x$SH" = x; then
10772        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10773$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10774        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10775$as_echo_n "checking for SH... " >&6; }
10776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10777$as_echo "disabled" >&6; }
10778      else
10779        # Check if the provided tool contains a complete path.
10780        tool_specified="$SH"
10781        tool_basename="${tool_specified##*/}"
10782        if test "x$tool_basename" = "x$tool_specified"; then
10783          # A command without a complete path is provided, search $PATH.
10784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10785$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10786          # Extract the first word of "$tool_basename", so it can be a program name with args.
10787set dummy $tool_basename; ac_word=$2
10788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10789$as_echo_n "checking for $ac_word... " >&6; }
10790if ${ac_cv_path_SH+:} false; then :
10791  $as_echo_n "(cached) " >&6
10792else
10793  case $SH in
10794  [\\/]* | ?:[\\/]*)
10795  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10796  ;;
10797  *)
10798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10799for as_dir in $PATH
10800do
10801  IFS=$as_save_IFS
10802  test -z "$as_dir" && as_dir=.
10803    for ac_exec_ext in '' $ac_executable_extensions; do
10804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10805    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10807    break 2
10808  fi
10809done
10810  done
10811IFS=$as_save_IFS
10812
10813  ;;
10814esac
10815fi
10816SH=$ac_cv_path_SH
10817if test -n "$SH"; then
10818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10819$as_echo "$SH" >&6; }
10820else
10821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10822$as_echo "no" >&6; }
10823fi
10824
10825
10826          if test "x$SH" = x; then
10827            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10828          fi
10829        else
10830          # Otherwise we believe it is a complete path. Use it as it is.
10831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10832$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10833          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10834$as_echo_n "checking for SH... " >&6; }
10835          if test ! -x "$tool_specified"; then
10836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10837$as_echo "not found" >&6; }
10838            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10839          fi
10840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10841$as_echo "$tool_specified" >&6; }
10842        fi
10843      fi
10844    fi
10845
10846  fi
10847
10848
10849
10850  if test "x$SH" = x; then
10851    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10852  fi
10853
10854
10855
10856
10857
10858  # Publish this variable in the help.
10859
10860
10861  if [ -z "${SORT+x}" ]; then
10862    # The variable is not set by user, try to locate tool using the code snippet
10863    for ac_prog in sort
10864do
10865  # Extract the first word of "$ac_prog", so it can be a program name with args.
10866set dummy $ac_prog; ac_word=$2
10867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10868$as_echo_n "checking for $ac_word... " >&6; }
10869if ${ac_cv_path_SORT+:} false; then :
10870  $as_echo_n "(cached) " >&6
10871else
10872  case $SORT in
10873  [\\/]* | ?:[\\/]*)
10874  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10875  ;;
10876  *)
10877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10878for as_dir in $PATH
10879do
10880  IFS=$as_save_IFS
10881  test -z "$as_dir" && as_dir=.
10882    for ac_exec_ext in '' $ac_executable_extensions; do
10883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10884    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10886    break 2
10887  fi
10888done
10889  done
10890IFS=$as_save_IFS
10891
10892  ;;
10893esac
10894fi
10895SORT=$ac_cv_path_SORT
10896if test -n "$SORT"; then
10897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10898$as_echo "$SORT" >&6; }
10899else
10900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10901$as_echo "no" >&6; }
10902fi
10903
10904
10905  test -n "$SORT" && break
10906done
10907
10908  else
10909    # The variable is set, but is it from the command line or the environment?
10910
10911    # Try to remove the string !SORT! from our list.
10912    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10913    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10914      # If it failed, the variable was not from the command line. Ignore it,
10915      # but warn the user (except for BASH, which is always set by the calling BASH).
10916      if test "xSORT" != xBASH; then
10917        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10918$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10919      fi
10920      # Try to locate tool using the code snippet
10921      for ac_prog in sort
10922do
10923  # Extract the first word of "$ac_prog", so it can be a program name with args.
10924set dummy $ac_prog; ac_word=$2
10925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10926$as_echo_n "checking for $ac_word... " >&6; }
10927if ${ac_cv_path_SORT+:} false; then :
10928  $as_echo_n "(cached) " >&6
10929else
10930  case $SORT in
10931  [\\/]* | ?:[\\/]*)
10932  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10933  ;;
10934  *)
10935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10936for as_dir in $PATH
10937do
10938  IFS=$as_save_IFS
10939  test -z "$as_dir" && as_dir=.
10940    for ac_exec_ext in '' $ac_executable_extensions; do
10941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10942    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10944    break 2
10945  fi
10946done
10947  done
10948IFS=$as_save_IFS
10949
10950  ;;
10951esac
10952fi
10953SORT=$ac_cv_path_SORT
10954if test -n "$SORT"; then
10955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10956$as_echo "$SORT" >&6; }
10957else
10958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10959$as_echo "no" >&6; }
10960fi
10961
10962
10963  test -n "$SORT" && break
10964done
10965
10966    else
10967      # If it succeeded, then it was overridden by the user. We will use it
10968      # for the tool.
10969
10970      # First remove it from the list of overridden variables, so we can test
10971      # for unknown variables in the end.
10972      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10973
10974      # Check if we try to supply an empty value
10975      if test "x$SORT" = x; then
10976        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10977$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10978        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10979$as_echo_n "checking for SORT... " >&6; }
10980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10981$as_echo "disabled" >&6; }
10982      else
10983        # Check if the provided tool contains a complete path.
10984        tool_specified="$SORT"
10985        tool_basename="${tool_specified##*/}"
10986        if test "x$tool_basename" = "x$tool_specified"; then
10987          # A command without a complete path is provided, search $PATH.
10988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10989$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10990          # Extract the first word of "$tool_basename", so it can be a program name with args.
10991set dummy $tool_basename; ac_word=$2
10992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10993$as_echo_n "checking for $ac_word... " >&6; }
10994if ${ac_cv_path_SORT+:} false; then :
10995  $as_echo_n "(cached) " >&6
10996else
10997  case $SORT in
10998  [\\/]* | ?:[\\/]*)
10999  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11000  ;;
11001  *)
11002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11003for as_dir in $PATH
11004do
11005  IFS=$as_save_IFS
11006  test -z "$as_dir" && as_dir=.
11007    for ac_exec_ext in '' $ac_executable_extensions; do
11008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11009    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11011    break 2
11012  fi
11013done
11014  done
11015IFS=$as_save_IFS
11016
11017  ;;
11018esac
11019fi
11020SORT=$ac_cv_path_SORT
11021if test -n "$SORT"; then
11022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11023$as_echo "$SORT" >&6; }
11024else
11025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11026$as_echo "no" >&6; }
11027fi
11028
11029
11030          if test "x$SORT" = x; then
11031            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11032          fi
11033        else
11034          # Otherwise we believe it is a complete path. Use it as it is.
11035          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11036$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11037          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11038$as_echo_n "checking for SORT... " >&6; }
11039          if test ! -x "$tool_specified"; then
11040            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11041$as_echo "not found" >&6; }
11042            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11043          fi
11044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11045$as_echo "$tool_specified" >&6; }
11046        fi
11047      fi
11048    fi
11049
11050  fi
11051
11052
11053
11054  if test "x$SORT" = x; then
11055    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11056  fi
11057
11058
11059
11060
11061
11062  # Publish this variable in the help.
11063
11064
11065  if [ -z "${TAIL+x}" ]; then
11066    # The variable is not set by user, try to locate tool using the code snippet
11067    for ac_prog in tail
11068do
11069  # Extract the first word of "$ac_prog", so it can be a program name with args.
11070set dummy $ac_prog; ac_word=$2
11071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11072$as_echo_n "checking for $ac_word... " >&6; }
11073if ${ac_cv_path_TAIL+:} false; then :
11074  $as_echo_n "(cached) " >&6
11075else
11076  case $TAIL in
11077  [\\/]* | ?:[\\/]*)
11078  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11079  ;;
11080  *)
11081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11082for as_dir in $PATH
11083do
11084  IFS=$as_save_IFS
11085  test -z "$as_dir" && as_dir=.
11086    for ac_exec_ext in '' $ac_executable_extensions; do
11087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11088    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11090    break 2
11091  fi
11092done
11093  done
11094IFS=$as_save_IFS
11095
11096  ;;
11097esac
11098fi
11099TAIL=$ac_cv_path_TAIL
11100if test -n "$TAIL"; then
11101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11102$as_echo "$TAIL" >&6; }
11103else
11104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11105$as_echo "no" >&6; }
11106fi
11107
11108
11109  test -n "$TAIL" && break
11110done
11111
11112  else
11113    # The variable is set, but is it from the command line or the environment?
11114
11115    # Try to remove the string !TAIL! from our list.
11116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11118      # If it failed, the variable was not from the command line. Ignore it,
11119      # but warn the user (except for BASH, which is always set by the calling BASH).
11120      if test "xTAIL" != xBASH; then
11121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11122$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11123      fi
11124      # Try to locate tool using the code snippet
11125      for ac_prog in tail
11126do
11127  # Extract the first word of "$ac_prog", so it can be a program name with args.
11128set dummy $ac_prog; ac_word=$2
11129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11130$as_echo_n "checking for $ac_word... " >&6; }
11131if ${ac_cv_path_TAIL+:} false; then :
11132  $as_echo_n "(cached) " >&6
11133else
11134  case $TAIL in
11135  [\\/]* | ?:[\\/]*)
11136  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11137  ;;
11138  *)
11139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11140for as_dir in $PATH
11141do
11142  IFS=$as_save_IFS
11143  test -z "$as_dir" && as_dir=.
11144    for ac_exec_ext in '' $ac_executable_extensions; do
11145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11146    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11148    break 2
11149  fi
11150done
11151  done
11152IFS=$as_save_IFS
11153
11154  ;;
11155esac
11156fi
11157TAIL=$ac_cv_path_TAIL
11158if test -n "$TAIL"; then
11159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11160$as_echo "$TAIL" >&6; }
11161else
11162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11163$as_echo "no" >&6; }
11164fi
11165
11166
11167  test -n "$TAIL" && break
11168done
11169
11170    else
11171      # If it succeeded, then it was overridden by the user. We will use it
11172      # for the tool.
11173
11174      # First remove it from the list of overridden variables, so we can test
11175      # for unknown variables in the end.
11176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11177
11178      # Check if we try to supply an empty value
11179      if test "x$TAIL" = x; then
11180        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11181$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11183$as_echo_n "checking for TAIL... " >&6; }
11184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11185$as_echo "disabled" >&6; }
11186      else
11187        # Check if the provided tool contains a complete path.
11188        tool_specified="$TAIL"
11189        tool_basename="${tool_specified##*/}"
11190        if test "x$tool_basename" = "x$tool_specified"; then
11191          # A command without a complete path is provided, search $PATH.
11192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11193$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11194          # Extract the first word of "$tool_basename", so it can be a program name with args.
11195set dummy $tool_basename; ac_word=$2
11196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11197$as_echo_n "checking for $ac_word... " >&6; }
11198if ${ac_cv_path_TAIL+:} false; then :
11199  $as_echo_n "(cached) " >&6
11200else
11201  case $TAIL in
11202  [\\/]* | ?:[\\/]*)
11203  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11204  ;;
11205  *)
11206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11207for as_dir in $PATH
11208do
11209  IFS=$as_save_IFS
11210  test -z "$as_dir" && as_dir=.
11211    for ac_exec_ext in '' $ac_executable_extensions; do
11212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11213    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11215    break 2
11216  fi
11217done
11218  done
11219IFS=$as_save_IFS
11220
11221  ;;
11222esac
11223fi
11224TAIL=$ac_cv_path_TAIL
11225if test -n "$TAIL"; then
11226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11227$as_echo "$TAIL" >&6; }
11228else
11229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11230$as_echo "no" >&6; }
11231fi
11232
11233
11234          if test "x$TAIL" = x; then
11235            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11236          fi
11237        else
11238          # Otherwise we believe it is a complete path. Use it as it is.
11239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11240$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11241          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11242$as_echo_n "checking for TAIL... " >&6; }
11243          if test ! -x "$tool_specified"; then
11244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11245$as_echo "not found" >&6; }
11246            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11247          fi
11248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11249$as_echo "$tool_specified" >&6; }
11250        fi
11251      fi
11252    fi
11253
11254  fi
11255
11256
11257
11258  if test "x$TAIL" = x; then
11259    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11260  fi
11261
11262
11263
11264
11265
11266  # Publish this variable in the help.
11267
11268
11269  if [ -z "${TAR+x}" ]; then
11270    # The variable is not set by user, try to locate tool using the code snippet
11271    for ac_prog in gtar tar
11272do
11273  # Extract the first word of "$ac_prog", so it can be a program name with args.
11274set dummy $ac_prog; ac_word=$2
11275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11276$as_echo_n "checking for $ac_word... " >&6; }
11277if ${ac_cv_path_TAR+:} false; then :
11278  $as_echo_n "(cached) " >&6
11279else
11280  case $TAR in
11281  [\\/]* | ?:[\\/]*)
11282  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11283  ;;
11284  *)
11285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11286for as_dir in $PATH
11287do
11288  IFS=$as_save_IFS
11289  test -z "$as_dir" && as_dir=.
11290    for ac_exec_ext in '' $ac_executable_extensions; do
11291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11292    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11294    break 2
11295  fi
11296done
11297  done
11298IFS=$as_save_IFS
11299
11300  ;;
11301esac
11302fi
11303TAR=$ac_cv_path_TAR
11304if test -n "$TAR"; then
11305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11306$as_echo "$TAR" >&6; }
11307else
11308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11309$as_echo "no" >&6; }
11310fi
11311
11312
11313  test -n "$TAR" && break
11314done
11315
11316  else
11317    # The variable is set, but is it from the command line or the environment?
11318
11319    # Try to remove the string !TAR! from our list.
11320    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11321    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11322      # If it failed, the variable was not from the command line. Ignore it,
11323      # but warn the user (except for BASH, which is always set by the calling BASH).
11324      if test "xTAR" != xBASH; then
11325        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11326$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11327      fi
11328      # Try to locate tool using the code snippet
11329      for ac_prog in gtar tar
11330do
11331  # Extract the first word of "$ac_prog", so it can be a program name with args.
11332set dummy $ac_prog; ac_word=$2
11333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11334$as_echo_n "checking for $ac_word... " >&6; }
11335if ${ac_cv_path_TAR+:} false; then :
11336  $as_echo_n "(cached) " >&6
11337else
11338  case $TAR in
11339  [\\/]* | ?:[\\/]*)
11340  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11341  ;;
11342  *)
11343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11344for as_dir in $PATH
11345do
11346  IFS=$as_save_IFS
11347  test -z "$as_dir" && as_dir=.
11348    for ac_exec_ext in '' $ac_executable_extensions; do
11349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11350    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11352    break 2
11353  fi
11354done
11355  done
11356IFS=$as_save_IFS
11357
11358  ;;
11359esac
11360fi
11361TAR=$ac_cv_path_TAR
11362if test -n "$TAR"; then
11363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11364$as_echo "$TAR" >&6; }
11365else
11366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
11368fi
11369
11370
11371  test -n "$TAR" && break
11372done
11373
11374    else
11375      # If it succeeded, then it was overridden by the user. We will use it
11376      # for the tool.
11377
11378      # First remove it from the list of overridden variables, so we can test
11379      # for unknown variables in the end.
11380      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11381
11382      # Check if we try to supply an empty value
11383      if test "x$TAR" = x; then
11384        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11385$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11386        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11387$as_echo_n "checking for TAR... " >&6; }
11388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11389$as_echo "disabled" >&6; }
11390      else
11391        # Check if the provided tool contains a complete path.
11392        tool_specified="$TAR"
11393        tool_basename="${tool_specified##*/}"
11394        if test "x$tool_basename" = "x$tool_specified"; then
11395          # A command without a complete path is provided, search $PATH.
11396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11397$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11398          # Extract the first word of "$tool_basename", so it can be a program name with args.
11399set dummy $tool_basename; ac_word=$2
11400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11401$as_echo_n "checking for $ac_word... " >&6; }
11402if ${ac_cv_path_TAR+:} false; then :
11403  $as_echo_n "(cached) " >&6
11404else
11405  case $TAR in
11406  [\\/]* | ?:[\\/]*)
11407  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11408  ;;
11409  *)
11410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11411for as_dir in $PATH
11412do
11413  IFS=$as_save_IFS
11414  test -z "$as_dir" && as_dir=.
11415    for ac_exec_ext in '' $ac_executable_extensions; do
11416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11417    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11419    break 2
11420  fi
11421done
11422  done
11423IFS=$as_save_IFS
11424
11425  ;;
11426esac
11427fi
11428TAR=$ac_cv_path_TAR
11429if test -n "$TAR"; then
11430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11431$as_echo "$TAR" >&6; }
11432else
11433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11434$as_echo "no" >&6; }
11435fi
11436
11437
11438          if test "x$TAR" = x; then
11439            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11440          fi
11441        else
11442          # Otherwise we believe it is a complete path. Use it as it is.
11443          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11444$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11445          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11446$as_echo_n "checking for TAR... " >&6; }
11447          if test ! -x "$tool_specified"; then
11448            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11449$as_echo "not found" >&6; }
11450            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11451          fi
11452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11453$as_echo "$tool_specified" >&6; }
11454        fi
11455      fi
11456    fi
11457
11458  fi
11459
11460
11461
11462  if test "x$TAR" = x; then
11463    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11464  fi
11465
11466
11467
11468
11469
11470  # Publish this variable in the help.
11471
11472
11473  if [ -z "${TEE+x}" ]; then
11474    # The variable is not set by user, try to locate tool using the code snippet
11475    for ac_prog in tee
11476do
11477  # Extract the first word of "$ac_prog", so it can be a program name with args.
11478set dummy $ac_prog; ac_word=$2
11479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11480$as_echo_n "checking for $ac_word... " >&6; }
11481if ${ac_cv_path_TEE+:} false; then :
11482  $as_echo_n "(cached) " >&6
11483else
11484  case $TEE in
11485  [\\/]* | ?:[\\/]*)
11486  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11487  ;;
11488  *)
11489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11490for as_dir in $PATH
11491do
11492  IFS=$as_save_IFS
11493  test -z "$as_dir" && as_dir=.
11494    for ac_exec_ext in '' $ac_executable_extensions; do
11495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11496    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11498    break 2
11499  fi
11500done
11501  done
11502IFS=$as_save_IFS
11503
11504  ;;
11505esac
11506fi
11507TEE=$ac_cv_path_TEE
11508if test -n "$TEE"; then
11509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11510$as_echo "$TEE" >&6; }
11511else
11512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11513$as_echo "no" >&6; }
11514fi
11515
11516
11517  test -n "$TEE" && break
11518done
11519
11520  else
11521    # The variable is set, but is it from the command line or the environment?
11522
11523    # Try to remove the string !TEE! from our list.
11524    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11525    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11526      # If it failed, the variable was not from the command line. Ignore it,
11527      # but warn the user (except for BASH, which is always set by the calling BASH).
11528      if test "xTEE" != xBASH; then
11529        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11530$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11531      fi
11532      # Try to locate tool using the code snippet
11533      for ac_prog in tee
11534do
11535  # Extract the first word of "$ac_prog", so it can be a program name with args.
11536set dummy $ac_prog; ac_word=$2
11537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11538$as_echo_n "checking for $ac_word... " >&6; }
11539if ${ac_cv_path_TEE+:} false; then :
11540  $as_echo_n "(cached) " >&6
11541else
11542  case $TEE in
11543  [\\/]* | ?:[\\/]*)
11544  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11545  ;;
11546  *)
11547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11548for as_dir in $PATH
11549do
11550  IFS=$as_save_IFS
11551  test -z "$as_dir" && as_dir=.
11552    for ac_exec_ext in '' $ac_executable_extensions; do
11553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11554    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11556    break 2
11557  fi
11558done
11559  done
11560IFS=$as_save_IFS
11561
11562  ;;
11563esac
11564fi
11565TEE=$ac_cv_path_TEE
11566if test -n "$TEE"; then
11567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11568$as_echo "$TEE" >&6; }
11569else
11570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11571$as_echo "no" >&6; }
11572fi
11573
11574
11575  test -n "$TEE" && break
11576done
11577
11578    else
11579      # If it succeeded, then it was overridden by the user. We will use it
11580      # for the tool.
11581
11582      # First remove it from the list of overridden variables, so we can test
11583      # for unknown variables in the end.
11584      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11585
11586      # Check if we try to supply an empty value
11587      if test "x$TEE" = x; then
11588        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11589$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11591$as_echo_n "checking for TEE... " >&6; }
11592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11593$as_echo "disabled" >&6; }
11594      else
11595        # Check if the provided tool contains a complete path.
11596        tool_specified="$TEE"
11597        tool_basename="${tool_specified##*/}"
11598        if test "x$tool_basename" = "x$tool_specified"; then
11599          # A command without a complete path is provided, search $PATH.
11600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11601$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11602          # Extract the first word of "$tool_basename", so it can be a program name with args.
11603set dummy $tool_basename; ac_word=$2
11604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11605$as_echo_n "checking for $ac_word... " >&6; }
11606if ${ac_cv_path_TEE+:} false; then :
11607  $as_echo_n "(cached) " >&6
11608else
11609  case $TEE in
11610  [\\/]* | ?:[\\/]*)
11611  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11612  ;;
11613  *)
11614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11615for as_dir in $PATH
11616do
11617  IFS=$as_save_IFS
11618  test -z "$as_dir" && as_dir=.
11619    for ac_exec_ext in '' $ac_executable_extensions; do
11620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11621    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11623    break 2
11624  fi
11625done
11626  done
11627IFS=$as_save_IFS
11628
11629  ;;
11630esac
11631fi
11632TEE=$ac_cv_path_TEE
11633if test -n "$TEE"; then
11634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11635$as_echo "$TEE" >&6; }
11636else
11637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11638$as_echo "no" >&6; }
11639fi
11640
11641
11642          if test "x$TEE" = x; then
11643            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11644          fi
11645        else
11646          # Otherwise we believe it is a complete path. Use it as it is.
11647          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11648$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11649          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11650$as_echo_n "checking for TEE... " >&6; }
11651          if test ! -x "$tool_specified"; then
11652            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11653$as_echo "not found" >&6; }
11654            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11655          fi
11656          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11657$as_echo "$tool_specified" >&6; }
11658        fi
11659      fi
11660    fi
11661
11662  fi
11663
11664
11665
11666  if test "x$TEE" = x; then
11667    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11668  fi
11669
11670
11671
11672
11673
11674  # Publish this variable in the help.
11675
11676
11677  if [ -z "${TOUCH+x}" ]; then
11678    # The variable is not set by user, try to locate tool using the code snippet
11679    for ac_prog in touch
11680do
11681  # Extract the first word of "$ac_prog", so it can be a program name with args.
11682set dummy $ac_prog; ac_word=$2
11683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11684$as_echo_n "checking for $ac_word... " >&6; }
11685if ${ac_cv_path_TOUCH+:} false; then :
11686  $as_echo_n "(cached) " >&6
11687else
11688  case $TOUCH in
11689  [\\/]* | ?:[\\/]*)
11690  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11691  ;;
11692  *)
11693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11694for as_dir in $PATH
11695do
11696  IFS=$as_save_IFS
11697  test -z "$as_dir" && as_dir=.
11698    for ac_exec_ext in '' $ac_executable_extensions; do
11699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11700    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11702    break 2
11703  fi
11704done
11705  done
11706IFS=$as_save_IFS
11707
11708  ;;
11709esac
11710fi
11711TOUCH=$ac_cv_path_TOUCH
11712if test -n "$TOUCH"; then
11713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11714$as_echo "$TOUCH" >&6; }
11715else
11716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11717$as_echo "no" >&6; }
11718fi
11719
11720
11721  test -n "$TOUCH" && break
11722done
11723
11724  else
11725    # The variable is set, but is it from the command line or the environment?
11726
11727    # Try to remove the string !TOUCH! from our list.
11728    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11729    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11730      # If it failed, the variable was not from the command line. Ignore it,
11731      # but warn the user (except for BASH, which is always set by the calling BASH).
11732      if test "xTOUCH" != xBASH; then
11733        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11734$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11735      fi
11736      # Try to locate tool using the code snippet
11737      for ac_prog in touch
11738do
11739  # Extract the first word of "$ac_prog", so it can be a program name with args.
11740set dummy $ac_prog; ac_word=$2
11741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11742$as_echo_n "checking for $ac_word... " >&6; }
11743if ${ac_cv_path_TOUCH+:} false; then :
11744  $as_echo_n "(cached) " >&6
11745else
11746  case $TOUCH in
11747  [\\/]* | ?:[\\/]*)
11748  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11749  ;;
11750  *)
11751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11752for as_dir in $PATH
11753do
11754  IFS=$as_save_IFS
11755  test -z "$as_dir" && as_dir=.
11756    for ac_exec_ext in '' $ac_executable_extensions; do
11757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11758    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11760    break 2
11761  fi
11762done
11763  done
11764IFS=$as_save_IFS
11765
11766  ;;
11767esac
11768fi
11769TOUCH=$ac_cv_path_TOUCH
11770if test -n "$TOUCH"; then
11771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11772$as_echo "$TOUCH" >&6; }
11773else
11774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11775$as_echo "no" >&6; }
11776fi
11777
11778
11779  test -n "$TOUCH" && break
11780done
11781
11782    else
11783      # If it succeeded, then it was overridden by the user. We will use it
11784      # for the tool.
11785
11786      # First remove it from the list of overridden variables, so we can test
11787      # for unknown variables in the end.
11788      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11789
11790      # Check if we try to supply an empty value
11791      if test "x$TOUCH" = x; then
11792        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11793$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11794        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11795$as_echo_n "checking for TOUCH... " >&6; }
11796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11797$as_echo "disabled" >&6; }
11798      else
11799        # Check if the provided tool contains a complete path.
11800        tool_specified="$TOUCH"
11801        tool_basename="${tool_specified##*/}"
11802        if test "x$tool_basename" = "x$tool_specified"; then
11803          # A command without a complete path is provided, search $PATH.
11804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11805$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11806          # Extract the first word of "$tool_basename", so it can be a program name with args.
11807set dummy $tool_basename; ac_word=$2
11808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11809$as_echo_n "checking for $ac_word... " >&6; }
11810if ${ac_cv_path_TOUCH+:} false; then :
11811  $as_echo_n "(cached) " >&6
11812else
11813  case $TOUCH in
11814  [\\/]* | ?:[\\/]*)
11815  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11816  ;;
11817  *)
11818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11819for as_dir in $PATH
11820do
11821  IFS=$as_save_IFS
11822  test -z "$as_dir" && as_dir=.
11823    for ac_exec_ext in '' $ac_executable_extensions; do
11824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11825    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11827    break 2
11828  fi
11829done
11830  done
11831IFS=$as_save_IFS
11832
11833  ;;
11834esac
11835fi
11836TOUCH=$ac_cv_path_TOUCH
11837if test -n "$TOUCH"; then
11838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11839$as_echo "$TOUCH" >&6; }
11840else
11841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11842$as_echo "no" >&6; }
11843fi
11844
11845
11846          if test "x$TOUCH" = x; then
11847            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11848          fi
11849        else
11850          # Otherwise we believe it is a complete path. Use it as it is.
11851          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11852$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11853          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11854$as_echo_n "checking for TOUCH... " >&6; }
11855          if test ! -x "$tool_specified"; then
11856            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11857$as_echo "not found" >&6; }
11858            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11859          fi
11860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11861$as_echo "$tool_specified" >&6; }
11862        fi
11863      fi
11864    fi
11865
11866  fi
11867
11868
11869
11870  if test "x$TOUCH" = x; then
11871    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11872  fi
11873
11874
11875
11876
11877
11878  # Publish this variable in the help.
11879
11880
11881  if [ -z "${TR+x}" ]; then
11882    # The variable is not set by user, try to locate tool using the code snippet
11883    for ac_prog in tr
11884do
11885  # Extract the first word of "$ac_prog", so it can be a program name with args.
11886set dummy $ac_prog; ac_word=$2
11887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11888$as_echo_n "checking for $ac_word... " >&6; }
11889if ${ac_cv_path_TR+:} false; then :
11890  $as_echo_n "(cached) " >&6
11891else
11892  case $TR in
11893  [\\/]* | ?:[\\/]*)
11894  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11895  ;;
11896  *)
11897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11898for as_dir in $PATH
11899do
11900  IFS=$as_save_IFS
11901  test -z "$as_dir" && as_dir=.
11902    for ac_exec_ext in '' $ac_executable_extensions; do
11903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11904    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11906    break 2
11907  fi
11908done
11909  done
11910IFS=$as_save_IFS
11911
11912  ;;
11913esac
11914fi
11915TR=$ac_cv_path_TR
11916if test -n "$TR"; then
11917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11918$as_echo "$TR" >&6; }
11919else
11920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11921$as_echo "no" >&6; }
11922fi
11923
11924
11925  test -n "$TR" && break
11926done
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 !TR! from our list.
11932    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
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 "xTR" != xBASH; then
11937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11938$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11939      fi
11940      # Try to locate tool using the code snippet
11941      for ac_prog in tr
11942do
11943  # Extract the first word of "$ac_prog", so it can be a program name with args.
11944set dummy $ac_prog; ac_word=$2
11945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11946$as_echo_n "checking for $ac_word... " >&6; }
11947if ${ac_cv_path_TR+:} false; then :
11948  $as_echo_n "(cached) " >&6
11949else
11950  case $TR in
11951  [\\/]* | ?:[\\/]*)
11952  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11953  ;;
11954  *)
11955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11956for as_dir in $PATH
11957do
11958  IFS=$as_save_IFS
11959  test -z "$as_dir" && as_dir=.
11960    for ac_exec_ext in '' $ac_executable_extensions; do
11961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11962    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11964    break 2
11965  fi
11966done
11967  done
11968IFS=$as_save_IFS
11969
11970  ;;
11971esac
11972fi
11973TR=$ac_cv_path_TR
11974if test -n "$TR"; then
11975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11976$as_echo "$TR" >&6; }
11977else
11978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11979$as_echo "no" >&6; }
11980fi
11981
11982
11983  test -n "$TR" && break
11984done
11985
11986    else
11987      # If it succeeded, then it was overridden by the user. We will use it
11988      # for the tool.
11989
11990      # First remove it from the list of overridden variables, so we can test
11991      # for unknown variables in the end.
11992      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11993
11994      # Check if we try to supply an empty value
11995      if test "x$TR" = x; then
11996        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11997$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11998        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11999$as_echo_n "checking for TR... " >&6; }
12000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12001$as_echo "disabled" >&6; }
12002      else
12003        # Check if the provided tool contains a complete path.
12004        tool_specified="$TR"
12005        tool_basename="${tool_specified##*/}"
12006        if test "x$tool_basename" = "x$tool_specified"; then
12007          # A command without a complete path is provided, search $PATH.
12008          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12009$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12010          # Extract the first word of "$tool_basename", so it can be a program name with args.
12011set dummy $tool_basename; ac_word=$2
12012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12013$as_echo_n "checking for $ac_word... " >&6; }
12014if ${ac_cv_path_TR+:} false; then :
12015  $as_echo_n "(cached) " >&6
12016else
12017  case $TR in
12018  [\\/]* | ?:[\\/]*)
12019  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12020  ;;
12021  *)
12022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12023for as_dir in $PATH
12024do
12025  IFS=$as_save_IFS
12026  test -z "$as_dir" && as_dir=.
12027    for ac_exec_ext in '' $ac_executable_extensions; do
12028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12029    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12031    break 2
12032  fi
12033done
12034  done
12035IFS=$as_save_IFS
12036
12037  ;;
12038esac
12039fi
12040TR=$ac_cv_path_TR
12041if test -n "$TR"; then
12042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12043$as_echo "$TR" >&6; }
12044else
12045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12046$as_echo "no" >&6; }
12047fi
12048
12049
12050          if test "x$TR" = x; then
12051            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12052          fi
12053        else
12054          # Otherwise we believe it is a complete path. Use it as it is.
12055          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12056$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12057          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12058$as_echo_n "checking for TR... " >&6; }
12059          if test ! -x "$tool_specified"; then
12060            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12061$as_echo "not found" >&6; }
12062            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12063          fi
12064          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12065$as_echo "$tool_specified" >&6; }
12066        fi
12067      fi
12068    fi
12069
12070  fi
12071
12072
12073
12074  if test "x$TR" = x; then
12075    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12076  fi
12077
12078
12079
12080
12081
12082  # Publish this variable in the help.
12083
12084
12085  if [ -z "${UNAME+x}" ]; then
12086    # The variable is not set by user, try to locate tool using the code snippet
12087    for ac_prog in uname
12088do
12089  # Extract the first word of "$ac_prog", so it can be a program name with args.
12090set dummy $ac_prog; ac_word=$2
12091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12092$as_echo_n "checking for $ac_word... " >&6; }
12093if ${ac_cv_path_UNAME+:} false; then :
12094  $as_echo_n "(cached) " >&6
12095else
12096  case $UNAME in
12097  [\\/]* | ?:[\\/]*)
12098  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12099  ;;
12100  *)
12101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12102for as_dir in $PATH
12103do
12104  IFS=$as_save_IFS
12105  test -z "$as_dir" && as_dir=.
12106    for ac_exec_ext in '' $ac_executable_extensions; do
12107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12108    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12110    break 2
12111  fi
12112done
12113  done
12114IFS=$as_save_IFS
12115
12116  ;;
12117esac
12118fi
12119UNAME=$ac_cv_path_UNAME
12120if test -n "$UNAME"; then
12121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12122$as_echo "$UNAME" >&6; }
12123else
12124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12125$as_echo "no" >&6; }
12126fi
12127
12128
12129  test -n "$UNAME" && break
12130done
12131
12132  else
12133    # The variable is set, but is it from the command line or the environment?
12134
12135    # Try to remove the string !UNAME! from our list.
12136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12138      # If it failed, the variable was not from the command line. Ignore it,
12139      # but warn the user (except for BASH, which is always set by the calling BASH).
12140      if test "xUNAME" != xBASH; then
12141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12142$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12143      fi
12144      # Try to locate tool using the code snippet
12145      for ac_prog in uname
12146do
12147  # Extract the first word of "$ac_prog", so it can be a program name with args.
12148set dummy $ac_prog; ac_word=$2
12149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12150$as_echo_n "checking for $ac_word... " >&6; }
12151if ${ac_cv_path_UNAME+:} false; then :
12152  $as_echo_n "(cached) " >&6
12153else
12154  case $UNAME in
12155  [\\/]* | ?:[\\/]*)
12156  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12157  ;;
12158  *)
12159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12160for as_dir in $PATH
12161do
12162  IFS=$as_save_IFS
12163  test -z "$as_dir" && as_dir=.
12164    for ac_exec_ext in '' $ac_executable_extensions; do
12165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12166    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12168    break 2
12169  fi
12170done
12171  done
12172IFS=$as_save_IFS
12173
12174  ;;
12175esac
12176fi
12177UNAME=$ac_cv_path_UNAME
12178if test -n "$UNAME"; then
12179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12180$as_echo "$UNAME" >&6; }
12181else
12182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12183$as_echo "no" >&6; }
12184fi
12185
12186
12187  test -n "$UNAME" && break
12188done
12189
12190    else
12191      # If it succeeded, then it was overridden by the user. We will use it
12192      # for the tool.
12193
12194      # First remove it from the list of overridden variables, so we can test
12195      # for unknown variables in the end.
12196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12197
12198      # Check if we try to supply an empty value
12199      if test "x$UNAME" = x; then
12200        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12201$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12203$as_echo_n "checking for UNAME... " >&6; }
12204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12205$as_echo "disabled" >&6; }
12206      else
12207        # Check if the provided tool contains a complete path.
12208        tool_specified="$UNAME"
12209        tool_basename="${tool_specified##*/}"
12210        if test "x$tool_basename" = "x$tool_specified"; then
12211          # A command without a complete path is provided, search $PATH.
12212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12213$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12214          # Extract the first word of "$tool_basename", so it can be a program name with args.
12215set dummy $tool_basename; ac_word=$2
12216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12217$as_echo_n "checking for $ac_word... " >&6; }
12218if ${ac_cv_path_UNAME+:} false; then :
12219  $as_echo_n "(cached) " >&6
12220else
12221  case $UNAME in
12222  [\\/]* | ?:[\\/]*)
12223  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12224  ;;
12225  *)
12226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12227for as_dir in $PATH
12228do
12229  IFS=$as_save_IFS
12230  test -z "$as_dir" && as_dir=.
12231    for ac_exec_ext in '' $ac_executable_extensions; do
12232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12233    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12235    break 2
12236  fi
12237done
12238  done
12239IFS=$as_save_IFS
12240
12241  ;;
12242esac
12243fi
12244UNAME=$ac_cv_path_UNAME
12245if test -n "$UNAME"; then
12246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12247$as_echo "$UNAME" >&6; }
12248else
12249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12250$as_echo "no" >&6; }
12251fi
12252
12253
12254          if test "x$UNAME" = x; then
12255            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12256          fi
12257        else
12258          # Otherwise we believe it is a complete path. Use it as it is.
12259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12260$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12261          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12262$as_echo_n "checking for UNAME... " >&6; }
12263          if test ! -x "$tool_specified"; then
12264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12265$as_echo "not found" >&6; }
12266            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12267          fi
12268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12269$as_echo "$tool_specified" >&6; }
12270        fi
12271      fi
12272    fi
12273
12274  fi
12275
12276
12277
12278  if test "x$UNAME" = x; then
12279    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12280  fi
12281
12282
12283
12284
12285
12286  # Publish this variable in the help.
12287
12288
12289  if [ -z "${UNIQ+x}" ]; then
12290    # The variable is not set by user, try to locate tool using the code snippet
12291    for ac_prog in uniq
12292do
12293  # Extract the first word of "$ac_prog", so it can be a program name with args.
12294set dummy $ac_prog; ac_word=$2
12295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12296$as_echo_n "checking for $ac_word... " >&6; }
12297if ${ac_cv_path_UNIQ+:} false; then :
12298  $as_echo_n "(cached) " >&6
12299else
12300  case $UNIQ in
12301  [\\/]* | ?:[\\/]*)
12302  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12303  ;;
12304  *)
12305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12306for as_dir in $PATH
12307do
12308  IFS=$as_save_IFS
12309  test -z "$as_dir" && as_dir=.
12310    for ac_exec_ext in '' $ac_executable_extensions; do
12311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12312    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12314    break 2
12315  fi
12316done
12317  done
12318IFS=$as_save_IFS
12319
12320  ;;
12321esac
12322fi
12323UNIQ=$ac_cv_path_UNIQ
12324if test -n "$UNIQ"; then
12325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12326$as_echo "$UNIQ" >&6; }
12327else
12328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12329$as_echo "no" >&6; }
12330fi
12331
12332
12333  test -n "$UNIQ" && break
12334done
12335
12336  else
12337    # The variable is set, but is it from the command line or the environment?
12338
12339    # Try to remove the string !UNIQ! from our list.
12340    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12341    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12342      # If it failed, the variable was not from the command line. Ignore it,
12343      # but warn the user (except for BASH, which is always set by the calling BASH).
12344      if test "xUNIQ" != xBASH; then
12345        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12346$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12347      fi
12348      # Try to locate tool using the code snippet
12349      for ac_prog in uniq
12350do
12351  # Extract the first word of "$ac_prog", so it can be a program name with args.
12352set dummy $ac_prog; ac_word=$2
12353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12354$as_echo_n "checking for $ac_word... " >&6; }
12355if ${ac_cv_path_UNIQ+:} false; then :
12356  $as_echo_n "(cached) " >&6
12357else
12358  case $UNIQ in
12359  [\\/]* | ?:[\\/]*)
12360  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12361  ;;
12362  *)
12363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12364for as_dir in $PATH
12365do
12366  IFS=$as_save_IFS
12367  test -z "$as_dir" && as_dir=.
12368    for ac_exec_ext in '' $ac_executable_extensions; do
12369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12370    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12372    break 2
12373  fi
12374done
12375  done
12376IFS=$as_save_IFS
12377
12378  ;;
12379esac
12380fi
12381UNIQ=$ac_cv_path_UNIQ
12382if test -n "$UNIQ"; then
12383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12384$as_echo "$UNIQ" >&6; }
12385else
12386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12387$as_echo "no" >&6; }
12388fi
12389
12390
12391  test -n "$UNIQ" && break
12392done
12393
12394    else
12395      # If it succeeded, then it was overridden by the user. We will use it
12396      # for the tool.
12397
12398      # First remove it from the list of overridden variables, so we can test
12399      # for unknown variables in the end.
12400      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12401
12402      # Check if we try to supply an empty value
12403      if test "x$UNIQ" = x; then
12404        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12405$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12406        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12407$as_echo_n "checking for UNIQ... " >&6; }
12408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12409$as_echo "disabled" >&6; }
12410      else
12411        # Check if the provided tool contains a complete path.
12412        tool_specified="$UNIQ"
12413        tool_basename="${tool_specified##*/}"
12414        if test "x$tool_basename" = "x$tool_specified"; then
12415          # A command without a complete path is provided, search $PATH.
12416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12417$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12418          # Extract the first word of "$tool_basename", so it can be a program name with args.
12419set dummy $tool_basename; ac_word=$2
12420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12421$as_echo_n "checking for $ac_word... " >&6; }
12422if ${ac_cv_path_UNIQ+:} false; then :
12423  $as_echo_n "(cached) " >&6
12424else
12425  case $UNIQ in
12426  [\\/]* | ?:[\\/]*)
12427  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12428  ;;
12429  *)
12430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12431for as_dir in $PATH
12432do
12433  IFS=$as_save_IFS
12434  test -z "$as_dir" && as_dir=.
12435    for ac_exec_ext in '' $ac_executable_extensions; do
12436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12437    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12439    break 2
12440  fi
12441done
12442  done
12443IFS=$as_save_IFS
12444
12445  ;;
12446esac
12447fi
12448UNIQ=$ac_cv_path_UNIQ
12449if test -n "$UNIQ"; then
12450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12451$as_echo "$UNIQ" >&6; }
12452else
12453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12454$as_echo "no" >&6; }
12455fi
12456
12457
12458          if test "x$UNIQ" = x; then
12459            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12460          fi
12461        else
12462          # Otherwise we believe it is a complete path. Use it as it is.
12463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12464$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12465          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12466$as_echo_n "checking for UNIQ... " >&6; }
12467          if test ! -x "$tool_specified"; then
12468            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12469$as_echo "not found" >&6; }
12470            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12471          fi
12472          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12473$as_echo "$tool_specified" >&6; }
12474        fi
12475      fi
12476    fi
12477
12478  fi
12479
12480
12481
12482  if test "x$UNIQ" = x; then
12483    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12484  fi
12485
12486
12487
12488
12489
12490  # Publish this variable in the help.
12491
12492
12493  if [ -z "${WC+x}" ]; then
12494    # The variable is not set by user, try to locate tool using the code snippet
12495    for ac_prog in wc
12496do
12497  # Extract the first word of "$ac_prog", so it can be a program name with args.
12498set dummy $ac_prog; 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_WC+:} false; then :
12502  $as_echo_n "(cached) " >&6
12503else
12504  case $WC in
12505  [\\/]* | ?:[\\/]*)
12506  ac_cv_path_WC="$WC" # 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_WC="$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
12527WC=$ac_cv_path_WC
12528if test -n "$WC"; then
12529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12530$as_echo "$WC" >&6; }
12531else
12532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12533$as_echo "no" >&6; }
12534fi
12535
12536
12537  test -n "$WC" && break
12538done
12539
12540  else
12541    # The variable is set, but is it from the command line or the environment?
12542
12543    # Try to remove the string !WC! from our list.
12544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12546      # If it failed, the variable was not from the command line. Ignore it,
12547      # but warn the user (except for BASH, which is always set by the calling BASH).
12548      if test "xWC" != xBASH; then
12549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12550$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12551      fi
12552      # Try to locate tool using the code snippet
12553      for ac_prog in wc
12554do
12555  # Extract the first word of "$ac_prog", so it can be a program name with args.
12556set dummy $ac_prog; ac_word=$2
12557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12558$as_echo_n "checking for $ac_word... " >&6; }
12559if ${ac_cv_path_WC+:} false; then :
12560  $as_echo_n "(cached) " >&6
12561else
12562  case $WC in
12563  [\\/]* | ?:[\\/]*)
12564  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12565  ;;
12566  *)
12567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12568for as_dir in $PATH
12569do
12570  IFS=$as_save_IFS
12571  test -z "$as_dir" && as_dir=.
12572    for ac_exec_ext in '' $ac_executable_extensions; do
12573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12574    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12576    break 2
12577  fi
12578done
12579  done
12580IFS=$as_save_IFS
12581
12582  ;;
12583esac
12584fi
12585WC=$ac_cv_path_WC
12586if test -n "$WC"; then
12587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12588$as_echo "$WC" >&6; }
12589else
12590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12591$as_echo "no" >&6; }
12592fi
12593
12594
12595  test -n "$WC" && break
12596done
12597
12598    else
12599      # If it succeeded, then it was overridden by the user. We will use it
12600      # for the tool.
12601
12602      # First remove it from the list of overridden variables, so we can test
12603      # for unknown variables in the end.
12604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12605
12606      # Check if we try to supply an empty value
12607      if test "x$WC" = x; then
12608        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12609$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12610        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12611$as_echo_n "checking for WC... " >&6; }
12612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12613$as_echo "disabled" >&6; }
12614      else
12615        # Check if the provided tool contains a complete path.
12616        tool_specified="$WC"
12617        tool_basename="${tool_specified##*/}"
12618        if test "x$tool_basename" = "x$tool_specified"; then
12619          # A command without a complete path is provided, search $PATH.
12620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12621$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12622          # Extract the first word of "$tool_basename", so it can be a program name with args.
12623set dummy $tool_basename; ac_word=$2
12624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12625$as_echo_n "checking for $ac_word... " >&6; }
12626if ${ac_cv_path_WC+:} false; then :
12627  $as_echo_n "(cached) " >&6
12628else
12629  case $WC in
12630  [\\/]* | ?:[\\/]*)
12631  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12632  ;;
12633  *)
12634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12635for as_dir in $PATH
12636do
12637  IFS=$as_save_IFS
12638  test -z "$as_dir" && as_dir=.
12639    for ac_exec_ext in '' $ac_executable_extensions; do
12640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12641    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12643    break 2
12644  fi
12645done
12646  done
12647IFS=$as_save_IFS
12648
12649  ;;
12650esac
12651fi
12652WC=$ac_cv_path_WC
12653if test -n "$WC"; then
12654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12655$as_echo "$WC" >&6; }
12656else
12657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12658$as_echo "no" >&6; }
12659fi
12660
12661
12662          if test "x$WC" = x; then
12663            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12664          fi
12665        else
12666          # Otherwise we believe it is a complete path. Use it as it is.
12667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12668$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12669          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12670$as_echo_n "checking for WC... " >&6; }
12671          if test ! -x "$tool_specified"; then
12672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12673$as_echo "not found" >&6; }
12674            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12675          fi
12676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12677$as_echo "$tool_specified" >&6; }
12678        fi
12679      fi
12680    fi
12681
12682  fi
12683
12684
12685
12686  if test "x$WC" = x; then
12687    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12688  fi
12689
12690
12691
12692
12693
12694  # Publish this variable in the help.
12695
12696
12697  if [ -z "${WHICH+x}" ]; then
12698    # The variable is not set by user, try to locate tool using the code snippet
12699    for ac_prog in which
12700do
12701  # Extract the first word of "$ac_prog", so it can be a program name with args.
12702set dummy $ac_prog; ac_word=$2
12703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12704$as_echo_n "checking for $ac_word... " >&6; }
12705if ${ac_cv_path_WHICH+:} false; then :
12706  $as_echo_n "(cached) " >&6
12707else
12708  case $WHICH in
12709  [\\/]* | ?:[\\/]*)
12710  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12711  ;;
12712  *)
12713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12714for as_dir in $PATH
12715do
12716  IFS=$as_save_IFS
12717  test -z "$as_dir" && as_dir=.
12718    for ac_exec_ext in '' $ac_executable_extensions; do
12719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12720    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12722    break 2
12723  fi
12724done
12725  done
12726IFS=$as_save_IFS
12727
12728  ;;
12729esac
12730fi
12731WHICH=$ac_cv_path_WHICH
12732if test -n "$WHICH"; then
12733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12734$as_echo "$WHICH" >&6; }
12735else
12736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12737$as_echo "no" >&6; }
12738fi
12739
12740
12741  test -n "$WHICH" && break
12742done
12743
12744  else
12745    # The variable is set, but is it from the command line or the environment?
12746
12747    # Try to remove the string !WHICH! from our list.
12748    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12749    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12750      # If it failed, the variable was not from the command line. Ignore it,
12751      # but warn the user (except for BASH, which is always set by the calling BASH).
12752      if test "xWHICH" != xBASH; then
12753        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12754$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12755      fi
12756      # Try to locate tool using the code snippet
12757      for ac_prog in which
12758do
12759  # Extract the first word of "$ac_prog", so it can be a program name with args.
12760set dummy $ac_prog; ac_word=$2
12761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12762$as_echo_n "checking for $ac_word... " >&6; }
12763if ${ac_cv_path_WHICH+:} false; then :
12764  $as_echo_n "(cached) " >&6
12765else
12766  case $WHICH in
12767  [\\/]* | ?:[\\/]*)
12768  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12769  ;;
12770  *)
12771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12772for as_dir in $PATH
12773do
12774  IFS=$as_save_IFS
12775  test -z "$as_dir" && as_dir=.
12776    for ac_exec_ext in '' $ac_executable_extensions; do
12777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12778    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12780    break 2
12781  fi
12782done
12783  done
12784IFS=$as_save_IFS
12785
12786  ;;
12787esac
12788fi
12789WHICH=$ac_cv_path_WHICH
12790if test -n "$WHICH"; then
12791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12792$as_echo "$WHICH" >&6; }
12793else
12794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12795$as_echo "no" >&6; }
12796fi
12797
12798
12799  test -n "$WHICH" && break
12800done
12801
12802    else
12803      # If it succeeded, then it was overridden by the user. We will use it
12804      # for the tool.
12805
12806      # First remove it from the list of overridden variables, so we can test
12807      # for unknown variables in the end.
12808      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12809
12810      # Check if we try to supply an empty value
12811      if test "x$WHICH" = x; then
12812        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12813$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12815$as_echo_n "checking for WHICH... " >&6; }
12816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12817$as_echo "disabled" >&6; }
12818      else
12819        # Check if the provided tool contains a complete path.
12820        tool_specified="$WHICH"
12821        tool_basename="${tool_specified##*/}"
12822        if test "x$tool_basename" = "x$tool_specified"; then
12823          # A command without a complete path is provided, search $PATH.
12824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12825$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12826          # Extract the first word of "$tool_basename", so it can be a program name with args.
12827set dummy $tool_basename; ac_word=$2
12828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12829$as_echo_n "checking for $ac_word... " >&6; }
12830if ${ac_cv_path_WHICH+:} false; then :
12831  $as_echo_n "(cached) " >&6
12832else
12833  case $WHICH in
12834  [\\/]* | ?:[\\/]*)
12835  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12836  ;;
12837  *)
12838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12839for as_dir in $PATH
12840do
12841  IFS=$as_save_IFS
12842  test -z "$as_dir" && as_dir=.
12843    for ac_exec_ext in '' $ac_executable_extensions; do
12844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12845    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12847    break 2
12848  fi
12849done
12850  done
12851IFS=$as_save_IFS
12852
12853  ;;
12854esac
12855fi
12856WHICH=$ac_cv_path_WHICH
12857if test -n "$WHICH"; then
12858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12859$as_echo "$WHICH" >&6; }
12860else
12861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12862$as_echo "no" >&6; }
12863fi
12864
12865
12866          if test "x$WHICH" = x; then
12867            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12868          fi
12869        else
12870          # Otherwise we believe it is a complete path. Use it as it is.
12871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12872$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12873          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12874$as_echo_n "checking for WHICH... " >&6; }
12875          if test ! -x "$tool_specified"; then
12876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12877$as_echo "not found" >&6; }
12878            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12879          fi
12880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12881$as_echo "$tool_specified" >&6; }
12882        fi
12883      fi
12884    fi
12885
12886  fi
12887
12888
12889
12890  if test "x$WHICH" = x; then
12891    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12892  fi
12893
12894
12895
12896
12897
12898  # Publish this variable in the help.
12899
12900
12901  if [ -z "${XARGS+x}" ]; then
12902    # The variable is not set by user, try to locate tool using the code snippet
12903    for ac_prog in xargs
12904do
12905  # Extract the first word of "$ac_prog", so it can be a program name with args.
12906set dummy $ac_prog; ac_word=$2
12907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12908$as_echo_n "checking for $ac_word... " >&6; }
12909if ${ac_cv_path_XARGS+:} false; then :
12910  $as_echo_n "(cached) " >&6
12911else
12912  case $XARGS in
12913  [\\/]* | ?:[\\/]*)
12914  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12915  ;;
12916  *)
12917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12918for as_dir in $PATH
12919do
12920  IFS=$as_save_IFS
12921  test -z "$as_dir" && as_dir=.
12922    for ac_exec_ext in '' $ac_executable_extensions; do
12923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12924    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12926    break 2
12927  fi
12928done
12929  done
12930IFS=$as_save_IFS
12931
12932  ;;
12933esac
12934fi
12935XARGS=$ac_cv_path_XARGS
12936if test -n "$XARGS"; then
12937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12938$as_echo "$XARGS" >&6; }
12939else
12940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12941$as_echo "no" >&6; }
12942fi
12943
12944
12945  test -n "$XARGS" && break
12946done
12947
12948  else
12949    # The variable is set, but is it from the command line or the environment?
12950
12951    # Try to remove the string !XARGS! from our list.
12952    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12953    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12954      # If it failed, the variable was not from the command line. Ignore it,
12955      # but warn the user (except for BASH, which is always set by the calling BASH).
12956      if test "xXARGS" != xBASH; then
12957        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12958$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12959      fi
12960      # Try to locate tool using the code snippet
12961      for ac_prog in xargs
12962do
12963  # Extract the first word of "$ac_prog", so it can be a program name with args.
12964set dummy $ac_prog; ac_word=$2
12965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12966$as_echo_n "checking for $ac_word... " >&6; }
12967if ${ac_cv_path_XARGS+:} false; then :
12968  $as_echo_n "(cached) " >&6
12969else
12970  case $XARGS in
12971  [\\/]* | ?:[\\/]*)
12972  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12973  ;;
12974  *)
12975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12976for as_dir in $PATH
12977do
12978  IFS=$as_save_IFS
12979  test -z "$as_dir" && as_dir=.
12980    for ac_exec_ext in '' $ac_executable_extensions; do
12981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12982    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12984    break 2
12985  fi
12986done
12987  done
12988IFS=$as_save_IFS
12989
12990  ;;
12991esac
12992fi
12993XARGS=$ac_cv_path_XARGS
12994if test -n "$XARGS"; then
12995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12996$as_echo "$XARGS" >&6; }
12997else
12998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12999$as_echo "no" >&6; }
13000fi
13001
13002
13003  test -n "$XARGS" && break
13004done
13005
13006    else
13007      # If it succeeded, then it was overridden by the user. We will use it
13008      # for the tool.
13009
13010      # First remove it from the list of overridden variables, so we can test
13011      # for unknown variables in the end.
13012      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13013
13014      # Check if we try to supply an empty value
13015      if test "x$XARGS" = x; then
13016        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13017$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13018        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13019$as_echo_n "checking for XARGS... " >&6; }
13020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13021$as_echo "disabled" >&6; }
13022      else
13023        # Check if the provided tool contains a complete path.
13024        tool_specified="$XARGS"
13025        tool_basename="${tool_specified##*/}"
13026        if test "x$tool_basename" = "x$tool_specified"; then
13027          # A command without a complete path is provided, search $PATH.
13028          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13029$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13030          # Extract the first word of "$tool_basename", so it can be a program name with args.
13031set dummy $tool_basename; ac_word=$2
13032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13033$as_echo_n "checking for $ac_word... " >&6; }
13034if ${ac_cv_path_XARGS+:} false; then :
13035  $as_echo_n "(cached) " >&6
13036else
13037  case $XARGS in
13038  [\\/]* | ?:[\\/]*)
13039  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13040  ;;
13041  *)
13042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13043for as_dir in $PATH
13044do
13045  IFS=$as_save_IFS
13046  test -z "$as_dir" && as_dir=.
13047    for ac_exec_ext in '' $ac_executable_extensions; do
13048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13049    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13051    break 2
13052  fi
13053done
13054  done
13055IFS=$as_save_IFS
13056
13057  ;;
13058esac
13059fi
13060XARGS=$ac_cv_path_XARGS
13061if test -n "$XARGS"; then
13062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13063$as_echo "$XARGS" >&6; }
13064else
13065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13066$as_echo "no" >&6; }
13067fi
13068
13069
13070          if test "x$XARGS" = x; then
13071            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13072          fi
13073        else
13074          # Otherwise we believe it is a complete path. Use it as it is.
13075          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13076$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13077          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13078$as_echo_n "checking for XARGS... " >&6; }
13079          if test ! -x "$tool_specified"; then
13080            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13081$as_echo "not found" >&6; }
13082            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13083          fi
13084          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13085$as_echo "$tool_specified" >&6; }
13086        fi
13087      fi
13088    fi
13089
13090  fi
13091
13092
13093
13094  if test "x$XARGS" = x; then
13095    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13096  fi
13097
13098
13099
13100  # Then required tools that require some special treatment.
13101
13102
13103  # Publish this variable in the help.
13104
13105
13106  if [ -z "${AWK+x}" ]; then
13107    # The variable is not set by user, try to locate tool using the code snippet
13108    for ac_prog in gawk mawk nawk awk
13109do
13110  # Extract the first word of "$ac_prog", so it can be a program name with args.
13111set dummy $ac_prog; ac_word=$2
13112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13113$as_echo_n "checking for $ac_word... " >&6; }
13114if ${ac_cv_prog_AWK+:} false; then :
13115  $as_echo_n "(cached) " >&6
13116else
13117  if test -n "$AWK"; then
13118  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13119else
13120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13121for as_dir in $PATH
13122do
13123  IFS=$as_save_IFS
13124  test -z "$as_dir" && as_dir=.
13125    for ac_exec_ext in '' $ac_executable_extensions; do
13126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13127    ac_cv_prog_AWK="$ac_prog"
13128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13129    break 2
13130  fi
13131done
13132  done
13133IFS=$as_save_IFS
13134
13135fi
13136fi
13137AWK=$ac_cv_prog_AWK
13138if test -n "$AWK"; then
13139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13140$as_echo "$AWK" >&6; }
13141else
13142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13143$as_echo "no" >&6; }
13144fi
13145
13146
13147  test -n "$AWK" && break
13148done
13149
13150  else
13151    # The variable is set, but is it from the command line or the environment?
13152
13153    # Try to remove the string !AWK! from our list.
13154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13156      # If it failed, the variable was not from the command line. Ignore it,
13157      # but warn the user (except for BASH, which is always set by the calling BASH).
13158      if test "xAWK" != xBASH; then
13159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13160$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13161      fi
13162      # Try to locate tool using the code snippet
13163      for ac_prog in gawk mawk nawk awk
13164do
13165  # Extract the first word of "$ac_prog", so it can be a program name with args.
13166set dummy $ac_prog; ac_word=$2
13167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13168$as_echo_n "checking for $ac_word... " >&6; }
13169if ${ac_cv_prog_AWK+:} false; then :
13170  $as_echo_n "(cached) " >&6
13171else
13172  if test -n "$AWK"; then
13173  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13174else
13175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13176for as_dir in $PATH
13177do
13178  IFS=$as_save_IFS
13179  test -z "$as_dir" && as_dir=.
13180    for ac_exec_ext in '' $ac_executable_extensions; do
13181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13182    ac_cv_prog_AWK="$ac_prog"
13183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13184    break 2
13185  fi
13186done
13187  done
13188IFS=$as_save_IFS
13189
13190fi
13191fi
13192AWK=$ac_cv_prog_AWK
13193if test -n "$AWK"; then
13194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13195$as_echo "$AWK" >&6; }
13196else
13197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13198$as_echo "no" >&6; }
13199fi
13200
13201
13202  test -n "$AWK" && break
13203done
13204
13205    else
13206      # If it succeeded, then it was overridden by the user. We will use it
13207      # for the tool.
13208
13209      # First remove it from the list of overridden variables, so we can test
13210      # for unknown variables in the end.
13211      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13212
13213      # Check if we try to supply an empty value
13214      if test "x$AWK" = x; then
13215        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13216$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13218$as_echo_n "checking for AWK... " >&6; }
13219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13220$as_echo "disabled" >&6; }
13221      else
13222        # Check if the provided tool contains a complete path.
13223        tool_specified="$AWK"
13224        tool_basename="${tool_specified##*/}"
13225        if test "x$tool_basename" = "x$tool_specified"; then
13226          # A command without a complete path is provided, search $PATH.
13227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13228$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13229          # Extract the first word of "$tool_basename", so it can be a program name with args.
13230set dummy $tool_basename; ac_word=$2
13231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13232$as_echo_n "checking for $ac_word... " >&6; }
13233if ${ac_cv_path_AWK+:} false; then :
13234  $as_echo_n "(cached) " >&6
13235else
13236  case $AWK in
13237  [\\/]* | ?:[\\/]*)
13238  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13239  ;;
13240  *)
13241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13242for as_dir in $PATH
13243do
13244  IFS=$as_save_IFS
13245  test -z "$as_dir" && as_dir=.
13246    for ac_exec_ext in '' $ac_executable_extensions; do
13247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13248    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13250    break 2
13251  fi
13252done
13253  done
13254IFS=$as_save_IFS
13255
13256  ;;
13257esac
13258fi
13259AWK=$ac_cv_path_AWK
13260if test -n "$AWK"; then
13261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13262$as_echo "$AWK" >&6; }
13263else
13264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13265$as_echo "no" >&6; }
13266fi
13267
13268
13269          if test "x$AWK" = x; then
13270            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13271          fi
13272        else
13273          # Otherwise we believe it is a complete path. Use it as it is.
13274          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13275$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13276          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13277$as_echo_n "checking for AWK... " >&6; }
13278          if test ! -x "$tool_specified"; then
13279            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13280$as_echo "not found" >&6; }
13281            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13282          fi
13283          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13284$as_echo "$tool_specified" >&6; }
13285        fi
13286      fi
13287    fi
13288
13289  fi
13290
13291
13292  if test "x$AWK" = x; then
13293    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13294  fi
13295
13296
13297
13298
13299  # Publish this variable in the help.
13300
13301
13302  if [ -z "${GREP+x}" ]; then
13303    # The variable is not set by user, try to locate tool using the code snippet
13304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13305$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13306if ${ac_cv_path_GREP+:} false; then :
13307  $as_echo_n "(cached) " >&6
13308else
13309  if test -z "$GREP"; then
13310  ac_path_GREP_found=false
13311  # Loop through the user's path and test for each of PROGNAME-LIST
13312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13313for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13314do
13315  IFS=$as_save_IFS
13316  test -z "$as_dir" && as_dir=.
13317    for ac_prog in grep ggrep; do
13318    for ac_exec_ext in '' $ac_executable_extensions; do
13319      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13320      as_fn_executable_p "$ac_path_GREP" || continue
13321# Check for GNU ac_path_GREP and select it if it is found.
13322  # Check for GNU $ac_path_GREP
13323case `"$ac_path_GREP" --version 2>&1` in
13324*GNU*)
13325  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13326*)
13327  ac_count=0
13328  $as_echo_n 0123456789 >"conftest.in"
13329  while :
13330  do
13331    cat "conftest.in" "conftest.in" >"conftest.tmp"
13332    mv "conftest.tmp" "conftest.in"
13333    cp "conftest.in" "conftest.nl"
13334    $as_echo 'GREP' >> "conftest.nl"
13335    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13336    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13337    as_fn_arith $ac_count + 1 && ac_count=$as_val
13338    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13339      # Best one so far, save it but keep looking for a better one
13340      ac_cv_path_GREP="$ac_path_GREP"
13341      ac_path_GREP_max=$ac_count
13342    fi
13343    # 10*(2^10) chars as input seems more than enough
13344    test $ac_count -gt 10 && break
13345  done
13346  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13347esac
13348
13349      $ac_path_GREP_found && break 3
13350    done
13351  done
13352  done
13353IFS=$as_save_IFS
13354  if test -z "$ac_cv_path_GREP"; then
13355    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13356  fi
13357else
13358  ac_cv_path_GREP=$GREP
13359fi
13360
13361fi
13362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13363$as_echo "$ac_cv_path_GREP" >&6; }
13364 GREP="$ac_cv_path_GREP"
13365
13366
13367  else
13368    # The variable is set, but is it from the command line or the environment?
13369
13370    # Try to remove the string !GREP! from our list.
13371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13373      # If it failed, the variable was not from the command line. Ignore it,
13374      # but warn the user (except for BASH, which is always set by the calling BASH).
13375      if test "xGREP" != xBASH; then
13376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13377$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13378      fi
13379      # Try to locate tool using the code snippet
13380      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13381$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13382if ${ac_cv_path_GREP+:} false; then :
13383  $as_echo_n "(cached) " >&6
13384else
13385  if test -z "$GREP"; then
13386  ac_path_GREP_found=false
13387  # Loop through the user's path and test for each of PROGNAME-LIST
13388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13389for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13390do
13391  IFS=$as_save_IFS
13392  test -z "$as_dir" && as_dir=.
13393    for ac_prog in grep ggrep; do
13394    for ac_exec_ext in '' $ac_executable_extensions; do
13395      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13396      as_fn_executable_p "$ac_path_GREP" || continue
13397# Check for GNU ac_path_GREP and select it if it is found.
13398  # Check for GNU $ac_path_GREP
13399case `"$ac_path_GREP" --version 2>&1` in
13400*GNU*)
13401  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13402*)
13403  ac_count=0
13404  $as_echo_n 0123456789 >"conftest.in"
13405  while :
13406  do
13407    cat "conftest.in" "conftest.in" >"conftest.tmp"
13408    mv "conftest.tmp" "conftest.in"
13409    cp "conftest.in" "conftest.nl"
13410    $as_echo 'GREP' >> "conftest.nl"
13411    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13412    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13413    as_fn_arith $ac_count + 1 && ac_count=$as_val
13414    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13415      # Best one so far, save it but keep looking for a better one
13416      ac_cv_path_GREP="$ac_path_GREP"
13417      ac_path_GREP_max=$ac_count
13418    fi
13419    # 10*(2^10) chars as input seems more than enough
13420    test $ac_count -gt 10 && break
13421  done
13422  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13423esac
13424
13425      $ac_path_GREP_found && break 3
13426    done
13427  done
13428  done
13429IFS=$as_save_IFS
13430  if test -z "$ac_cv_path_GREP"; then
13431    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13432  fi
13433else
13434  ac_cv_path_GREP=$GREP
13435fi
13436
13437fi
13438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13439$as_echo "$ac_cv_path_GREP" >&6; }
13440 GREP="$ac_cv_path_GREP"
13441
13442
13443    else
13444      # If it succeeded, then it was overridden by the user. We will use it
13445      # for the tool.
13446
13447      # First remove it from the list of overridden variables, so we can test
13448      # for unknown variables in the end.
13449      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13450
13451      # Check if we try to supply an empty value
13452      if test "x$GREP" = x; then
13453        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13454$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13456$as_echo_n "checking for GREP... " >&6; }
13457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13458$as_echo "disabled" >&6; }
13459      else
13460        # Check if the provided tool contains a complete path.
13461        tool_specified="$GREP"
13462        tool_basename="${tool_specified##*/}"
13463        if test "x$tool_basename" = "x$tool_specified"; then
13464          # A command without a complete path is provided, search $PATH.
13465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13466$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13467          # Extract the first word of "$tool_basename", so it can be a program name with args.
13468set dummy $tool_basename; ac_word=$2
13469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13470$as_echo_n "checking for $ac_word... " >&6; }
13471if ${ac_cv_path_GREP+:} false; then :
13472  $as_echo_n "(cached) " >&6
13473else
13474  case $GREP in
13475  [\\/]* | ?:[\\/]*)
13476  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13477  ;;
13478  *)
13479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13480for as_dir in $PATH
13481do
13482  IFS=$as_save_IFS
13483  test -z "$as_dir" && as_dir=.
13484    for ac_exec_ext in '' $ac_executable_extensions; do
13485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13486    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13488    break 2
13489  fi
13490done
13491  done
13492IFS=$as_save_IFS
13493
13494  ;;
13495esac
13496fi
13497GREP=$ac_cv_path_GREP
13498if test -n "$GREP"; then
13499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13500$as_echo "$GREP" >&6; }
13501else
13502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13503$as_echo "no" >&6; }
13504fi
13505
13506
13507          if test "x$GREP" = x; then
13508            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13509          fi
13510        else
13511          # Otherwise we believe it is a complete path. Use it as it is.
13512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13513$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13514          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13515$as_echo_n "checking for GREP... " >&6; }
13516          if test ! -x "$tool_specified"; then
13517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13518$as_echo "not found" >&6; }
13519            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13520          fi
13521          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13522$as_echo "$tool_specified" >&6; }
13523        fi
13524      fi
13525    fi
13526
13527  fi
13528
13529
13530  if test "x$GREP" = x; then
13531    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13532  fi
13533
13534
13535
13536
13537  # Publish this variable in the help.
13538
13539
13540  if [ -z "${EGREP+x}" ]; then
13541    # The variable is not set by user, try to locate tool using the code snippet
13542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13543$as_echo_n "checking for egrep... " >&6; }
13544if ${ac_cv_path_EGREP+:} false; then :
13545  $as_echo_n "(cached) " >&6
13546else
13547  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13548   then ac_cv_path_EGREP="$GREP -E"
13549   else
13550     if test -z "$EGREP"; then
13551  ac_path_EGREP_found=false
13552  # Loop through the user's path and test for each of PROGNAME-LIST
13553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13554for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13555do
13556  IFS=$as_save_IFS
13557  test -z "$as_dir" && as_dir=.
13558    for ac_prog in egrep; do
13559    for ac_exec_ext in '' $ac_executable_extensions; do
13560      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13561      as_fn_executable_p "$ac_path_EGREP" || continue
13562# Check for GNU ac_path_EGREP and select it if it is found.
13563  # Check for GNU $ac_path_EGREP
13564case `"$ac_path_EGREP" --version 2>&1` in
13565*GNU*)
13566  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13567*)
13568  ac_count=0
13569  $as_echo_n 0123456789 >"conftest.in"
13570  while :
13571  do
13572    cat "conftest.in" "conftest.in" >"conftest.tmp"
13573    mv "conftest.tmp" "conftest.in"
13574    cp "conftest.in" "conftest.nl"
13575    $as_echo 'EGREP' >> "conftest.nl"
13576    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13577    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13578    as_fn_arith $ac_count + 1 && ac_count=$as_val
13579    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13580      # Best one so far, save it but keep looking for a better one
13581      ac_cv_path_EGREP="$ac_path_EGREP"
13582      ac_path_EGREP_max=$ac_count
13583    fi
13584    # 10*(2^10) chars as input seems more than enough
13585    test $ac_count -gt 10 && break
13586  done
13587  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13588esac
13589
13590      $ac_path_EGREP_found && break 3
13591    done
13592  done
13593  done
13594IFS=$as_save_IFS
13595  if test -z "$ac_cv_path_EGREP"; then
13596    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13597  fi
13598else
13599  ac_cv_path_EGREP=$EGREP
13600fi
13601
13602   fi
13603fi
13604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13605$as_echo "$ac_cv_path_EGREP" >&6; }
13606 EGREP="$ac_cv_path_EGREP"
13607
13608
13609  else
13610    # The variable is set, but is it from the command line or the environment?
13611
13612    # Try to remove the string !EGREP! from our list.
13613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13615      # If it failed, the variable was not from the command line. Ignore it,
13616      # but warn the user (except for BASH, which is always set by the calling BASH).
13617      if test "xEGREP" != xBASH; then
13618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13619$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13620      fi
13621      # Try to locate tool using the code snippet
13622      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13623$as_echo_n "checking for egrep... " >&6; }
13624if ${ac_cv_path_EGREP+:} false; then :
13625  $as_echo_n "(cached) " >&6
13626else
13627  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13628   then ac_cv_path_EGREP="$GREP -E"
13629   else
13630     if test -z "$EGREP"; then
13631  ac_path_EGREP_found=false
13632  # Loop through the user's path and test for each of PROGNAME-LIST
13633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13634for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13635do
13636  IFS=$as_save_IFS
13637  test -z "$as_dir" && as_dir=.
13638    for ac_prog in egrep; do
13639    for ac_exec_ext in '' $ac_executable_extensions; do
13640      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13641      as_fn_executable_p "$ac_path_EGREP" || continue
13642# Check for GNU ac_path_EGREP and select it if it is found.
13643  # Check for GNU $ac_path_EGREP
13644case `"$ac_path_EGREP" --version 2>&1` in
13645*GNU*)
13646  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13647*)
13648  ac_count=0
13649  $as_echo_n 0123456789 >"conftest.in"
13650  while :
13651  do
13652    cat "conftest.in" "conftest.in" >"conftest.tmp"
13653    mv "conftest.tmp" "conftest.in"
13654    cp "conftest.in" "conftest.nl"
13655    $as_echo 'EGREP' >> "conftest.nl"
13656    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13657    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13658    as_fn_arith $ac_count + 1 && ac_count=$as_val
13659    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13660      # Best one so far, save it but keep looking for a better one
13661      ac_cv_path_EGREP="$ac_path_EGREP"
13662      ac_path_EGREP_max=$ac_count
13663    fi
13664    # 10*(2^10) chars as input seems more than enough
13665    test $ac_count -gt 10 && break
13666  done
13667  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13668esac
13669
13670      $ac_path_EGREP_found && break 3
13671    done
13672  done
13673  done
13674IFS=$as_save_IFS
13675  if test -z "$ac_cv_path_EGREP"; then
13676    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13677  fi
13678else
13679  ac_cv_path_EGREP=$EGREP
13680fi
13681
13682   fi
13683fi
13684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13685$as_echo "$ac_cv_path_EGREP" >&6; }
13686 EGREP="$ac_cv_path_EGREP"
13687
13688
13689    else
13690      # If it succeeded, then it was overridden by the user. We will use it
13691      # for the tool.
13692
13693      # First remove it from the list of overridden variables, so we can test
13694      # for unknown variables in the end.
13695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13696
13697      # Check if we try to supply an empty value
13698      if test "x$EGREP" = x; then
13699        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13700$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13702$as_echo_n "checking for EGREP... " >&6; }
13703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13704$as_echo "disabled" >&6; }
13705      else
13706        # Check if the provided tool contains a complete path.
13707        tool_specified="$EGREP"
13708        tool_basename="${tool_specified##*/}"
13709        if test "x$tool_basename" = "x$tool_specified"; then
13710          # A command without a complete path is provided, search $PATH.
13711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13712$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13713          # Extract the first word of "$tool_basename", so it can be a program name with args.
13714set dummy $tool_basename; ac_word=$2
13715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13716$as_echo_n "checking for $ac_word... " >&6; }
13717if ${ac_cv_path_EGREP+:} false; then :
13718  $as_echo_n "(cached) " >&6
13719else
13720  case $EGREP in
13721  [\\/]* | ?:[\\/]*)
13722  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13723  ;;
13724  *)
13725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13726for as_dir in $PATH
13727do
13728  IFS=$as_save_IFS
13729  test -z "$as_dir" && as_dir=.
13730    for ac_exec_ext in '' $ac_executable_extensions; do
13731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13732    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13734    break 2
13735  fi
13736done
13737  done
13738IFS=$as_save_IFS
13739
13740  ;;
13741esac
13742fi
13743EGREP=$ac_cv_path_EGREP
13744if test -n "$EGREP"; then
13745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13746$as_echo "$EGREP" >&6; }
13747else
13748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13749$as_echo "no" >&6; }
13750fi
13751
13752
13753          if test "x$EGREP" = x; then
13754            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13755          fi
13756        else
13757          # Otherwise we believe it is a complete path. Use it as it is.
13758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13759$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13760          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13761$as_echo_n "checking for EGREP... " >&6; }
13762          if test ! -x "$tool_specified"; then
13763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13764$as_echo "not found" >&6; }
13765            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13766          fi
13767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13768$as_echo "$tool_specified" >&6; }
13769        fi
13770      fi
13771    fi
13772
13773  fi
13774
13775
13776  if test "x$EGREP" = x; then
13777    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13778  fi
13779
13780
13781
13782
13783  # Publish this variable in the help.
13784
13785
13786  if [ -z "${FGREP+x}" ]; then
13787    # The variable is not set by user, try to locate tool using the code snippet
13788    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13789$as_echo_n "checking for fgrep... " >&6; }
13790if ${ac_cv_path_FGREP+:} false; then :
13791  $as_echo_n "(cached) " >&6
13792else
13793  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13794   then ac_cv_path_FGREP="$GREP -F"
13795   else
13796     if test -z "$FGREP"; then
13797  ac_path_FGREP_found=false
13798  # Loop through the user's path and test for each of PROGNAME-LIST
13799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13800for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13801do
13802  IFS=$as_save_IFS
13803  test -z "$as_dir" && as_dir=.
13804    for ac_prog in fgrep; do
13805    for ac_exec_ext in '' $ac_executable_extensions; do
13806      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13807      as_fn_executable_p "$ac_path_FGREP" || continue
13808# Check for GNU ac_path_FGREP and select it if it is found.
13809  # Check for GNU $ac_path_FGREP
13810case `"$ac_path_FGREP" --version 2>&1` in
13811*GNU*)
13812  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13813*)
13814  ac_count=0
13815  $as_echo_n 0123456789 >"conftest.in"
13816  while :
13817  do
13818    cat "conftest.in" "conftest.in" >"conftest.tmp"
13819    mv "conftest.tmp" "conftest.in"
13820    cp "conftest.in" "conftest.nl"
13821    $as_echo 'FGREP' >> "conftest.nl"
13822    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13823    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13824    as_fn_arith $ac_count + 1 && ac_count=$as_val
13825    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13826      # Best one so far, save it but keep looking for a better one
13827      ac_cv_path_FGREP="$ac_path_FGREP"
13828      ac_path_FGREP_max=$ac_count
13829    fi
13830    # 10*(2^10) chars as input seems more than enough
13831    test $ac_count -gt 10 && break
13832  done
13833  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13834esac
13835
13836      $ac_path_FGREP_found && break 3
13837    done
13838  done
13839  done
13840IFS=$as_save_IFS
13841  if test -z "$ac_cv_path_FGREP"; then
13842    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13843  fi
13844else
13845  ac_cv_path_FGREP=$FGREP
13846fi
13847
13848   fi
13849fi
13850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13851$as_echo "$ac_cv_path_FGREP" >&6; }
13852 FGREP="$ac_cv_path_FGREP"
13853
13854
13855  else
13856    # The variable is set, but is it from the command line or the environment?
13857
13858    # Try to remove the string !FGREP! from our list.
13859    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13860    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13861      # If it failed, the variable was not from the command line. Ignore it,
13862      # but warn the user (except for BASH, which is always set by the calling BASH).
13863      if test "xFGREP" != xBASH; then
13864        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13865$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13866      fi
13867      # Try to locate tool using the code snippet
13868      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13869$as_echo_n "checking for fgrep... " >&6; }
13870if ${ac_cv_path_FGREP+:} false; then :
13871  $as_echo_n "(cached) " >&6
13872else
13873  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13874   then ac_cv_path_FGREP="$GREP -F"
13875   else
13876     if test -z "$FGREP"; then
13877  ac_path_FGREP_found=false
13878  # Loop through the user's path and test for each of PROGNAME-LIST
13879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13880for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13881do
13882  IFS=$as_save_IFS
13883  test -z "$as_dir" && as_dir=.
13884    for ac_prog in fgrep; do
13885    for ac_exec_ext in '' $ac_executable_extensions; do
13886      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13887      as_fn_executable_p "$ac_path_FGREP" || continue
13888# Check for GNU ac_path_FGREP and select it if it is found.
13889  # Check for GNU $ac_path_FGREP
13890case `"$ac_path_FGREP" --version 2>&1` in
13891*GNU*)
13892  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13893*)
13894  ac_count=0
13895  $as_echo_n 0123456789 >"conftest.in"
13896  while :
13897  do
13898    cat "conftest.in" "conftest.in" >"conftest.tmp"
13899    mv "conftest.tmp" "conftest.in"
13900    cp "conftest.in" "conftest.nl"
13901    $as_echo 'FGREP' >> "conftest.nl"
13902    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13903    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13904    as_fn_arith $ac_count + 1 && ac_count=$as_val
13905    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13906      # Best one so far, save it but keep looking for a better one
13907      ac_cv_path_FGREP="$ac_path_FGREP"
13908      ac_path_FGREP_max=$ac_count
13909    fi
13910    # 10*(2^10) chars as input seems more than enough
13911    test $ac_count -gt 10 && break
13912  done
13913  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13914esac
13915
13916      $ac_path_FGREP_found && break 3
13917    done
13918  done
13919  done
13920IFS=$as_save_IFS
13921  if test -z "$ac_cv_path_FGREP"; then
13922    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13923  fi
13924else
13925  ac_cv_path_FGREP=$FGREP
13926fi
13927
13928   fi
13929fi
13930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13931$as_echo "$ac_cv_path_FGREP" >&6; }
13932 FGREP="$ac_cv_path_FGREP"
13933
13934
13935    else
13936      # If it succeeded, then it was overridden by the user. We will use it
13937      # for the tool.
13938
13939      # First remove it from the list of overridden variables, so we can test
13940      # for unknown variables in the end.
13941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13942
13943      # Check if we try to supply an empty value
13944      if test "x$FGREP" = x; then
13945        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13946$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13948$as_echo_n "checking for FGREP... " >&6; }
13949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13950$as_echo "disabled" >&6; }
13951      else
13952        # Check if the provided tool contains a complete path.
13953        tool_specified="$FGREP"
13954        tool_basename="${tool_specified##*/}"
13955        if test "x$tool_basename" = "x$tool_specified"; then
13956          # A command without a complete path is provided, search $PATH.
13957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13958$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13959          # Extract the first word of "$tool_basename", so it can be a program name with args.
13960set dummy $tool_basename; ac_word=$2
13961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13962$as_echo_n "checking for $ac_word... " >&6; }
13963if ${ac_cv_path_FGREP+:} false; then :
13964  $as_echo_n "(cached) " >&6
13965else
13966  case $FGREP in
13967  [\\/]* | ?:[\\/]*)
13968  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13969  ;;
13970  *)
13971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13972for as_dir in $PATH
13973do
13974  IFS=$as_save_IFS
13975  test -z "$as_dir" && as_dir=.
13976    for ac_exec_ext in '' $ac_executable_extensions; do
13977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13978    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13980    break 2
13981  fi
13982done
13983  done
13984IFS=$as_save_IFS
13985
13986  ;;
13987esac
13988fi
13989FGREP=$ac_cv_path_FGREP
13990if test -n "$FGREP"; then
13991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13992$as_echo "$FGREP" >&6; }
13993else
13994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13995$as_echo "no" >&6; }
13996fi
13997
13998
13999          if test "x$FGREP" = x; then
14000            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14001          fi
14002        else
14003          # Otherwise we believe it is a complete path. Use it as it is.
14004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14005$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14006          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14007$as_echo_n "checking for FGREP... " >&6; }
14008          if test ! -x "$tool_specified"; then
14009            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14010$as_echo "not found" >&6; }
14011            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14012          fi
14013          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14014$as_echo "$tool_specified" >&6; }
14015        fi
14016      fi
14017    fi
14018
14019  fi
14020
14021
14022  if test "x$FGREP" = x; then
14023    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14024  fi
14025
14026
14027
14028
14029  # Publish this variable in the help.
14030
14031
14032  if [ -z "${SED+x}" ]; then
14033    # The variable is not set by user, try to locate tool using the code snippet
14034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14035$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14036if ${ac_cv_path_SED+:} false; then :
14037  $as_echo_n "(cached) " >&6
14038else
14039            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14040     for ac_i in 1 2 3 4 5 6 7; do
14041       ac_script="$ac_script$as_nl$ac_script"
14042     done
14043     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14044     { ac_script=; unset ac_script;}
14045     if test -z "$SED"; then
14046  ac_path_SED_found=false
14047  # Loop through the user's path and test for each of PROGNAME-LIST
14048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14049for as_dir in $PATH
14050do
14051  IFS=$as_save_IFS
14052  test -z "$as_dir" && as_dir=.
14053    for ac_prog in sed gsed; do
14054    for ac_exec_ext in '' $ac_executable_extensions; do
14055      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14056      as_fn_executable_p "$ac_path_SED" || continue
14057# Check for GNU ac_path_SED and select it if it is found.
14058  # Check for GNU $ac_path_SED
14059case `"$ac_path_SED" --version 2>&1` in
14060*GNU*)
14061  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14062*)
14063  ac_count=0
14064  $as_echo_n 0123456789 >"conftest.in"
14065  while :
14066  do
14067    cat "conftest.in" "conftest.in" >"conftest.tmp"
14068    mv "conftest.tmp" "conftest.in"
14069    cp "conftest.in" "conftest.nl"
14070    $as_echo '' >> "conftest.nl"
14071    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14072    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14073    as_fn_arith $ac_count + 1 && ac_count=$as_val
14074    if test $ac_count -gt ${ac_path_SED_max-0}; then
14075      # Best one so far, save it but keep looking for a better one
14076      ac_cv_path_SED="$ac_path_SED"
14077      ac_path_SED_max=$ac_count
14078    fi
14079    # 10*(2^10) chars as input seems more than enough
14080    test $ac_count -gt 10 && break
14081  done
14082  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14083esac
14084
14085      $ac_path_SED_found && break 3
14086    done
14087  done
14088  done
14089IFS=$as_save_IFS
14090  if test -z "$ac_cv_path_SED"; then
14091    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14092  fi
14093else
14094  ac_cv_path_SED=$SED
14095fi
14096
14097fi
14098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14099$as_echo "$ac_cv_path_SED" >&6; }
14100 SED="$ac_cv_path_SED"
14101  rm -f conftest.sed
14102
14103  else
14104    # The variable is set, but is it from the command line or the environment?
14105
14106    # Try to remove the string !SED! from our list.
14107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14109      # If it failed, the variable was not from the command line. Ignore it,
14110      # but warn the user (except for BASH, which is always set by the calling BASH).
14111      if test "xSED" != xBASH; then
14112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14113$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14114      fi
14115      # Try to locate tool using the code snippet
14116      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14117$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14118if ${ac_cv_path_SED+:} false; then :
14119  $as_echo_n "(cached) " >&6
14120else
14121            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14122     for ac_i in 1 2 3 4 5 6 7; do
14123       ac_script="$ac_script$as_nl$ac_script"
14124     done
14125     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14126     { ac_script=; unset ac_script;}
14127     if test -z "$SED"; then
14128  ac_path_SED_found=false
14129  # Loop through the user's path and test for each of PROGNAME-LIST
14130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14131for as_dir in $PATH
14132do
14133  IFS=$as_save_IFS
14134  test -z "$as_dir" && as_dir=.
14135    for ac_prog in sed gsed; do
14136    for ac_exec_ext in '' $ac_executable_extensions; do
14137      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14138      as_fn_executable_p "$ac_path_SED" || continue
14139# Check for GNU ac_path_SED and select it if it is found.
14140  # Check for GNU $ac_path_SED
14141case `"$ac_path_SED" --version 2>&1` in
14142*GNU*)
14143  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14144*)
14145  ac_count=0
14146  $as_echo_n 0123456789 >"conftest.in"
14147  while :
14148  do
14149    cat "conftest.in" "conftest.in" >"conftest.tmp"
14150    mv "conftest.tmp" "conftest.in"
14151    cp "conftest.in" "conftest.nl"
14152    $as_echo '' >> "conftest.nl"
14153    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14154    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14155    as_fn_arith $ac_count + 1 && ac_count=$as_val
14156    if test $ac_count -gt ${ac_path_SED_max-0}; then
14157      # Best one so far, save it but keep looking for a better one
14158      ac_cv_path_SED="$ac_path_SED"
14159      ac_path_SED_max=$ac_count
14160    fi
14161    # 10*(2^10) chars as input seems more than enough
14162    test $ac_count -gt 10 && break
14163  done
14164  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14165esac
14166
14167      $ac_path_SED_found && break 3
14168    done
14169  done
14170  done
14171IFS=$as_save_IFS
14172  if test -z "$ac_cv_path_SED"; then
14173    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14174  fi
14175else
14176  ac_cv_path_SED=$SED
14177fi
14178
14179fi
14180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14181$as_echo "$ac_cv_path_SED" >&6; }
14182 SED="$ac_cv_path_SED"
14183  rm -f conftest.sed
14184
14185    else
14186      # If it succeeded, then it was overridden by the user. We will use it
14187      # for the tool.
14188
14189      # First remove it from the list of overridden variables, so we can test
14190      # for unknown variables in the end.
14191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14192
14193      # Check if we try to supply an empty value
14194      if test "x$SED" = x; then
14195        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14196$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14197        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14198$as_echo_n "checking for SED... " >&6; }
14199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14200$as_echo "disabled" >&6; }
14201      else
14202        # Check if the provided tool contains a complete path.
14203        tool_specified="$SED"
14204        tool_basename="${tool_specified##*/}"
14205        if test "x$tool_basename" = "x$tool_specified"; then
14206          # A command without a complete path is provided, search $PATH.
14207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14208$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14209          # Extract the first word of "$tool_basename", so it can be a program name with args.
14210set dummy $tool_basename; ac_word=$2
14211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14212$as_echo_n "checking for $ac_word... " >&6; }
14213if ${ac_cv_path_SED+:} false; then :
14214  $as_echo_n "(cached) " >&6
14215else
14216  case $SED in
14217  [\\/]* | ?:[\\/]*)
14218  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14219  ;;
14220  *)
14221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14222for as_dir in $PATH
14223do
14224  IFS=$as_save_IFS
14225  test -z "$as_dir" && as_dir=.
14226    for ac_exec_ext in '' $ac_executable_extensions; do
14227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14228    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14230    break 2
14231  fi
14232done
14233  done
14234IFS=$as_save_IFS
14235
14236  ;;
14237esac
14238fi
14239SED=$ac_cv_path_SED
14240if test -n "$SED"; then
14241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14242$as_echo "$SED" >&6; }
14243else
14244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14245$as_echo "no" >&6; }
14246fi
14247
14248
14249          if test "x$SED" = x; then
14250            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14251          fi
14252        else
14253          # Otherwise we believe it is a complete path. Use it as it is.
14254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14255$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14256          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14257$as_echo_n "checking for SED... " >&6; }
14258          if test ! -x "$tool_specified"; then
14259            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14260$as_echo "not found" >&6; }
14261            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14262          fi
14263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14264$as_echo "$tool_specified" >&6; }
14265        fi
14266      fi
14267    fi
14268
14269  fi
14270
14271
14272  if test "x$SED" = x; then
14273    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14274  fi
14275
14276
14277
14278  # Always force rm.
14279  RM="$RM -f"
14280
14281  # pwd behaves differently on various platforms and some don't support the -L flag.
14282  # Always use the bash builtin pwd to get uniform behavior.
14283  THEPWDCMD=pwd
14284
14285  # These are not required on all platforms
14286
14287
14288  # Publish this variable in the help.
14289
14290
14291  if [ -z "${CYGPATH+x}" ]; then
14292    # The variable is not set by user, try to locate tool using the code snippet
14293    for ac_prog in cygpath
14294do
14295  # Extract the first word of "$ac_prog", so it can be a program name with args.
14296set dummy $ac_prog; ac_word=$2
14297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14298$as_echo_n "checking for $ac_word... " >&6; }
14299if ${ac_cv_path_CYGPATH+:} false; then :
14300  $as_echo_n "(cached) " >&6
14301else
14302  case $CYGPATH in
14303  [\\/]* | ?:[\\/]*)
14304  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14305  ;;
14306  *)
14307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14308for as_dir in $PATH
14309do
14310  IFS=$as_save_IFS
14311  test -z "$as_dir" && as_dir=.
14312    for ac_exec_ext in '' $ac_executable_extensions; do
14313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14314    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14316    break 2
14317  fi
14318done
14319  done
14320IFS=$as_save_IFS
14321
14322  ;;
14323esac
14324fi
14325CYGPATH=$ac_cv_path_CYGPATH
14326if test -n "$CYGPATH"; then
14327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14328$as_echo "$CYGPATH" >&6; }
14329else
14330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14331$as_echo "no" >&6; }
14332fi
14333
14334
14335  test -n "$CYGPATH" && break
14336done
14337
14338  else
14339    # The variable is set, but is it from the command line or the environment?
14340
14341    # Try to remove the string !CYGPATH! from our list.
14342    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14343    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14344      # If it failed, the variable was not from the command line. Ignore it,
14345      # but warn the user (except for BASH, which is always set by the calling BASH).
14346      if test "xCYGPATH" != xBASH; then
14347        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14348$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14349      fi
14350      # Try to locate tool using the code snippet
14351      for ac_prog in cygpath
14352do
14353  # Extract the first word of "$ac_prog", so it can be a program name with args.
14354set dummy $ac_prog; ac_word=$2
14355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14356$as_echo_n "checking for $ac_word... " >&6; }
14357if ${ac_cv_path_CYGPATH+:} false; then :
14358  $as_echo_n "(cached) " >&6
14359else
14360  case $CYGPATH in
14361  [\\/]* | ?:[\\/]*)
14362  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14363  ;;
14364  *)
14365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14366for as_dir in $PATH
14367do
14368  IFS=$as_save_IFS
14369  test -z "$as_dir" && as_dir=.
14370    for ac_exec_ext in '' $ac_executable_extensions; do
14371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14372    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14374    break 2
14375  fi
14376done
14377  done
14378IFS=$as_save_IFS
14379
14380  ;;
14381esac
14382fi
14383CYGPATH=$ac_cv_path_CYGPATH
14384if test -n "$CYGPATH"; then
14385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14386$as_echo "$CYGPATH" >&6; }
14387else
14388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14389$as_echo "no" >&6; }
14390fi
14391
14392
14393  test -n "$CYGPATH" && break
14394done
14395
14396    else
14397      # If it succeeded, then it was overridden by the user. We will use it
14398      # for the tool.
14399
14400      # First remove it from the list of overridden variables, so we can test
14401      # for unknown variables in the end.
14402      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14403
14404      # Check if we try to supply an empty value
14405      if test "x$CYGPATH" = x; then
14406        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14407$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14408        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14409$as_echo_n "checking for CYGPATH... " >&6; }
14410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14411$as_echo "disabled" >&6; }
14412      else
14413        # Check if the provided tool contains a complete path.
14414        tool_specified="$CYGPATH"
14415        tool_basename="${tool_specified##*/}"
14416        if test "x$tool_basename" = "x$tool_specified"; then
14417          # A command without a complete path is provided, search $PATH.
14418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14419$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14420          # Extract the first word of "$tool_basename", so it can be a program name with args.
14421set dummy $tool_basename; ac_word=$2
14422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14423$as_echo_n "checking for $ac_word... " >&6; }
14424if ${ac_cv_path_CYGPATH+:} false; then :
14425  $as_echo_n "(cached) " >&6
14426else
14427  case $CYGPATH in
14428  [\\/]* | ?:[\\/]*)
14429  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14430  ;;
14431  *)
14432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14433for as_dir in $PATH
14434do
14435  IFS=$as_save_IFS
14436  test -z "$as_dir" && as_dir=.
14437    for ac_exec_ext in '' $ac_executable_extensions; do
14438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14439    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14441    break 2
14442  fi
14443done
14444  done
14445IFS=$as_save_IFS
14446
14447  ;;
14448esac
14449fi
14450CYGPATH=$ac_cv_path_CYGPATH
14451if test -n "$CYGPATH"; then
14452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14453$as_echo "$CYGPATH" >&6; }
14454else
14455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14456$as_echo "no" >&6; }
14457fi
14458
14459
14460          if test "x$CYGPATH" = x; then
14461            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14462          fi
14463        else
14464          # Otherwise we believe it is a complete path. Use it as it is.
14465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14466$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14467          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14468$as_echo_n "checking for CYGPATH... " >&6; }
14469          if test ! -x "$tool_specified"; then
14470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14471$as_echo "not found" >&6; }
14472            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14473          fi
14474          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14475$as_echo "$tool_specified" >&6; }
14476        fi
14477      fi
14478    fi
14479
14480  fi
14481
14482
14483
14484
14485  # Publish this variable in the help.
14486
14487
14488  if [ -z "${READLINK+x}" ]; then
14489    # The variable is not set by user, try to locate tool using the code snippet
14490    for ac_prog in greadlink readlink
14491do
14492  # Extract the first word of "$ac_prog", so it can be a program name with args.
14493set dummy $ac_prog; ac_word=$2
14494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14495$as_echo_n "checking for $ac_word... " >&6; }
14496if ${ac_cv_path_READLINK+:} false; then :
14497  $as_echo_n "(cached) " >&6
14498else
14499  case $READLINK in
14500  [\\/]* | ?:[\\/]*)
14501  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14502  ;;
14503  *)
14504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14505for as_dir in $PATH
14506do
14507  IFS=$as_save_IFS
14508  test -z "$as_dir" && as_dir=.
14509    for ac_exec_ext in '' $ac_executable_extensions; do
14510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14511    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14513    break 2
14514  fi
14515done
14516  done
14517IFS=$as_save_IFS
14518
14519  ;;
14520esac
14521fi
14522READLINK=$ac_cv_path_READLINK
14523if test -n "$READLINK"; then
14524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14525$as_echo "$READLINK" >&6; }
14526else
14527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14528$as_echo "no" >&6; }
14529fi
14530
14531
14532  test -n "$READLINK" && break
14533done
14534
14535  else
14536    # The variable is set, but is it from the command line or the environment?
14537
14538    # Try to remove the string !READLINK! from our list.
14539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14541      # If it failed, the variable was not from the command line. Ignore it,
14542      # but warn the user (except for BASH, which is always set by the calling BASH).
14543      if test "xREADLINK" != xBASH; then
14544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14545$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14546      fi
14547      # Try to locate tool using the code snippet
14548      for ac_prog in greadlink readlink
14549do
14550  # Extract the first word of "$ac_prog", so it can be a program name with args.
14551set dummy $ac_prog; ac_word=$2
14552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14553$as_echo_n "checking for $ac_word... " >&6; }
14554if ${ac_cv_path_READLINK+:} false; then :
14555  $as_echo_n "(cached) " >&6
14556else
14557  case $READLINK in
14558  [\\/]* | ?:[\\/]*)
14559  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14560  ;;
14561  *)
14562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14563for as_dir in $PATH
14564do
14565  IFS=$as_save_IFS
14566  test -z "$as_dir" && as_dir=.
14567    for ac_exec_ext in '' $ac_executable_extensions; do
14568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14569    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14571    break 2
14572  fi
14573done
14574  done
14575IFS=$as_save_IFS
14576
14577  ;;
14578esac
14579fi
14580READLINK=$ac_cv_path_READLINK
14581if test -n "$READLINK"; then
14582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14583$as_echo "$READLINK" >&6; }
14584else
14585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14586$as_echo "no" >&6; }
14587fi
14588
14589
14590  test -n "$READLINK" && break
14591done
14592
14593    else
14594      # If it succeeded, then it was overridden by the user. We will use it
14595      # for the tool.
14596
14597      # First remove it from the list of overridden variables, so we can test
14598      # for unknown variables in the end.
14599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14600
14601      # Check if we try to supply an empty value
14602      if test "x$READLINK" = x; then
14603        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14604$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14605        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14606$as_echo_n "checking for READLINK... " >&6; }
14607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14608$as_echo "disabled" >&6; }
14609      else
14610        # Check if the provided tool contains a complete path.
14611        tool_specified="$READLINK"
14612        tool_basename="${tool_specified##*/}"
14613        if test "x$tool_basename" = "x$tool_specified"; then
14614          # A command without a complete path is provided, search $PATH.
14615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14616$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14617          # Extract the first word of "$tool_basename", so it can be a program name with args.
14618set dummy $tool_basename; ac_word=$2
14619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14620$as_echo_n "checking for $ac_word... " >&6; }
14621if ${ac_cv_path_READLINK+:} false; then :
14622  $as_echo_n "(cached) " >&6
14623else
14624  case $READLINK in
14625  [\\/]* | ?:[\\/]*)
14626  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14627  ;;
14628  *)
14629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14630for as_dir in $PATH
14631do
14632  IFS=$as_save_IFS
14633  test -z "$as_dir" && as_dir=.
14634    for ac_exec_ext in '' $ac_executable_extensions; do
14635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14636    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14638    break 2
14639  fi
14640done
14641  done
14642IFS=$as_save_IFS
14643
14644  ;;
14645esac
14646fi
14647READLINK=$ac_cv_path_READLINK
14648if test -n "$READLINK"; then
14649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14650$as_echo "$READLINK" >&6; }
14651else
14652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14653$as_echo "no" >&6; }
14654fi
14655
14656
14657          if test "x$READLINK" = x; then
14658            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14659          fi
14660        else
14661          # Otherwise we believe it is a complete path. Use it as it is.
14662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14663$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14664          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14665$as_echo_n "checking for READLINK... " >&6; }
14666          if test ! -x "$tool_specified"; then
14667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14668$as_echo "not found" >&6; }
14669            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14670          fi
14671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14672$as_echo "$tool_specified" >&6; }
14673        fi
14674      fi
14675    fi
14676
14677  fi
14678
14679
14680
14681
14682  # Publish this variable in the help.
14683
14684
14685  if [ -z "${DF+x}" ]; then
14686    # The variable is not set by user, try to locate tool using the code snippet
14687    for ac_prog in df
14688do
14689  # Extract the first word of "$ac_prog", so it can be a program name with args.
14690set dummy $ac_prog; ac_word=$2
14691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14692$as_echo_n "checking for $ac_word... " >&6; }
14693if ${ac_cv_path_DF+:} false; then :
14694  $as_echo_n "(cached) " >&6
14695else
14696  case $DF in
14697  [\\/]* | ?:[\\/]*)
14698  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14699  ;;
14700  *)
14701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14702for as_dir in $PATH
14703do
14704  IFS=$as_save_IFS
14705  test -z "$as_dir" && as_dir=.
14706    for ac_exec_ext in '' $ac_executable_extensions; do
14707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14708    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14710    break 2
14711  fi
14712done
14713  done
14714IFS=$as_save_IFS
14715
14716  ;;
14717esac
14718fi
14719DF=$ac_cv_path_DF
14720if test -n "$DF"; then
14721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14722$as_echo "$DF" >&6; }
14723else
14724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14725$as_echo "no" >&6; }
14726fi
14727
14728
14729  test -n "$DF" && break
14730done
14731
14732  else
14733    # The variable is set, but is it from the command line or the environment?
14734
14735    # Try to remove the string !DF! from our list.
14736    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14737    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14738      # If it failed, the variable was not from the command line. Ignore it,
14739      # but warn the user (except for BASH, which is always set by the calling BASH).
14740      if test "xDF" != xBASH; then
14741        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14742$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14743      fi
14744      # Try to locate tool using the code snippet
14745      for ac_prog in df
14746do
14747  # Extract the first word of "$ac_prog", so it can be a program name with args.
14748set dummy $ac_prog; ac_word=$2
14749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14750$as_echo_n "checking for $ac_word... " >&6; }
14751if ${ac_cv_path_DF+:} false; then :
14752  $as_echo_n "(cached) " >&6
14753else
14754  case $DF in
14755  [\\/]* | ?:[\\/]*)
14756  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14757  ;;
14758  *)
14759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14760for as_dir in $PATH
14761do
14762  IFS=$as_save_IFS
14763  test -z "$as_dir" && as_dir=.
14764    for ac_exec_ext in '' $ac_executable_extensions; do
14765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14766    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14768    break 2
14769  fi
14770done
14771  done
14772IFS=$as_save_IFS
14773
14774  ;;
14775esac
14776fi
14777DF=$ac_cv_path_DF
14778if test -n "$DF"; then
14779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14780$as_echo "$DF" >&6; }
14781else
14782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14783$as_echo "no" >&6; }
14784fi
14785
14786
14787  test -n "$DF" && break
14788done
14789
14790    else
14791      # If it succeeded, then it was overridden by the user. We will use it
14792      # for the tool.
14793
14794      # First remove it from the list of overridden variables, so we can test
14795      # for unknown variables in the end.
14796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14797
14798      # Check if we try to supply an empty value
14799      if test "x$DF" = x; then
14800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14801$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14803$as_echo_n "checking for DF... " >&6; }
14804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14805$as_echo "disabled" >&6; }
14806      else
14807        # Check if the provided tool contains a complete path.
14808        tool_specified="$DF"
14809        tool_basename="${tool_specified##*/}"
14810        if test "x$tool_basename" = "x$tool_specified"; then
14811          # A command without a complete path is provided, search $PATH.
14812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14813$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14814          # Extract the first word of "$tool_basename", so it can be a program name with args.
14815set dummy $tool_basename; ac_word=$2
14816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14817$as_echo_n "checking for $ac_word... " >&6; }
14818if ${ac_cv_path_DF+:} false; then :
14819  $as_echo_n "(cached) " >&6
14820else
14821  case $DF in
14822  [\\/]* | ?:[\\/]*)
14823  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14824  ;;
14825  *)
14826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14827for as_dir in $PATH
14828do
14829  IFS=$as_save_IFS
14830  test -z "$as_dir" && as_dir=.
14831    for ac_exec_ext in '' $ac_executable_extensions; do
14832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14833    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14835    break 2
14836  fi
14837done
14838  done
14839IFS=$as_save_IFS
14840
14841  ;;
14842esac
14843fi
14844DF=$ac_cv_path_DF
14845if test -n "$DF"; then
14846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14847$as_echo "$DF" >&6; }
14848else
14849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14850$as_echo "no" >&6; }
14851fi
14852
14853
14854          if test "x$DF" = x; then
14855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14856          fi
14857        else
14858          # Otherwise we believe it is a complete path. Use it as it is.
14859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14860$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14862$as_echo_n "checking for DF... " >&6; }
14863          if test ! -x "$tool_specified"; then
14864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14865$as_echo "not found" >&6; }
14866            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14867          fi
14868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14869$as_echo "$tool_specified" >&6; }
14870        fi
14871      fi
14872    fi
14873
14874  fi
14875
14876
14877
14878
14879  # Publish this variable in the help.
14880
14881
14882  if [ -z "${CPIO+x}" ]; then
14883    # The variable is not set by user, try to locate tool using the code snippet
14884    for ac_prog in cpio bsdcpio
14885do
14886  # Extract the first word of "$ac_prog", so it can be a program name with args.
14887set dummy $ac_prog; ac_word=$2
14888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14889$as_echo_n "checking for $ac_word... " >&6; }
14890if ${ac_cv_path_CPIO+:} false; then :
14891  $as_echo_n "(cached) " >&6
14892else
14893  case $CPIO in
14894  [\\/]* | ?:[\\/]*)
14895  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14896  ;;
14897  *)
14898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14899for as_dir in $PATH
14900do
14901  IFS=$as_save_IFS
14902  test -z "$as_dir" && as_dir=.
14903    for ac_exec_ext in '' $ac_executable_extensions; do
14904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14905    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14907    break 2
14908  fi
14909done
14910  done
14911IFS=$as_save_IFS
14912
14913  ;;
14914esac
14915fi
14916CPIO=$ac_cv_path_CPIO
14917if test -n "$CPIO"; then
14918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14919$as_echo "$CPIO" >&6; }
14920else
14921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14922$as_echo "no" >&6; }
14923fi
14924
14925
14926  test -n "$CPIO" && break
14927done
14928
14929  else
14930    # The variable is set, but is it from the command line or the environment?
14931
14932    # Try to remove the string !CPIO! from our list.
14933    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14934    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14935      # If it failed, the variable was not from the command line. Ignore it,
14936      # but warn the user (except for BASH, which is always set by the calling BASH).
14937      if test "xCPIO" != xBASH; then
14938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14939$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14940      fi
14941      # Try to locate tool using the code snippet
14942      for ac_prog in cpio bsdcpio
14943do
14944  # Extract the first word of "$ac_prog", so it can be a program name with args.
14945set dummy $ac_prog; ac_word=$2
14946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14947$as_echo_n "checking for $ac_word... " >&6; }
14948if ${ac_cv_path_CPIO+:} false; then :
14949  $as_echo_n "(cached) " >&6
14950else
14951  case $CPIO in
14952  [\\/]* | ?:[\\/]*)
14953  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14954  ;;
14955  *)
14956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14957for as_dir in $PATH
14958do
14959  IFS=$as_save_IFS
14960  test -z "$as_dir" && as_dir=.
14961    for ac_exec_ext in '' $ac_executable_extensions; do
14962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14963    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14965    break 2
14966  fi
14967done
14968  done
14969IFS=$as_save_IFS
14970
14971  ;;
14972esac
14973fi
14974CPIO=$ac_cv_path_CPIO
14975if test -n "$CPIO"; then
14976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14977$as_echo "$CPIO" >&6; }
14978else
14979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14980$as_echo "no" >&6; }
14981fi
14982
14983
14984  test -n "$CPIO" && break
14985done
14986
14987    else
14988      # If it succeeded, then it was overridden by the user. We will use it
14989      # for the tool.
14990
14991      # First remove it from the list of overridden variables, so we can test
14992      # for unknown variables in the end.
14993      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14994
14995      # Check if we try to supply an empty value
14996      if test "x$CPIO" = x; then
14997        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14998$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15000$as_echo_n "checking for CPIO... " >&6; }
15001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15002$as_echo "disabled" >&6; }
15003      else
15004        # Check if the provided tool contains a complete path.
15005        tool_specified="$CPIO"
15006        tool_basename="${tool_specified##*/}"
15007        if test "x$tool_basename" = "x$tool_specified"; then
15008          # A command without a complete path is provided, search $PATH.
15009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15010$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15011          # Extract the first word of "$tool_basename", so it can be a program name with args.
15012set dummy $tool_basename; ac_word=$2
15013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15014$as_echo_n "checking for $ac_word... " >&6; }
15015if ${ac_cv_path_CPIO+:} false; then :
15016  $as_echo_n "(cached) " >&6
15017else
15018  case $CPIO in
15019  [\\/]* | ?:[\\/]*)
15020  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15021  ;;
15022  *)
15023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15024for as_dir in $PATH
15025do
15026  IFS=$as_save_IFS
15027  test -z "$as_dir" && as_dir=.
15028    for ac_exec_ext in '' $ac_executable_extensions; do
15029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15030    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15032    break 2
15033  fi
15034done
15035  done
15036IFS=$as_save_IFS
15037
15038  ;;
15039esac
15040fi
15041CPIO=$ac_cv_path_CPIO
15042if test -n "$CPIO"; then
15043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15044$as_echo "$CPIO" >&6; }
15045else
15046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15047$as_echo "no" >&6; }
15048fi
15049
15050
15051          if test "x$CPIO" = x; then
15052            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15053          fi
15054        else
15055          # Otherwise we believe it is a complete path. Use it as it is.
15056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15057$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15058          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15059$as_echo_n "checking for CPIO... " >&6; }
15060          if test ! -x "$tool_specified"; then
15061            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15062$as_echo "not found" >&6; }
15063            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15064          fi
15065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15066$as_echo "$tool_specified" >&6; }
15067        fi
15068      fi
15069    fi
15070
15071  fi
15072
15073
15074
15075
15076  # Publish this variable in the help.
15077
15078
15079  if [ -z "${NICE+x}" ]; then
15080    # The variable is not set by user, try to locate tool using the code snippet
15081    for ac_prog in nice
15082do
15083  # Extract the first word of "$ac_prog", so it can be a program name with args.
15084set dummy $ac_prog; ac_word=$2
15085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15086$as_echo_n "checking for $ac_word... " >&6; }
15087if ${ac_cv_path_NICE+:} false; then :
15088  $as_echo_n "(cached) " >&6
15089else
15090  case $NICE in
15091  [\\/]* | ?:[\\/]*)
15092  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15093  ;;
15094  *)
15095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15096for as_dir in $PATH
15097do
15098  IFS=$as_save_IFS
15099  test -z "$as_dir" && as_dir=.
15100    for ac_exec_ext in '' $ac_executable_extensions; do
15101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15102    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15104    break 2
15105  fi
15106done
15107  done
15108IFS=$as_save_IFS
15109
15110  ;;
15111esac
15112fi
15113NICE=$ac_cv_path_NICE
15114if test -n "$NICE"; then
15115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15116$as_echo "$NICE" >&6; }
15117else
15118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15119$as_echo "no" >&6; }
15120fi
15121
15122
15123  test -n "$NICE" && break
15124done
15125
15126  else
15127    # The variable is set, but is it from the command line or the environment?
15128
15129    # Try to remove the string !NICE! from our list.
15130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15132      # If it failed, the variable was not from the command line. Ignore it,
15133      # but warn the user (except for BASH, which is always set by the calling BASH).
15134      if test "xNICE" != xBASH; then
15135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15136$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15137      fi
15138      # Try to locate tool using the code snippet
15139      for ac_prog in nice
15140do
15141  # Extract the first word of "$ac_prog", so it can be a program name with args.
15142set dummy $ac_prog; ac_word=$2
15143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15144$as_echo_n "checking for $ac_word... " >&6; }
15145if ${ac_cv_path_NICE+:} false; then :
15146  $as_echo_n "(cached) " >&6
15147else
15148  case $NICE in
15149  [\\/]* | ?:[\\/]*)
15150  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15151  ;;
15152  *)
15153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15154for as_dir in $PATH
15155do
15156  IFS=$as_save_IFS
15157  test -z "$as_dir" && as_dir=.
15158    for ac_exec_ext in '' $ac_executable_extensions; do
15159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15160    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15162    break 2
15163  fi
15164done
15165  done
15166IFS=$as_save_IFS
15167
15168  ;;
15169esac
15170fi
15171NICE=$ac_cv_path_NICE
15172if test -n "$NICE"; then
15173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15174$as_echo "$NICE" >&6; }
15175else
15176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15177$as_echo "no" >&6; }
15178fi
15179
15180
15181  test -n "$NICE" && break
15182done
15183
15184    else
15185      # If it succeeded, then it was overridden by the user. We will use it
15186      # for the tool.
15187
15188      # First remove it from the list of overridden variables, so we can test
15189      # for unknown variables in the end.
15190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15191
15192      # Check if we try to supply an empty value
15193      if test "x$NICE" = x; then
15194        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15195$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15196        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15197$as_echo_n "checking for NICE... " >&6; }
15198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15199$as_echo "disabled" >&6; }
15200      else
15201        # Check if the provided tool contains a complete path.
15202        tool_specified="$NICE"
15203        tool_basename="${tool_specified##*/}"
15204        if test "x$tool_basename" = "x$tool_specified"; then
15205          # A command without a complete path is provided, search $PATH.
15206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15207$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15208          # Extract the first word of "$tool_basename", so it can be a program name with args.
15209set dummy $tool_basename; ac_word=$2
15210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15211$as_echo_n "checking for $ac_word... " >&6; }
15212if ${ac_cv_path_NICE+:} false; then :
15213  $as_echo_n "(cached) " >&6
15214else
15215  case $NICE in
15216  [\\/]* | ?:[\\/]*)
15217  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15218  ;;
15219  *)
15220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15221for as_dir in $PATH
15222do
15223  IFS=$as_save_IFS
15224  test -z "$as_dir" && as_dir=.
15225    for ac_exec_ext in '' $ac_executable_extensions; do
15226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15227    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15229    break 2
15230  fi
15231done
15232  done
15233IFS=$as_save_IFS
15234
15235  ;;
15236esac
15237fi
15238NICE=$ac_cv_path_NICE
15239if test -n "$NICE"; then
15240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15241$as_echo "$NICE" >&6; }
15242else
15243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15244$as_echo "no" >&6; }
15245fi
15246
15247
15248          if test "x$NICE" = x; then
15249            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15250          fi
15251        else
15252          # Otherwise we believe it is a complete path. Use it as it is.
15253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15254$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15255          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15256$as_echo_n "checking for NICE... " >&6; }
15257          if test ! -x "$tool_specified"; then
15258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15259$as_echo "not found" >&6; }
15260            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15261          fi
15262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15263$as_echo "$tool_specified" >&6; }
15264        fi
15265      fi
15266    fi
15267
15268  fi
15269
15270
15271
15272
15273# Now we can determine OpenJDK build and target platforms. This is required to
15274# have early on.
15275# Make sure we can run config.sub.
15276$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15277  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15278
15279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15280$as_echo_n "checking build system type... " >&6; }
15281if ${ac_cv_build+:} false; then :
15282  $as_echo_n "(cached) " >&6
15283else
15284  ac_build_alias=$build_alias
15285test "x$ac_build_alias" = x &&
15286  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15287test "x$ac_build_alias" = x &&
15288  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15289ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15290  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15291
15292fi
15293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15294$as_echo "$ac_cv_build" >&6; }
15295case $ac_cv_build in
15296*-*-*) ;;
15297*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15298esac
15299build=$ac_cv_build
15300ac_save_IFS=$IFS; IFS='-'
15301set x $ac_cv_build
15302shift
15303build_cpu=$1
15304build_vendor=$2
15305shift; shift
15306# Remember, the first character of IFS is used to create $*,
15307# except with old shells:
15308build_os=$*
15309IFS=$ac_save_IFS
15310case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15311
15312
15313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15314$as_echo_n "checking host system type... " >&6; }
15315if ${ac_cv_host+:} false; then :
15316  $as_echo_n "(cached) " >&6
15317else
15318  if test "x$host_alias" = x; then
15319  ac_cv_host=$ac_cv_build
15320else
15321  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15322    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15323fi
15324
15325fi
15326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15327$as_echo "$ac_cv_host" >&6; }
15328case $ac_cv_host in
15329*-*-*) ;;
15330*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15331esac
15332host=$ac_cv_host
15333ac_save_IFS=$IFS; IFS='-'
15334set x $ac_cv_host
15335shift
15336host_cpu=$1
15337host_vendor=$2
15338shift; shift
15339# Remember, the first character of IFS is used to create $*,
15340# except with old shells:
15341host_os=$*
15342IFS=$ac_save_IFS
15343case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15344
15345
15346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15347$as_echo_n "checking target system type... " >&6; }
15348if ${ac_cv_target+:} false; then :
15349  $as_echo_n "(cached) " >&6
15350else
15351  if test "x$target_alias" = x; then
15352  ac_cv_target=$ac_cv_host
15353else
15354  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15355    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15356fi
15357
15358fi
15359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15360$as_echo "$ac_cv_target" >&6; }
15361case $ac_cv_target in
15362*-*-*) ;;
15363*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15364esac
15365target=$ac_cv_target
15366ac_save_IFS=$IFS; IFS='-'
15367set x $ac_cv_target
15368shift
15369target_cpu=$1
15370target_vendor=$2
15371shift; shift
15372# Remember, the first character of IFS is used to create $*,
15373# except with old shells:
15374target_os=$*
15375IFS=$ac_save_IFS
15376case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15377
15378
15379# The aliases save the names the user supplied, while $host etc.
15380# will get canonicalized.
15381test -n "$target_alias" &&
15382  test "$program_prefix$program_suffix$program_transform_name" = \
15383    NONENONEs,x,x, &&
15384  program_prefix=${target_alias}-
15385
15386  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15387  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15388  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15389  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15390  # to use the configure naming style.
15391
15392
15393
15394
15395
15396  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15397  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15398  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15399  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15400  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15401  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15402
15403
15404
15405  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15406
15407  case "$build_os" in
15408    *linux*)
15409      VAR_OS=linux
15410      VAR_OS_TYPE=unix
15411      ;;
15412    *solaris*)
15413      VAR_OS=solaris
15414      VAR_OS_TYPE=unix
15415      ;;
15416    *darwin*)
15417      VAR_OS=macosx
15418      VAR_OS_TYPE=unix
15419      ;;
15420    *bsd*)
15421      VAR_OS=bsd
15422      VAR_OS_TYPE=unix
15423      ;;
15424    *cygwin*)
15425      VAR_OS=windows
15426      VAR_OS_ENV=windows.cygwin
15427      ;;
15428    *mingw*)
15429      VAR_OS=windows
15430      VAR_OS_ENV=windows.msys
15431      ;;
15432    *aix*)
15433      VAR_OS=aix
15434      VAR_OS_TYPE=unix
15435      ;;
15436    *)
15437      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15438      ;;
15439  esac
15440
15441
15442  # First argument is the cpu name from the trip/quad
15443  case "$build_cpu" in
15444    x86_64)
15445      VAR_CPU=x86_64
15446      VAR_CPU_ARCH=x86
15447      VAR_CPU_BITS=64
15448      VAR_CPU_ENDIAN=little
15449      ;;
15450    i?86)
15451      VAR_CPU=x86
15452      VAR_CPU_ARCH=x86
15453      VAR_CPU_BITS=32
15454      VAR_CPU_ENDIAN=little
15455      ;;
15456    arm*)
15457      VAR_CPU=arm
15458      VAR_CPU_ARCH=arm
15459      VAR_CPU_BITS=32
15460      VAR_CPU_ENDIAN=little
15461      ;;
15462    aarch64)
15463      VAR_CPU=aarch64
15464      VAR_CPU_ARCH=aarch64
15465      VAR_CPU_BITS=64
15466      VAR_CPU_ENDIAN=little
15467      ;;
15468    powerpc)
15469      VAR_CPU=ppc
15470      VAR_CPU_ARCH=ppc
15471      VAR_CPU_BITS=32
15472      VAR_CPU_ENDIAN=big
15473      ;;
15474    powerpc64)
15475      VAR_CPU=ppc64
15476      VAR_CPU_ARCH=ppc
15477      VAR_CPU_BITS=64
15478      VAR_CPU_ENDIAN=big
15479      ;;
15480    powerpc64le)
15481      VAR_CPU=ppc64le
15482      VAR_CPU_ARCH=ppc
15483      VAR_CPU_BITS=64
15484      VAR_CPU_ENDIAN=little
15485      ;;
15486    s390)
15487      VAR_CPU=s390
15488      VAR_CPU_ARCH=s390
15489      VAR_CPU_BITS=32
15490      VAR_CPU_ENDIAN=big
15491      ;;
15492    s390x)
15493      VAR_CPU=s390x
15494      VAR_CPU_ARCH=s390
15495      VAR_CPU_BITS=64
15496      VAR_CPU_ENDIAN=big
15497      ;;
15498    sparc)
15499      VAR_CPU=sparc
15500      VAR_CPU_ARCH=sparc
15501      VAR_CPU_BITS=32
15502      VAR_CPU_ENDIAN=big
15503      ;;
15504    sparcv9|sparc64)
15505      VAR_CPU=sparcv9
15506      VAR_CPU_ARCH=sparc
15507      VAR_CPU_BITS=64
15508      VAR_CPU_ENDIAN=big
15509      ;;
15510    *)
15511      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15512      ;;
15513  esac
15514
15515  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15516  OPENJDK_BUILD_OS="$VAR_OS"
15517  if test "x$VAR_OS_TYPE" != x; then
15518    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15519  else
15520    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15521  fi
15522  if test "x$VAR_OS_ENV" != x; then
15523    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15524  else
15525    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15526  fi
15527  OPENJDK_BUILD_CPU="$VAR_CPU"
15528  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15529  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15530  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15531
15532
15533
15534
15535
15536
15537
15538
15539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15540$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15542$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15543
15544  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15545
15546  case "$host_os" in
15547    *linux*)
15548      VAR_OS=linux
15549      VAR_OS_TYPE=unix
15550      ;;
15551    *solaris*)
15552      VAR_OS=solaris
15553      VAR_OS_TYPE=unix
15554      ;;
15555    *darwin*)
15556      VAR_OS=macosx
15557      VAR_OS_TYPE=unix
15558      ;;
15559    *bsd*)
15560      VAR_OS=bsd
15561      VAR_OS_TYPE=unix
15562      ;;
15563    *cygwin*)
15564      VAR_OS=windows
15565      VAR_OS_ENV=windows.cygwin
15566      ;;
15567    *mingw*)
15568      VAR_OS=windows
15569      VAR_OS_ENV=windows.msys
15570      ;;
15571    *aix*)
15572      VAR_OS=aix
15573      VAR_OS_TYPE=unix
15574      ;;
15575    *)
15576      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15577      ;;
15578  esac
15579
15580
15581  # First argument is the cpu name from the trip/quad
15582  case "$host_cpu" in
15583    x86_64)
15584      VAR_CPU=x86_64
15585      VAR_CPU_ARCH=x86
15586      VAR_CPU_BITS=64
15587      VAR_CPU_ENDIAN=little
15588      ;;
15589    i?86)
15590      VAR_CPU=x86
15591      VAR_CPU_ARCH=x86
15592      VAR_CPU_BITS=32
15593      VAR_CPU_ENDIAN=little
15594      ;;
15595    arm*)
15596      VAR_CPU=arm
15597      VAR_CPU_ARCH=arm
15598      VAR_CPU_BITS=32
15599      VAR_CPU_ENDIAN=little
15600      ;;
15601    aarch64)
15602      VAR_CPU=aarch64
15603      VAR_CPU_ARCH=aarch64
15604      VAR_CPU_BITS=64
15605      VAR_CPU_ENDIAN=little
15606      ;;
15607    powerpc)
15608      VAR_CPU=ppc
15609      VAR_CPU_ARCH=ppc
15610      VAR_CPU_BITS=32
15611      VAR_CPU_ENDIAN=big
15612      ;;
15613    powerpc64)
15614      VAR_CPU=ppc64
15615      VAR_CPU_ARCH=ppc
15616      VAR_CPU_BITS=64
15617      VAR_CPU_ENDIAN=big
15618      ;;
15619    powerpc64le)
15620      VAR_CPU=ppc64le
15621      VAR_CPU_ARCH=ppc
15622      VAR_CPU_BITS=64
15623      VAR_CPU_ENDIAN=little
15624      ;;
15625    s390)
15626      VAR_CPU=s390
15627      VAR_CPU_ARCH=s390
15628      VAR_CPU_BITS=32
15629      VAR_CPU_ENDIAN=big
15630      ;;
15631    s390x)
15632      VAR_CPU=s390x
15633      VAR_CPU_ARCH=s390
15634      VAR_CPU_BITS=64
15635      VAR_CPU_ENDIAN=big
15636      ;;
15637    sparc)
15638      VAR_CPU=sparc
15639      VAR_CPU_ARCH=sparc
15640      VAR_CPU_BITS=32
15641      VAR_CPU_ENDIAN=big
15642      ;;
15643    sparcv9|sparc64)
15644      VAR_CPU=sparcv9
15645      VAR_CPU_ARCH=sparc
15646      VAR_CPU_BITS=64
15647      VAR_CPU_ENDIAN=big
15648      ;;
15649    *)
15650      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15651      ;;
15652  esac
15653
15654  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15655  OPENJDK_TARGET_OS="$VAR_OS"
15656  if test "x$VAR_OS_TYPE" != x; then
15657    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15658  else
15659    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15660  fi
15661  if test "x$VAR_OS_ENV" != x; then
15662    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15663  else
15664    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15665  fi
15666  OPENJDK_TARGET_CPU="$VAR_CPU"
15667  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15668  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15669  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15670
15671
15672
15673
15674
15675
15676
15677
15678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15679$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15681$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15682
15683
15684
15685# Check whether --with-target-bits was given.
15686if test "${with_target_bits+set}" = set; then :
15687  withval=$with_target_bits;
15688fi
15689
15690
15691  # We have three types of compiles:
15692  # native  == normal compilation, target system == build system
15693  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15694  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15695  #
15696  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15697    # We're doing a proper cross-compilation
15698    COMPILE_TYPE="cross"
15699  else
15700    COMPILE_TYPE="native"
15701  fi
15702
15703  if test "x$with_target_bits" != x; then
15704    if test "x$COMPILE_TYPE" = "xcross"; then
15705      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15706    fi
15707
15708    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15709      # A reduced build is requested
15710      COMPILE_TYPE="reduced"
15711      OPENJDK_TARGET_CPU_BITS=32
15712      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15713        OPENJDK_TARGET_CPU=x86
15714      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15715        OPENJDK_TARGET_CPU=sparc
15716      else
15717        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15718      fi
15719    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15720      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
15721    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15722      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15723$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15724    else
15725      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15726    fi
15727  fi
15728
15729
15730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15731$as_echo_n "checking compilation type... " >&6; }
15732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15733$as_echo "$COMPILE_TYPE" >&6; }
15734
15735
15736  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15737    REQUIRED_OS_NAME=SunOS
15738    REQUIRED_OS_VERSION=5.10
15739  fi
15740  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15741    REQUIRED_OS_NAME=Linux
15742    REQUIRED_OS_VERSION=2.6
15743  fi
15744  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15745    REQUIRED_OS_NAME=Windows
15746    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15747      REQUIRED_OS_VERSION=5.2
15748    else
15749      REQUIRED_OS_VERSION=5.1
15750    fi
15751  fi
15752  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15753    REQUIRED_OS_NAME=Darwin
15754    REQUIRED_OS_VERSION=11.2
15755  fi
15756  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15757    REQUIRED_OS_NAME=AIX
15758    REQUIRED_OS_VERSION=7.1
15759  fi
15760
15761
15762
15763
15764
15765
15766  # Also store the legacy naming of the cpu.
15767  # Ie i586 and amd64 instead of x86 and x86_64
15768  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15769  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15770    OPENJDK_TARGET_CPU_LEGACY="i586"
15771  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15772    # On all platforms except MacOSX replace x86_64 with amd64.
15773    OPENJDK_TARGET_CPU_LEGACY="amd64"
15774  fi
15775
15776
15777  # And the second legacy naming of the cpu.
15778  # Ie i386 and amd64 instead of x86 and x86_64.
15779  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15780  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15781    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15782  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15783    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15784  fi
15785
15786
15787  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15788  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15789  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15790  OPENJDK_TARGET_CPU_ISADIR=""
15791  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15792    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15793      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15794    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15795      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15796    fi
15797  fi
15798
15799
15800  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15801  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15802  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15803    # On linux only, we replace x86 with i386.
15804    OPENJDK_TARGET_CPU_OSARCH="i386"
15805  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15806    # On all platforms except macosx, we replace x86_64 with amd64.
15807    OPENJDK_TARGET_CPU_OSARCH="amd64"
15808  fi
15809
15810
15811  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15812  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15813    OPENJDK_TARGET_CPU_JLI="i386"
15814  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15815    # On all platforms except macosx, we replace x86_64 with amd64.
15816    OPENJDK_TARGET_CPU_JLI="amd64"
15817  fi
15818
15819  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15820      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15821  else
15822      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15823  fi
15824
15825
15826  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15827  # Macosx is osx and x86_64 is x64
15828  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15829    OPENJDK_TARGET_OS_BUNDLE="osx"
15830  else
15831    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15832  fi
15833  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15834    OPENJDK_TARGET_CPU_BUNDLE="x64"
15835  else
15836    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15837  fi
15838  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15839
15840
15841
15842
15843  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15844    A_LP64="LP64:="
15845    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15846    # unpack200.exe
15847    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15848      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15849    fi
15850  fi
15851  LP64=$A_LP64
15852
15853
15854  if test "x$COMPILE_TYPE" = "xcross"; then
15855    # FIXME: ... or should this include reduced builds..?
15856    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15857  else
15858    DEFINE_CROSS_COMPILE_ARCH=""
15859  fi
15860
15861
15862  # Convert openjdk platform names to hotspot names
15863
15864  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15865  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15866    HOTSPOT_TARGET_OS=bsd
15867  fi
15868
15869
15870  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15871  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15872    HOTSPOT_TARGET_OS_TYPE=posix
15873  fi
15874
15875
15876  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15877  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15878    HOTSPOT_TARGET_CPU=x86_32
15879  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15880    HOTSPOT_TARGET_CPU=sparc
15881  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15882    HOTSPOT_TARGET_CPU=ppc_64
15883  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15884    HOTSPOT_TARGET_CPU=ppc_64
15885  fi
15886
15887
15888  # This is identical with OPENJDK_*, but define anyway for consistency.
15889  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15890
15891
15892  # Setup HOTSPOT_TARGET_CPU_DEFINE
15893  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15894    HOTSPOT_TARGET_CPU_DEFINE=IA32
15895  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15896    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15897  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15898    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15899  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15900    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15901  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15902    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15903  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15904    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15905
15906  # The cpu defines below are for zero, we don't support them directly.
15907  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15908    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15909  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15910    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15911  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15912    HOTSPOT_TARGET_CPU_DEFINE=S390
15913  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15914    HOTSPOT_TARGET_CPU_DEFINE=S390
15915  elif test "x$OPENJDK_TARGET_CPU" != x; then
15916    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15917  fi
15918
15919
15920
15921
15922  # Also store the legacy naming of the cpu.
15923  # Ie i586 and amd64 instead of x86 and x86_64
15924  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15925  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15926    OPENJDK_BUILD_CPU_LEGACY="i586"
15927  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15928    # On all platforms except MacOSX replace x86_64 with amd64.
15929    OPENJDK_BUILD_CPU_LEGACY="amd64"
15930  fi
15931
15932
15933  # And the second legacy naming of the cpu.
15934  # Ie i386 and amd64 instead of x86 and x86_64.
15935  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15936  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15937    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15938  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15939    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15940  fi
15941
15942
15943  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15944  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15945  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15946  OPENJDK_BUILD_CPU_ISADIR=""
15947  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15948    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15949      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15950    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15951      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15952    fi
15953  fi
15954
15955
15956  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15957  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15958  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15959    # On linux only, we replace x86 with i386.
15960    OPENJDK_BUILD_CPU_OSARCH="i386"
15961  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15962    # On all platforms except macosx, we replace x86_64 with amd64.
15963    OPENJDK_BUILD_CPU_OSARCH="amd64"
15964  fi
15965
15966
15967  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15968  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15969    OPENJDK_BUILD_CPU_JLI="i386"
15970  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15971    # On all platforms except macosx, we replace x86_64 with amd64.
15972    OPENJDK_BUILD_CPU_JLI="amd64"
15973  fi
15974
15975  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15976      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
15977  else
15978      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
15979  fi
15980
15981
15982  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15983  # Macosx is osx and x86_64 is x64
15984  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15985    OPENJDK_BUILD_OS_BUNDLE="osx"
15986  else
15987    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
15988  fi
15989  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15990    OPENJDK_BUILD_CPU_BUNDLE="x64"
15991  else
15992    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
15993  fi
15994  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
15995
15996
15997
15998
15999  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16000    A_LP64="LP64:="
16001    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16002    # unpack200.exe
16003    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16004      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16005    fi
16006  fi
16007  LP64=$A_LP64
16008
16009
16010  if test "x$COMPILE_TYPE" = "xcross"; then
16011    # FIXME: ... or should this include reduced builds..?
16012    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16013  else
16014    DEFINE_CROSS_COMPILE_ARCH=""
16015  fi
16016
16017
16018  # Convert openjdk platform names to hotspot names
16019
16020  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16021  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16022    HOTSPOT_BUILD_OS=bsd
16023  fi
16024
16025
16026  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16027  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16028    HOTSPOT_BUILD_OS_TYPE=posix
16029  fi
16030
16031
16032  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16033  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16034    HOTSPOT_BUILD_CPU=x86_32
16035  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16036    HOTSPOT_BUILD_CPU=sparc
16037  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16038    HOTSPOT_BUILD_CPU=ppc_64
16039  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16040    HOTSPOT_BUILD_CPU=ppc_64
16041  fi
16042
16043
16044  # This is identical with OPENJDK_*, but define anyway for consistency.
16045  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16046
16047
16048  # Setup HOTSPOT_BUILD_CPU_DEFINE
16049  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16050    HOTSPOT_BUILD_CPU_DEFINE=IA32
16051  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16052    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16053  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16054    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16055  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16056    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16057  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16058    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16059  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16060    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16061
16062  # The cpu defines below are for zero, we don't support them directly.
16063  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16064    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16065  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16066    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16067  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16068    HOTSPOT_BUILD_CPU_DEFINE=S390
16069  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16070    HOTSPOT_BUILD_CPU_DEFINE=S390
16071  elif test "x$OPENJDK_BUILD_CPU" != x; then
16072    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16073  fi
16074
16075
16076
16077
16078  # ZERO_ARCHDEF is used to enable architecture-specific code.
16079  # This is used in legacy hotspot build.
16080  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16081
16082
16083
16084
16085
16086# Continue setting up basic stuff. Most remaining code require fundamental tools.
16087
16088  # Save the current directory this script was started from
16089  CURDIR="$PWD"
16090
16091  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16092  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16093  # was not available at that time.
16094  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16095  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16096    ORIGINAL_PATH="$REWRITTEN_PATH"
16097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16098$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16099  fi
16100
16101  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16102    PATH_SEP=";"
16103
16104  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16105  if test $SRC_ROOT_LENGTH -gt 100; then
16106    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16107  fi
16108
16109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16110    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16111$as_echo_n "checking cygwin release... " >&6; }
16112    CYGWIN_VERSION=`$UNAME -r`
16113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16114$as_echo "$CYGWIN_VERSION" >&6; }
16115    WINDOWS_ENV_VENDOR='cygwin'
16116    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16117
16118    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16119    if test "x$CYGWIN_VERSION_OLD" != x; then
16120      { $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
16121$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;}
16122      as_fn_error $? "Cannot continue" "$LINENO" 5
16123    fi
16124    if test "x$CYGPATH" = x; then
16125      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16126    fi
16127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16128$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16129    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16130    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16131    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16132    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16134$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16135    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16136    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16137    if test "x$test_cygdrive_prefix" = x; then
16138      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16139    fi
16140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16142$as_echo_n "checking msys release... " >&6; }
16143    MSYS_VERSION=`$UNAME -r`
16144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16145$as_echo "$MSYS_VERSION" >&6; }
16146
16147    WINDOWS_ENV_VENDOR='msys'
16148    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16149
16150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16151$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16152    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16153    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16154
16155  windows_path="$MSYS_ROOT_PATH"
16156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16157    unix_path=`$CYGPATH -u "$windows_path"`
16158    MSYS_ROOT_PATH="$unix_path"
16159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16161    MSYS_ROOT_PATH="$unix_path"
16162  fi
16163
16164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16165$as_echo "$MSYS_ROOT_PATH" >&6; }
16166    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16167  else
16168    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16169  fi
16170
16171  # Test if windows or unix (cygwin/msys) find is first in path.
16172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16173$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16174  FIND_BINARY_OUTPUT=`find --version 2>&1`
16175  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16177$as_echo "unix style" >&6; }
16178  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16180$as_echo "Windows" >&6; }
16181    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16182$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16183    { $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
16184$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16185    as_fn_error $? "Cannot continue" "$LINENO" 5
16186  else
16187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16188$as_echo "unknown" >&6; }
16189    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16190$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16191  fi
16192
16193  else
16194    PATH_SEP=":"
16195  fi
16196
16197
16198  # We get the top-level directory from the supporting wrappers.
16199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16200$as_echo_n "checking for top-level directory... " >&6; }
16201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16202$as_echo "$TOPDIR" >&6; }
16203
16204
16205  # Save the original version of TOPDIR for string comparisons
16206  ORIGINAL_TOPDIR="$TOPDIR"
16207
16208
16209  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16210
16211  # Only process if variable expands to non-empty
16212
16213  if test "x$CURDIR" != x; then
16214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16215
16216  # Input might be given as Windows format, start by converting to
16217  # unix format.
16218  path="$CURDIR"
16219  new_path=`$CYGPATH -u "$path"`
16220
16221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16224  # "foo.exe" is OK but "foo" is an error.
16225  #
16226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16227  # It is also a way to make sure we got the proper file name for the real test later on.
16228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16229  if test "x$test_shortpath" = x; then
16230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16231$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16232    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16233  fi
16234
16235  # Call helper function which possibly converts this using DOS-style short mode.
16236  # If so, the updated path is stored in $new_path.
16237
16238  input_path="$new_path"
16239  # Check if we need to convert this using DOS-style short mode. If the path
16240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16241  # take no chances and rewrite it.
16242  # Note: m4 eats our [], so we need to use [ and ] instead.
16243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16244  if test "x$has_forbidden_chars" != x; then
16245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16249      # Going to short mode and back again did indeed matter. Since short mode is
16250      # case insensitive, let's make it lowercase to improve readability.
16251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16252      # Now convert it back to Unix-style (cygpath)
16253      input_path=`$CYGPATH -u "$shortmode_path"`
16254      new_path="$input_path"
16255    fi
16256  fi
16257
16258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16259  if test "x$test_cygdrive_prefix" = x; then
16260    # As a simple fix, exclude /usr/bin since it's not a real path.
16261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16263      # a path prefixed by /cygdrive for fixpath to work.
16264      new_path="$CYGWIN_ROOT_PATH$input_path"
16265    fi
16266  fi
16267
16268
16269  if test "x$path" != "x$new_path"; then
16270    CURDIR="$new_path"
16271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16272$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16273  fi
16274
16275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16276
16277  path="$CURDIR"
16278  has_colon=`$ECHO $path | $GREP ^.:`
16279  new_path="$path"
16280  if test "x$has_colon" = x; then
16281    # Not in mixed or Windows style, start by that.
16282    new_path=`cmd //c echo $path`
16283  fi
16284
16285
16286  input_path="$new_path"
16287  # Check if we need to convert this using DOS-style short mode. If the path
16288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16289  # take no chances and rewrite it.
16290  # Note: m4 eats our [], so we need to use [ and ] instead.
16291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16292  if test "x$has_forbidden_chars" != x; then
16293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16295  fi
16296
16297
16298  windows_path="$new_path"
16299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16300    unix_path=`$CYGPATH -u "$windows_path"`
16301    new_path="$unix_path"
16302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16304    new_path="$unix_path"
16305  fi
16306
16307  if test "x$path" != "x$new_path"; then
16308    CURDIR="$new_path"
16309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16310$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16311  fi
16312
16313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16315
16316    else
16317      # We're on a unix platform. Hooray! :)
16318      path="$CURDIR"
16319      has_space=`$ECHO "$path" | $GREP " "`
16320      if test "x$has_space" != x; then
16321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16322$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16323        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16324      fi
16325
16326      # Use eval to expand a potential ~
16327      eval path="$path"
16328      if test ! -f "$path" && test ! -d "$path"; then
16329        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16330      fi
16331
16332      if test -d "$path"; then
16333        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16334      else
16335        dir="`$DIRNAME "$path"`"
16336        base="`$BASENAME "$path"`"
16337        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16338      fi
16339    fi
16340  fi
16341
16342
16343  # Only process if variable expands to non-empty
16344
16345  if test "x$TOPDIR" != x; then
16346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16347
16348  # Input might be given as Windows format, start by converting to
16349  # unix format.
16350  path="$TOPDIR"
16351  new_path=`$CYGPATH -u "$path"`
16352
16353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16356  # "foo.exe" is OK but "foo" is an error.
16357  #
16358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16359  # It is also a way to make sure we got the proper file name for the real test later on.
16360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16361  if test "x$test_shortpath" = x; then
16362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16363$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16364    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16365  fi
16366
16367  # Call helper function which possibly converts this using DOS-style short mode.
16368  # If so, the updated path is stored in $new_path.
16369
16370  input_path="$new_path"
16371  # Check if we need to convert this using DOS-style short mode. If the path
16372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16373  # take no chances and rewrite it.
16374  # Note: m4 eats our [], so we need to use [ and ] instead.
16375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16376  if test "x$has_forbidden_chars" != x; then
16377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16381      # Going to short mode and back again did indeed matter. Since short mode is
16382      # case insensitive, let's make it lowercase to improve readability.
16383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16384      # Now convert it back to Unix-style (cygpath)
16385      input_path=`$CYGPATH -u "$shortmode_path"`
16386      new_path="$input_path"
16387    fi
16388  fi
16389
16390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16391  if test "x$test_cygdrive_prefix" = x; then
16392    # As a simple fix, exclude /usr/bin since it's not a real path.
16393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16395      # a path prefixed by /cygdrive for fixpath to work.
16396      new_path="$CYGWIN_ROOT_PATH$input_path"
16397    fi
16398  fi
16399
16400
16401  if test "x$path" != "x$new_path"; then
16402    TOPDIR="$new_path"
16403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16404$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16405  fi
16406
16407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16408
16409  path="$TOPDIR"
16410  has_colon=`$ECHO $path | $GREP ^.:`
16411  new_path="$path"
16412  if test "x$has_colon" = x; then
16413    # Not in mixed or Windows style, start by that.
16414    new_path=`cmd //c echo $path`
16415  fi
16416
16417
16418  input_path="$new_path"
16419  # Check if we need to convert this using DOS-style short mode. If the path
16420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16421  # take no chances and rewrite it.
16422  # Note: m4 eats our [], so we need to use [ and ] instead.
16423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16424  if test "x$has_forbidden_chars" != x; then
16425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16427  fi
16428
16429
16430  windows_path="$new_path"
16431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16432    unix_path=`$CYGPATH -u "$windows_path"`
16433    new_path="$unix_path"
16434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16436    new_path="$unix_path"
16437  fi
16438
16439  if test "x$path" != "x$new_path"; then
16440    TOPDIR="$new_path"
16441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16442$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16443  fi
16444
16445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16447
16448    else
16449      # We're on a unix platform. Hooray! :)
16450      path="$TOPDIR"
16451      has_space=`$ECHO "$path" | $GREP " "`
16452      if test "x$has_space" != x; then
16453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16454$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16455        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16456      fi
16457
16458      # Use eval to expand a potential ~
16459      eval path="$path"
16460      if test ! -f "$path" && test ! -d "$path"; then
16461        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16462      fi
16463
16464      if test -d "$path"; then
16465        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16466      else
16467        dir="`$DIRNAME "$path"`"
16468        base="`$BASENAME "$path"`"
16469        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16470      fi
16471    fi
16472  fi
16473
16474  # SRC_ROOT is a traditional alias for TOPDIR.
16475  SRC_ROOT=$TOPDIR
16476
16477  # Calculate a canonical version of TOPDIR for string comparisons
16478  CANONICAL_TOPDIR=$TOPDIR
16479
16480  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16481    # Follow a chain of symbolic links. Use readlink
16482    # where it exists, else fall back to horribly
16483    # complicated shell code.
16484    if test "x$READLINK_TESTED" != yes; then
16485      # On MacOSX there is a readlink tool with a different
16486      # purpose than the GNU readlink tool. Check the found readlink.
16487      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16488      if test "x$ISGNU" = x; then
16489        # A readlink that we do not know how to use.
16490        # Are there other non-GNU readlinks out there?
16491        READLINK_TESTED=yes
16492        READLINK=
16493      fi
16494    fi
16495
16496    if test "x$READLINK" != x; then
16497      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16498    else
16499      # Save the current directory for restoring afterwards
16500      STARTDIR=$PWD
16501      COUNTER=0
16502      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16503      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16504      cd $sym_link_dir
16505      # Use -P flag to resolve symlinks in directories.
16506      cd `$THEPWDCMD -P`
16507      sym_link_dir=`$THEPWDCMD -P`
16508      # Resolve file symlinks
16509      while test $COUNTER -lt 20; do
16510        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16511        if test "x$ISLINK" == x; then
16512          # This is not a symbolic link! We are done!
16513          break
16514        fi
16515        # Again resolve directory symlinks since the target of the just found
16516        # link could be in a different directory
16517        cd `$DIRNAME $ISLINK`
16518        sym_link_dir=`$THEPWDCMD -P`
16519        sym_link_file=`$BASENAME $ISLINK`
16520        let COUNTER=COUNTER+1
16521      done
16522      cd $STARTDIR
16523      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16524    fi
16525  fi
16526
16527
16528
16529  # Locate the directory of this script.
16530  AUTOCONF_DIR=$TOPDIR/common/autoconf
16531
16532  # Setup username (for use in adhoc version strings etc)
16533  # Outer [ ] to quote m4.
16534   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16535
16536
16537
16538# Check if it's a pure open build or if custom sources are to be used.
16539
16540  # Check whether --enable-openjdk-only was given.
16541if test "${enable_openjdk_only+set}" = set; then :
16542  enableval=$enable_openjdk_only;
16543else
16544  enable_openjdk_only="no"
16545fi
16546
16547
16548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16549$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16551$as_echo "$enable_openjdk_only" >&6; }
16552  if test "x$enable_openjdk_only" = "xyes"; then
16553    SUPPRESS_CUSTOM_EXTENSIONS="true"
16554  elif test "x$enable_openjdk_only" = "xno"; then
16555    SUPPRESS_CUSTOM_EXTENSIONS="false"
16556  else
16557    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16558  fi
16559
16560  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16561  # the IncludeCustomExtension macro.
16562
16563
16564# Check whether --with-custom-make-dir was given.
16565if test "${with_custom_make_dir+set}" = set; then :
16566  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
16567$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16568fi
16569
16570
16571
16572
16573# These are needed to be able to create a configuration name (and thus the output directory)
16574
16575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16576$as_echo_n "checking which variant of the JDK to build... " >&6; }
16577
16578# Check whether --with-jdk-variant was given.
16579if test "${with_jdk_variant+set}" = set; then :
16580  withval=$with_jdk_variant;
16581fi
16582
16583
16584  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16585    JDK_VARIANT="normal"
16586  else
16587    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16588  fi
16589
16590
16591
16592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16593$as_echo "$JDK_VARIANT" >&6; }
16594
16595
16596  DEBUG_LEVEL="release"
16597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16598$as_echo_n "checking which debug level to use... " >&6; }
16599  # Check whether --enable-debug was given.
16600if test "${enable_debug+set}" = set; then :
16601  enableval=$enable_debug;
16602        ENABLE_DEBUG="${enableval}"
16603        DEBUG_LEVEL="fastdebug"
16604
16605else
16606  ENABLE_DEBUG="no"
16607fi
16608
16609
16610
16611# Check whether --with-debug-level was given.
16612if test "${with_debug_level+set}" = set; then :
16613  withval=$with_debug_level;
16614        DEBUG_LEVEL="${withval}"
16615        if test "x$ENABLE_DEBUG" = xyes; then
16616          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16617        fi
16618
16619fi
16620
16621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16622$as_echo "$DEBUG_LEVEL" >&6; }
16623
16624  if test "x$DEBUG_LEVEL" != xrelease && \
16625      test "x$DEBUG_LEVEL" != xoptimized && \
16626      test "x$DEBUG_LEVEL" != xfastdebug && \
16627      test "x$DEBUG_LEVEL" != xslowdebug; then
16628    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16629  fi
16630
16631  # Translate DEBUG_LEVEL to debug level used by Hotspot
16632  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16633  if test "x$DEBUG_LEVEL" = xrelease; then
16634    HOTSPOT_DEBUG_LEVEL="product"
16635  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16636    HOTSPOT_DEBUG_LEVEL="debug"
16637  fi
16638
16639  if test "x$DEBUG_LEVEL" = xoptimized; then
16640    # The debug level 'optimized' is a little special because it is currently only
16641    # applicable to the HotSpot build where it means to build a completely
16642    # optimized version of the VM without any debugging code (like for the
16643    # 'release' debug level which is called 'product' in the HotSpot build) but
16644    # with the exception that it can contain additional code which is otherwise
16645    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16646    # test new and/or experimental features which are not intended for customer
16647    # shipment. Because these new features need to be tested and benchmarked in
16648    # real world scenarios, we want to build the containing JDK at the 'release'
16649    # debug level.
16650    DEBUG_LEVEL="release"
16651  fi
16652
16653
16654
16655
16656
16657
16658# Check whether --with-jvm-variants was given.
16659if test "${with_jvm_variants+set}" = set; then :
16660  withval=$with_jvm_variants;
16661fi
16662
16663
16664  if test "x$with_jvm_variants" = x; then
16665    with_jvm_variants="server"
16666  fi
16667  JVM_VARIANTS_OPT="$with_jvm_variants"
16668
16669  # Has the user listed more than one variant?
16670  # Additional [] needed to keep m4 from mangling shell constructs.
16671  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16672    BUILDING_MULTIPLE_JVM_VARIANTS=true
16673  else
16674    BUILDING_MULTIPLE_JVM_VARIANTS=false
16675  fi
16676  # Replace the commas with AND for use in the build directory name.
16677  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16678
16679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16680$as_echo_n "checking which variants of the JVM to build... " >&6; }
16681  # JVM_VARIANTS is a space-separated list.
16682  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16683  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16685$as_echo "$JVM_VARIANTS" >&6; }
16686
16687  # Check that the selected variants are valid
16688
16689  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16690  # Notice that the original variant failes on SLES 10 and 11
16691  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16692  STACK=${JVM_VARIANTS// /$'\n'}
16693  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16694  if test "x$INVALID_VARIANTS" != x; then
16695    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16696$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16697    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16698  fi
16699
16700  # All "special" variants share the same output directory ("server")
16701  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16702  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16703  STACK=${JVM_VARIANTS// /$'\n'}
16704  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16705  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16706    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16707  fi
16708
16709  # The "main" variant is the one used by other libs to link against during the
16710  # build.
16711  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16712    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16713    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16714      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16715        JVM_VARIANT_MAIN="$variant"
16716        break
16717      fi
16718    done
16719  else
16720    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16721  fi
16722
16723
16724
16725
16726
16727  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16728    # zero behaves as a platform and rewrites these values. This is really weird. :(
16729    # We are guaranteed that we do not build any other variants when building zero.
16730    HOTSPOT_TARGET_CPU=zero
16731    HOTSPOT_TARGET_CPU_ARCH=zero
16732  fi
16733
16734
16735# With basic setup done, call the custom early hook.
16736
16737
16738# Check if we have devkits, extra paths or sysroot set.
16739
16740
16741# Check whether --with-devkit was given.
16742if test "${with_devkit+set}" = set; then :
16743  withval=$with_devkit;
16744
16745  # Only process if variable expands to non-empty
16746
16747  if test "x$with_devkit" != x; then
16748    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16749
16750  # Input might be given as Windows format, start by converting to
16751  # unix format.
16752  path="$with_devkit"
16753  new_path=`$CYGPATH -u "$path"`
16754
16755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16758  # "foo.exe" is OK but "foo" is an error.
16759  #
16760  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16761  # It is also a way to make sure we got the proper file name for the real test later on.
16762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16763  if test "x$test_shortpath" = x; then
16764    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16765$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16766    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16767  fi
16768
16769  # Call helper function which possibly converts this using DOS-style short mode.
16770  # If so, the updated path is stored in $new_path.
16771
16772  input_path="$new_path"
16773  # Check if we need to convert this using DOS-style short mode. If the path
16774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16775  # take no chances and rewrite it.
16776  # Note: m4 eats our [], so we need to use [ and ] instead.
16777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16778  if test "x$has_forbidden_chars" != x; then
16779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16783      # Going to short mode and back again did indeed matter. Since short mode is
16784      # case insensitive, let's make it lowercase to improve readability.
16785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16786      # Now convert it back to Unix-style (cygpath)
16787      input_path=`$CYGPATH -u "$shortmode_path"`
16788      new_path="$input_path"
16789    fi
16790  fi
16791
16792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16793  if test "x$test_cygdrive_prefix" = x; then
16794    # As a simple fix, exclude /usr/bin since it's not a real path.
16795    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16797      # a path prefixed by /cygdrive for fixpath to work.
16798      new_path="$CYGWIN_ROOT_PATH$input_path"
16799    fi
16800  fi
16801
16802
16803  if test "x$path" != "x$new_path"; then
16804    with_devkit="$new_path"
16805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16806$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16807  fi
16808
16809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16810
16811  path="$with_devkit"
16812  has_colon=`$ECHO $path | $GREP ^.:`
16813  new_path="$path"
16814  if test "x$has_colon" = x; then
16815    # Not in mixed or Windows style, start by that.
16816    new_path=`cmd //c echo $path`
16817  fi
16818
16819
16820  input_path="$new_path"
16821  # Check if we need to convert this using DOS-style short mode. If the path
16822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16823  # take no chances and rewrite it.
16824  # Note: m4 eats our [], so we need to use [ and ] instead.
16825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16826  if test "x$has_forbidden_chars" != x; then
16827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16829  fi
16830
16831
16832  windows_path="$new_path"
16833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16834    unix_path=`$CYGPATH -u "$windows_path"`
16835    new_path="$unix_path"
16836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16838    new_path="$unix_path"
16839  fi
16840
16841  if test "x$path" != "x$new_path"; then
16842    with_devkit="$new_path"
16843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16844$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16845  fi
16846
16847  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16848  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16849
16850    else
16851      # We're on a unix platform. Hooray! :)
16852      path="$with_devkit"
16853      has_space=`$ECHO "$path" | $GREP " "`
16854      if test "x$has_space" != x; then
16855        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16856$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16857        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16858      fi
16859
16860      # Use eval to expand a potential ~
16861      eval path="$path"
16862      if test ! -f "$path" && test ! -d "$path"; then
16863        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16864      fi
16865
16866      if test -d "$path"; then
16867        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16868      else
16869        dir="`$DIRNAME "$path"`"
16870        base="`$BASENAME "$path"`"
16871        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16872      fi
16873    fi
16874  fi
16875
16876        DEVKIT_ROOT="$with_devkit"
16877        # Check for a meta data info file in the root of the devkit
16878        if test -f "$DEVKIT_ROOT/devkit.info"; then
16879          . $DEVKIT_ROOT/devkit.info
16880          # This potentially sets the following:
16881          # A descriptive name of the devkit
16882
16883  if test "x$DEVKIT_NAME" = x; then
16884    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16885  fi
16886
16887          # Corresponds to --with-extra-path
16888
16889  if test "x$DEVKIT_EXTRA_PATH" = x; then
16890    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16891  fi
16892
16893          # Corresponds to --with-toolchain-path
16894
16895  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16896    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16897  fi
16898
16899          # Corresponds to --with-sysroot
16900
16901  if test "x$DEVKIT_SYSROOT" = x; then
16902    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16903  fi
16904
16905
16906          # Identifies the Visual Studio version in the devkit
16907
16908  if test "x$DEVKIT_VS_VERSION" = x; then
16909    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16910  fi
16911
16912          # The Visual Studio include environment variable
16913
16914  if test "x$DEVKIT_VS_INCLUDE" = x; then
16915    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16916  fi
16917
16918          # The Visual Studio lib environment variable
16919
16920  if test "x$DEVKIT_VS_LIB" = x; then
16921    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16922  fi
16923
16924          # Corresponds to --with-msvcr-dll
16925
16926  if test "x$DEVKIT_MSVCR_DLL" = x; then
16927    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16928  fi
16929
16930          # Corresponds to --with-msvcp-dll
16931
16932  if test "x$DEVKIT_MSVCP_DLL" = x; then
16933    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16934  fi
16935
16936        fi
16937
16938        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16939$as_echo_n "checking for devkit... " >&6; }
16940        if test "x$DEVKIT_NAME" != x; then
16941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16942$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16943        else
16944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16945$as_echo "$DEVKIT_ROOT" >&6; }
16946        fi
16947
16948
16949  if test "x$DEVKIT_EXTRA_PATH" != x; then
16950    if test "x$EXTRA_PATH" = x; then
16951      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16952    else
16953      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16954    fi
16955  fi
16956
16957
16958        # Fallback default of just /bin if DEVKIT_PATH is not defined
16959        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16960          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16961        fi
16962
16963  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16964    if test "x$TOOLCHAIN_PATH" = x; then
16965      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16966    else
16967      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16968    fi
16969  fi
16970
16971
16972        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16973        # places for backwards compatiblity.
16974        if test "x$DEVKIT_SYSROOT" != x; then
16975          SYSROOT="$DEVKIT_SYSROOT"
16976        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16977          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16978        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16979          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16980        fi
16981
16982
16983fi
16984
16985
16986  # You can force the sysroot if the sysroot encoded into the compiler tools
16987  # is not correct.
16988
16989# Check whether --with-sys-root was given.
16990if test "${with_sys_root+set}" = set; then :
16991  withval=$with_sys_root; SYSROOT=$with_sys_root
16992
16993fi
16994
16995
16996
16997# Check whether --with-sysroot was given.
16998if test "${with_sysroot+set}" = set; then :
16999  withval=$with_sysroot; SYSROOT=$with_sysroot
17000
17001fi
17002
17003
17004
17005# Check whether --with-tools-dir was given.
17006if test "${with_tools_dir+set}" = set; then :
17007  withval=$with_tools_dir;
17008  if test "x$with_tools_dir" != x; then
17009    if test "x$TOOLCHAIN_PATH" = x; then
17010      TOOLCHAIN_PATH="$with_tools_dir"
17011    else
17012      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17013    fi
17014  fi
17015
17016
17017fi
17018
17019
17020
17021# Check whether --with-toolchain-path was given.
17022if test "${with_toolchain_path+set}" = set; then :
17023  withval=$with_toolchain_path;
17024  if test "x$with_toolchain_path" != x; then
17025    if test "x$TOOLCHAIN_PATH" = x; then
17026      TOOLCHAIN_PATH="$with_toolchain_path"
17027    else
17028      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17029    fi
17030  fi
17031
17032
17033fi
17034
17035
17036
17037# Check whether --with-extra-path was given.
17038if test "${with_extra_path+set}" = set; then :
17039  withval=$with_extra_path;
17040  if test "x$with_extra_path" != x; then
17041    if test "x$EXTRA_PATH" = x; then
17042      EXTRA_PATH="$with_extra_path"
17043    else
17044      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17045    fi
17046  fi
17047
17048
17049fi
17050
17051
17052  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17053    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17054    # If not, detect if Xcode is installed by running xcodebuild -version
17055    # if no Xcode installed, xcodebuild exits with 1
17056    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17057    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17058      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17059      # fall back on the stub binary in /usr/bin/xcodebuild
17060      # Extract the first word of "xcodebuild", so it can be a program name with args.
17061set dummy xcodebuild; ac_word=$2
17062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17063$as_echo_n "checking for $ac_word... " >&6; }
17064if ${ac_cv_path_XCODEBUILD+:} false; then :
17065  $as_echo_n "(cached) " >&6
17066else
17067  case $XCODEBUILD in
17068  [\\/]* | ?:[\\/]*)
17069  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17070  ;;
17071  *)
17072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17073for as_dir in $TOOLCHAIN_PATH
17074do
17075  IFS=$as_save_IFS
17076  test -z "$as_dir" && as_dir=.
17077    for ac_exec_ext in '' $ac_executable_extensions; do
17078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17079    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17081    break 2
17082  fi
17083done
17084  done
17085IFS=$as_save_IFS
17086
17087  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17088  ;;
17089esac
17090fi
17091XCODEBUILD=$ac_cv_path_XCODEBUILD
17092if test -n "$XCODEBUILD"; then
17093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17094$as_echo "$XCODEBUILD" >&6; }
17095else
17096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17097$as_echo "no" >&6; }
17098fi
17099
17100
17101    else
17102      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17103      # when only the command line tools are installed there are no SDKs, so headers
17104      # are copied into the system frameworks
17105      XCODEBUILD=
17106
17107    fi
17108
17109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17110$as_echo_n "checking for sdk name... " >&6; }
17111
17112# Check whether --with-sdk-name was given.
17113if test "${with_sdk_name+set}" = set; then :
17114  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17115
17116fi
17117
17118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17119$as_echo "$SDKNAME" >&6; }
17120
17121    # if toolchain path is specified then don't rely on system headers, they may not compile
17122    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17123    test -z "$TOOLCHAIN_PATH" && \
17124      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17125
17126    if test -z "$SYSROOT"; then
17127      if test -n "$XCODEBUILD"; then
17128        # if we don't have system headers, use default SDK name (last resort)
17129        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17130          SDKNAME=${SDKNAME:-macosx}
17131        fi
17132
17133        if test -n "$SDKNAME"; then
17134          # Call xcodebuild to determine SYSROOT
17135          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17136        fi
17137      else
17138        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17139          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
17140        fi
17141      fi
17142    else
17143      # warn user if --with-sdk-name was also set
17144      if test -n "$with_sdk_name"; then
17145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17146$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17147      fi
17148    fi
17149
17150    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17151      # If no system framework headers, then SYSROOT must be set, or we won't build
17152      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
17153    fi
17154
17155    # Perform a basic sanity test
17156    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17157      if test -z "$SYSROOT"; then
17158        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
17159      else
17160        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17161      fi
17162    fi
17163
17164    # set SDKROOT too, Xcode tools will pick it up
17165    SDKROOT=$SYSROOT
17166
17167  fi
17168
17169  # Prepend the extra path to the global path
17170
17171  if test "x$EXTRA_PATH" != x; then
17172    if test "x$PATH" = x; then
17173      PATH="$EXTRA_PATH"
17174    else
17175      PATH="$EXTRA_PATH:$PATH"
17176    fi
17177  fi
17178
17179
17180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17181$as_echo_n "checking for sysroot... " >&6; }
17182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17183$as_echo "$SYSROOT" >&6; }
17184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17185$as_echo_n "checking for toolchain path... " >&6; }
17186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17187$as_echo "$TOOLCHAIN_PATH" >&6; }
17188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17189$as_echo_n "checking for extra path... " >&6; }
17190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17191$as_echo "$EXTRA_PATH" >&6; }
17192
17193
17194# To properly create a configuration name, we need to have the OpenJDK target
17195# and options (variants and debug level) parsed.
17196
17197
17198
17199# Check whether --with-conf-name was given.
17200if test "${with_conf_name+set}" = set; then :
17201  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17202fi
17203
17204
17205  # Test from where we are running configure, in or outside of src root.
17206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17207$as_echo_n "checking where to store configuration... " >&6; }
17208  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17209      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17210      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17211    # We are running configure from the src root.
17212    # Create a default ./build/target-variant-debuglevel output root.
17213    if test "x${CONF_NAME}" = x; then
17214      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17215$as_echo "in default location" >&6; }
17216      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17217    else
17218      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17219$as_echo "in build directory with custom name" >&6; }
17220    fi
17221    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17222    $MKDIR -p "$OUTPUT_ROOT"
17223    if test ! -d "$OUTPUT_ROOT"; then
17224      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17225    fi
17226  else
17227    # We are running configure from outside of the src dir.
17228    # Then use the current directory as output dir!
17229    # If configuration is situated in normal build directory, just use the build
17230    # directory name as configuration name, otherwise use the complete path.
17231    if test "x${CONF_NAME}" = x; then
17232      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17233    fi
17234    OUTPUT_ROOT="$CURDIR"
17235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17236$as_echo "in current directory" >&6; }
17237
17238    # WARNING: This might be a bad thing to do. You need to be sure you want to
17239    # have a configuration in this directory. Do some sanity checks!
17240
17241    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17242      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17243      # other files
17244      files_present=`$LS $OUTPUT_ROOT`
17245      # Configure has already touched config.log and confdefs.h in the current dir when this check
17246      # is performed.
17247      filtered_files=`$ECHO "$files_present" \
17248          | $SED -e 's/config.log//g' \
17249              -e 's/configure.log//g' \
17250              -e 's/confdefs.h//g' \
17251              -e 's/ //g' \
17252          | $TR -d '\n'`
17253      if test "x$filtered_files" != x; then
17254        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17255$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17256        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17257$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17258        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17259$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17260        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17261$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17262        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17263$as_echo "$as_me: seriously mess up just about everything." >&6;}
17264        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17265$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17266        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17267$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17268        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17269      fi
17270    fi
17271  fi
17272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17273$as_echo_n "checking what configuration name to use... " >&6; }
17274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17275$as_echo "$CONF_NAME" >&6; }
17276
17277
17278  # Only process if variable expands to non-empty
17279
17280  if test "x$OUTPUT_ROOT" != x; then
17281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17282
17283  # Input might be given as Windows format, start by converting to
17284  # unix format.
17285  path="$OUTPUT_ROOT"
17286  new_path=`$CYGPATH -u "$path"`
17287
17288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17291  # "foo.exe" is OK but "foo" is an error.
17292  #
17293  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17294  # It is also a way to make sure we got the proper file name for the real test later on.
17295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17296  if test "x$test_shortpath" = x; then
17297    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17298$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17299    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17300  fi
17301
17302  # Call helper function which possibly converts this using DOS-style short mode.
17303  # If so, the updated path is stored in $new_path.
17304
17305  input_path="$new_path"
17306  # Check if we need to convert this using DOS-style short mode. If the path
17307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17308  # take no chances and rewrite it.
17309  # Note: m4 eats our [], so we need to use [ and ] instead.
17310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17311  if test "x$has_forbidden_chars" != x; then
17312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17316      # Going to short mode and back again did indeed matter. Since short mode is
17317      # case insensitive, let's make it lowercase to improve readability.
17318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17319      # Now convert it back to Unix-style (cygpath)
17320      input_path=`$CYGPATH -u "$shortmode_path"`
17321      new_path="$input_path"
17322    fi
17323  fi
17324
17325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17326  if test "x$test_cygdrive_prefix" = x; then
17327    # As a simple fix, exclude /usr/bin since it's not a real path.
17328    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17330      # a path prefixed by /cygdrive for fixpath to work.
17331      new_path="$CYGWIN_ROOT_PATH$input_path"
17332    fi
17333  fi
17334
17335
17336  if test "x$path" != "x$new_path"; then
17337    OUTPUT_ROOT="$new_path"
17338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17339$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17340  fi
17341
17342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17343
17344  path="$OUTPUT_ROOT"
17345  has_colon=`$ECHO $path | $GREP ^.:`
17346  new_path="$path"
17347  if test "x$has_colon" = x; then
17348    # Not in mixed or Windows style, start by that.
17349    new_path=`cmd //c echo $path`
17350  fi
17351
17352
17353  input_path="$new_path"
17354  # Check if we need to convert this using DOS-style short mode. If the path
17355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17356  # take no chances and rewrite it.
17357  # Note: m4 eats our [], so we need to use [ and ] instead.
17358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17359  if test "x$has_forbidden_chars" != x; then
17360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17362  fi
17363
17364
17365  windows_path="$new_path"
17366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17367    unix_path=`$CYGPATH -u "$windows_path"`
17368    new_path="$unix_path"
17369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17371    new_path="$unix_path"
17372  fi
17373
17374  if test "x$path" != "x$new_path"; then
17375    OUTPUT_ROOT="$new_path"
17376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17377$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17378  fi
17379
17380  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17381  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17382
17383    else
17384      # We're on a unix platform. Hooray! :)
17385      path="$OUTPUT_ROOT"
17386      has_space=`$ECHO "$path" | $GREP " "`
17387      if test "x$has_space" != x; then
17388        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17389$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17390        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17391      fi
17392
17393      # Use eval to expand a potential ~
17394      eval path="$path"
17395      if test ! -f "$path" && test ! -d "$path"; then
17396        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17397      fi
17398
17399      if test -d "$path"; then
17400        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17401      else
17402        dir="`$DIRNAME "$path"`"
17403        base="`$BASENAME "$path"`"
17404        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17405      fi
17406    fi
17407  fi
17408
17409
17410  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17411  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17412
17413  SPEC=$OUTPUT_ROOT/spec.gmk
17414
17415  CONF_NAME=$CONF_NAME
17416
17417  OUTPUT_ROOT=$OUTPUT_ROOT
17418
17419
17420
17421  # The spec.gmk file contains all variables for the make system.
17422  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17423
17424  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17425  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17426
17427  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17428  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17429
17430  # The compare.sh is used to compare the build output to other builds.
17431  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17432
17433  # The generated Makefile knows where the spec.gmk is and where the source is.
17434  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17435  # which will look for generated configurations
17436  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17437
17438
17439
17440# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17441
17442  for ac_prog in apt-get yum port pkgutil pkgadd
17443do
17444  # Extract the first word of "$ac_prog", so it can be a program name with args.
17445set dummy $ac_prog; ac_word=$2
17446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17447$as_echo_n "checking for $ac_word... " >&6; }
17448if ${ac_cv_prog_PKGHANDLER+:} false; then :
17449  $as_echo_n "(cached) " >&6
17450else
17451  if test -n "$PKGHANDLER"; then
17452  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17453else
17454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17455for as_dir in $PATH
17456do
17457  IFS=$as_save_IFS
17458  test -z "$as_dir" && as_dir=.
17459    for ac_exec_ext in '' $ac_executable_extensions; do
17460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17461    ac_cv_prog_PKGHANDLER="$ac_prog"
17462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17463    break 2
17464  fi
17465done
17466  done
17467IFS=$as_save_IFS
17468
17469fi
17470fi
17471PKGHANDLER=$ac_cv_prog_PKGHANDLER
17472if test -n "$PKGHANDLER"; then
17473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17474$as_echo "$PKGHANDLER" >&6; }
17475else
17476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17477$as_echo "no" >&6; }
17478fi
17479
17480
17481  test -n "$PKGHANDLER" && break
17482done
17483
17484
17485
17486# Setup tools that requires more complex handling, or that is not needed by the configure script.
17487
17488
17489
17490  # Publish this variable in the help.
17491
17492
17493  if [ -z "${MAKE+x}" ]; then
17494    # The variable is not set by user, try to locate tool using the code snippet
17495
17496    # Try our hardest to locate a correct version of GNU make
17497    for ac_prog in gmake
17498do
17499  # Extract the first word of "$ac_prog", so it can be a program name with args.
17500set dummy $ac_prog; ac_word=$2
17501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17502$as_echo_n "checking for $ac_word... " >&6; }
17503if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17504  $as_echo_n "(cached) " >&6
17505else
17506  case $CHECK_GMAKE in
17507  [\\/]* | ?:[\\/]*)
17508  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17509  ;;
17510  *)
17511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17512for as_dir in $PATH
17513do
17514  IFS=$as_save_IFS
17515  test -z "$as_dir" && as_dir=.
17516    for ac_exec_ext in '' $ac_executable_extensions; do
17517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17518    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17520    break 2
17521  fi
17522done
17523  done
17524IFS=$as_save_IFS
17525
17526  ;;
17527esac
17528fi
17529CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17530if test -n "$CHECK_GMAKE"; then
17531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17532$as_echo "$CHECK_GMAKE" >&6; }
17533else
17534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17535$as_echo "no" >&6; }
17536fi
17537
17538
17539  test -n "$CHECK_GMAKE" && break
17540done
17541
17542
17543  MAKE_CANDIDATE=""$CHECK_GMAKE""
17544  DESCRIPTION="gmake in PATH"
17545
17546  # On Cygwin, we require a newer version of make than on other platforms
17547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17548    MAKE_VERSION_EXPR="-e 4\."
17549    MAKE_REQUIRED_VERSION="4.0"
17550   else
17551    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17552    MAKE_REQUIRED_VERSION="3.81"
17553  fi
17554
17555  if test "x$MAKE_CANDIDATE" != x; then
17556    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17557$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17558    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17559    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17560    if test "x$IS_GNU_MAKE" = x; then
17561      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17562$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17563    else
17564      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17565      if test "x$IS_MODERN_MAKE" = x; then
17566        { $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
17567$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;}
17568      else
17569        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17570          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17571            MAKE_EXPECTED_ENV='cygwin'
17572          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17573            MAKE_EXPECTED_ENV='msys'
17574          else
17575            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17576          fi
17577          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17578          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17579        else
17580          # Not relevant for non-Windows
17581          IS_MAKE_CORRECT_ENV=true
17582        fi
17583        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17584          { $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
17585$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;}
17586        else
17587          FOUND_MAKE=$MAKE_CANDIDATE
17588
17589  # Only process if variable expands to non-empty
17590
17591  if test "x$FOUND_MAKE" != x; then
17592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17593
17594  # First separate the path from the arguments. This will split at the first
17595  # space.
17596  complete="$FOUND_MAKE"
17597  path="${complete%% *}"
17598  tmp="$complete EOL"
17599  arguments="${tmp#* }"
17600
17601  # Input might be given as Windows format, start by converting to
17602  # unix format.
17603  new_path=`$CYGPATH -u "$path"`
17604
17605  # Now try to locate executable using which
17606  new_path=`$WHICH "$new_path" 2> /dev/null`
17607  # bat and cmd files are not always considered executable in cygwin causing which
17608  # to not find them
17609  if test "x$new_path" = x \
17610      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17611      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17612    new_path=`$CYGPATH -u "$path"`
17613  fi
17614  if test "x$new_path" = x; then
17615    # Oops. Which didn't find the executable.
17616    # The splitting of arguments from the executable at a space might have been incorrect,
17617    # since paths with space are more likely in Windows. Give it another try with the whole
17618    # argument.
17619    path="$complete"
17620    arguments="EOL"
17621    new_path=`$CYGPATH -u "$path"`
17622    new_path=`$WHICH "$new_path" 2> /dev/null`
17623    # bat and cmd files are not always considered executable in cygwin causing which
17624    # to not find them
17625    if test "x$new_path" = x \
17626        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17627        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17628      new_path=`$CYGPATH -u "$path"`
17629    fi
17630    if test "x$new_path" = x; then
17631      # It's still not found. Now this is an unrecoverable error.
17632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17633$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17634      has_space=`$ECHO "$complete" | $GREP " "`
17635      if test "x$has_space" != x; then
17636        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17637$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17638      fi
17639      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17640    fi
17641  fi
17642
17643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17646  # "foo.exe" is OK but "foo" is an error.
17647  #
17648  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17649  # It is also a way to make sure we got the proper file name for the real test later on.
17650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17651  if test "x$test_shortpath" = x; then
17652    # Short path failed, file does not exist as specified.
17653    # Try adding .exe or .cmd
17654    if test -f "${new_path}.exe"; then
17655      input_to_shortpath="${new_path}.exe"
17656    elif test -f "${new_path}.cmd"; then
17657      input_to_shortpath="${new_path}.cmd"
17658    else
17659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17660$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17661      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17662$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17663      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17664    fi
17665  else
17666    input_to_shortpath="$new_path"
17667  fi
17668
17669  # Call helper function which possibly converts this using DOS-style short mode.
17670  # If so, the updated path is stored in $new_path.
17671  new_path="$input_to_shortpath"
17672
17673  input_path="$input_to_shortpath"
17674  # Check if we need to convert this using DOS-style short mode. If the path
17675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17676  # take no chances and rewrite it.
17677  # Note: m4 eats our [], so we need to use [ and ] instead.
17678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17679  if test "x$has_forbidden_chars" != x; then
17680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17684      # Going to short mode and back again did indeed matter. Since short mode is
17685      # case insensitive, let's make it lowercase to improve readability.
17686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17687      # Now convert it back to Unix-style (cygpath)
17688      input_path=`$CYGPATH -u "$shortmode_path"`
17689      new_path="$input_path"
17690    fi
17691  fi
17692
17693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17694  if test "x$test_cygdrive_prefix" = x; then
17695    # As a simple fix, exclude /usr/bin since it's not a real path.
17696    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17698      # a path prefixed by /cygdrive for fixpath to work.
17699      new_path="$CYGWIN_ROOT_PATH$input_path"
17700    fi
17701  fi
17702
17703  # remove trailing .exe if any
17704  new_path="${new_path/%.exe/}"
17705
17706    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17707
17708  # First separate the path from the arguments. This will split at the first
17709  # space.
17710  complete="$FOUND_MAKE"
17711  path="${complete%% *}"
17712  tmp="$complete EOL"
17713  arguments="${tmp#* }"
17714
17715  # Input might be given as Windows format, start by converting to
17716  # unix format.
17717  new_path="$path"
17718
17719  windows_path="$new_path"
17720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17721    unix_path=`$CYGPATH -u "$windows_path"`
17722    new_path="$unix_path"
17723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17725    new_path="$unix_path"
17726  fi
17727
17728
17729  # Now try to locate executable using which
17730  new_path=`$WHICH "$new_path" 2> /dev/null`
17731
17732  if test "x$new_path" = x; then
17733    # Oops. Which didn't find the executable.
17734    # The splitting of arguments from the executable at a space might have been incorrect,
17735    # since paths with space are more likely in Windows. Give it another try with the whole
17736    # argument.
17737    path="$complete"
17738    arguments="EOL"
17739    new_path="$path"
17740
17741  windows_path="$new_path"
17742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17743    unix_path=`$CYGPATH -u "$windows_path"`
17744    new_path="$unix_path"
17745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17747    new_path="$unix_path"
17748  fi
17749
17750
17751    new_path=`$WHICH "$new_path" 2> /dev/null`
17752    # bat and cmd files are not always considered executable in MSYS causing which
17753    # to not find them
17754    if test "x$new_path" = x \
17755        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17756        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17757      new_path="$path"
17758
17759  windows_path="$new_path"
17760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17761    unix_path=`$CYGPATH -u "$windows_path"`
17762    new_path="$unix_path"
17763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17765    new_path="$unix_path"
17766  fi
17767
17768    fi
17769
17770    if test "x$new_path" = x; then
17771      # It's still not found. Now this is an unrecoverable error.
17772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17773$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17774      has_space=`$ECHO "$complete" | $GREP " "`
17775      if test "x$has_space" != x; then
17776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17778      fi
17779      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17780    fi
17781  fi
17782
17783  # Now new_path has a complete unix path to the binary
17784  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17785    # Keep paths in /bin as-is, but remove trailing .exe if any
17786    new_path="${new_path/%.exe/}"
17787    # Do not save /bin paths to all_fixpath_prefixes!
17788  else
17789    # Not in mixed or Windows style, start by that.
17790    new_path=`cmd //c echo $new_path`
17791
17792  input_path="$new_path"
17793  # Check if we need to convert this using DOS-style short mode. If the path
17794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17795  # take no chances and rewrite it.
17796  # Note: m4 eats our [], so we need to use [ and ] instead.
17797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17798  if test "x$has_forbidden_chars" != x; then
17799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17801  fi
17802
17803    # Output is in $new_path
17804
17805  windows_path="$new_path"
17806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17807    unix_path=`$CYGPATH -u "$windows_path"`
17808    new_path="$unix_path"
17809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17811    new_path="$unix_path"
17812  fi
17813
17814    # remove trailing .exe if any
17815    new_path="${new_path/%.exe/}"
17816
17817    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17818    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17819  fi
17820
17821    else
17822      # We're on a unix platform. Hooray! :)
17823      # First separate the path from the arguments. This will split at the first
17824      # space.
17825      complete="$FOUND_MAKE"
17826      path="${complete%% *}"
17827      tmp="$complete EOL"
17828      arguments="${tmp#* }"
17829
17830      # Cannot rely on the command "which" here since it doesn't always work.
17831      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17832      if test -z "$is_absolute_path"; then
17833        # Path to executable is not absolute. Find it.
17834        IFS_save="$IFS"
17835        IFS=:
17836        for p in $PATH; do
17837          if test -f "$p/$path" && test -x "$p/$path"; then
17838            new_path="$p/$path"
17839            break
17840          fi
17841        done
17842        IFS="$IFS_save"
17843      else
17844        # This is an absolute path, we can use it without further modifications.
17845        new_path="$path"
17846      fi
17847
17848      if test "x$new_path" = x; then
17849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17851        has_space=`$ECHO "$complete" | $GREP " "`
17852        if test "x$has_space" != x; then
17853          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17854$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17855        fi
17856        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17857      fi
17858    fi
17859
17860    # Now join together the path and the arguments once again
17861    if test "x$arguments" != xEOL; then
17862      new_complete="$new_path ${arguments% *}"
17863    else
17864      new_complete="$new_path"
17865    fi
17866
17867    if test "x$complete" != "x$new_complete"; then
17868      FOUND_MAKE="$new_complete"
17869      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17870$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17871    fi
17872  fi
17873
17874        fi
17875      fi
17876    fi
17877  fi
17878
17879
17880    if test "x$FOUND_MAKE" = x; then
17881      for ac_prog in make
17882do
17883  # Extract the first word of "$ac_prog", so it can be a program name with args.
17884set dummy $ac_prog; ac_word=$2
17885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17886$as_echo_n "checking for $ac_word... " >&6; }
17887if ${ac_cv_path_CHECK_MAKE+:} false; then :
17888  $as_echo_n "(cached) " >&6
17889else
17890  case $CHECK_MAKE in
17891  [\\/]* | ?:[\\/]*)
17892  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17893  ;;
17894  *)
17895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17896for as_dir in $PATH
17897do
17898  IFS=$as_save_IFS
17899  test -z "$as_dir" && as_dir=.
17900    for ac_exec_ext in '' $ac_executable_extensions; do
17901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17902    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17904    break 2
17905  fi
17906done
17907  done
17908IFS=$as_save_IFS
17909
17910  ;;
17911esac
17912fi
17913CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17914if test -n "$CHECK_MAKE"; then
17915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17916$as_echo "$CHECK_MAKE" >&6; }
17917else
17918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17919$as_echo "no" >&6; }
17920fi
17921
17922
17923  test -n "$CHECK_MAKE" && break
17924done
17925
17926
17927  MAKE_CANDIDATE=""$CHECK_MAKE""
17928  DESCRIPTION="make in PATH"
17929
17930  # On Cygwin, we require a newer version of make than on other platforms
17931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17932    MAKE_VERSION_EXPR="-e 4\."
17933    MAKE_REQUIRED_VERSION="4.0"
17934   else
17935    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17936    MAKE_REQUIRED_VERSION="3.81"
17937  fi
17938
17939  if test "x$MAKE_CANDIDATE" != x; then
17940    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17941$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17942    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17943    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17944    if test "x$IS_GNU_MAKE" = x; then
17945      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17946$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17947    else
17948      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17949      if test "x$IS_MODERN_MAKE" = x; then
17950        { $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
17951$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;}
17952      else
17953        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17954          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17955            MAKE_EXPECTED_ENV='cygwin'
17956          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17957            MAKE_EXPECTED_ENV='msys'
17958          else
17959            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17960          fi
17961          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17962          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17963        else
17964          # Not relevant for non-Windows
17965          IS_MAKE_CORRECT_ENV=true
17966        fi
17967        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17968          { $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
17969$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;}
17970        else
17971          FOUND_MAKE=$MAKE_CANDIDATE
17972
17973  # Only process if variable expands to non-empty
17974
17975  if test "x$FOUND_MAKE" != x; then
17976    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17977
17978  # First separate the path from the arguments. This will split at the first
17979  # space.
17980  complete="$FOUND_MAKE"
17981  path="${complete%% *}"
17982  tmp="$complete EOL"
17983  arguments="${tmp#* }"
17984
17985  # Input might be given as Windows format, start by converting to
17986  # unix format.
17987  new_path=`$CYGPATH -u "$path"`
17988
17989  # Now try to locate executable using which
17990  new_path=`$WHICH "$new_path" 2> /dev/null`
17991  # bat and cmd files are not always considered executable in cygwin causing which
17992  # to not find them
17993  if test "x$new_path" = x \
17994      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17995      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17996    new_path=`$CYGPATH -u "$path"`
17997  fi
17998  if test "x$new_path" = x; then
17999    # Oops. Which didn't find the executable.
18000    # The splitting of arguments from the executable at a space might have been incorrect,
18001    # since paths with space are more likely in Windows. Give it another try with the whole
18002    # argument.
18003    path="$complete"
18004    arguments="EOL"
18005    new_path=`$CYGPATH -u "$path"`
18006    new_path=`$WHICH "$new_path" 2> /dev/null`
18007    # bat and cmd files are not always considered executable in cygwin causing which
18008    # to not find them
18009    if test "x$new_path" = x \
18010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18012      new_path=`$CYGPATH -u "$path"`
18013    fi
18014    if test "x$new_path" = x; then
18015      # It's still not found. Now this is an unrecoverable error.
18016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18017$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18018      has_space=`$ECHO "$complete" | $GREP " "`
18019      if test "x$has_space" != x; then
18020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18022      fi
18023      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18024    fi
18025  fi
18026
18027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18030  # "foo.exe" is OK but "foo" is an error.
18031  #
18032  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18033  # It is also a way to make sure we got the proper file name for the real test later on.
18034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18035  if test "x$test_shortpath" = x; then
18036    # Short path failed, file does not exist as specified.
18037    # Try adding .exe or .cmd
18038    if test -f "${new_path}.exe"; then
18039      input_to_shortpath="${new_path}.exe"
18040    elif test -f "${new_path}.cmd"; then
18041      input_to_shortpath="${new_path}.cmd"
18042    else
18043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18044$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18045      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18046$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18047      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18048    fi
18049  else
18050    input_to_shortpath="$new_path"
18051  fi
18052
18053  # Call helper function which possibly converts this using DOS-style short mode.
18054  # If so, the updated path is stored in $new_path.
18055  new_path="$input_to_shortpath"
18056
18057  input_path="$input_to_shortpath"
18058  # Check if we need to convert this using DOS-style short mode. If the path
18059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18060  # take no chances and rewrite it.
18061  # Note: m4 eats our [], so we need to use [ and ] instead.
18062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18063  if test "x$has_forbidden_chars" != x; then
18064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18068      # Going to short mode and back again did indeed matter. Since short mode is
18069      # case insensitive, let's make it lowercase to improve readability.
18070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18071      # Now convert it back to Unix-style (cygpath)
18072      input_path=`$CYGPATH -u "$shortmode_path"`
18073      new_path="$input_path"
18074    fi
18075  fi
18076
18077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18078  if test "x$test_cygdrive_prefix" = x; then
18079    # As a simple fix, exclude /usr/bin since it's not a real path.
18080    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18082      # a path prefixed by /cygdrive for fixpath to work.
18083      new_path="$CYGWIN_ROOT_PATH$input_path"
18084    fi
18085  fi
18086
18087  # remove trailing .exe if any
18088  new_path="${new_path/%.exe/}"
18089
18090    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18091
18092  # First separate the path from the arguments. This will split at the first
18093  # space.
18094  complete="$FOUND_MAKE"
18095  path="${complete%% *}"
18096  tmp="$complete EOL"
18097  arguments="${tmp#* }"
18098
18099  # Input might be given as Windows format, start by converting to
18100  # unix format.
18101  new_path="$path"
18102
18103  windows_path="$new_path"
18104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18105    unix_path=`$CYGPATH -u "$windows_path"`
18106    new_path="$unix_path"
18107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18109    new_path="$unix_path"
18110  fi
18111
18112
18113  # Now try to locate executable using which
18114  new_path=`$WHICH "$new_path" 2> /dev/null`
18115
18116  if test "x$new_path" = x; then
18117    # Oops. Which didn't find the executable.
18118    # The splitting of arguments from the executable at a space might have been incorrect,
18119    # since paths with space are more likely in Windows. Give it another try with the whole
18120    # argument.
18121    path="$complete"
18122    arguments="EOL"
18123    new_path="$path"
18124
18125  windows_path="$new_path"
18126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18127    unix_path=`$CYGPATH -u "$windows_path"`
18128    new_path="$unix_path"
18129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18131    new_path="$unix_path"
18132  fi
18133
18134
18135    new_path=`$WHICH "$new_path" 2> /dev/null`
18136    # bat and cmd files are not always considered executable in MSYS causing which
18137    # to not find them
18138    if test "x$new_path" = x \
18139        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18140        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18141      new_path="$path"
18142
18143  windows_path="$new_path"
18144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18145    unix_path=`$CYGPATH -u "$windows_path"`
18146    new_path="$unix_path"
18147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18149    new_path="$unix_path"
18150  fi
18151
18152    fi
18153
18154    if test "x$new_path" = x; then
18155      # It's still not found. Now this is an unrecoverable error.
18156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18157$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18158      has_space=`$ECHO "$complete" | $GREP " "`
18159      if test "x$has_space" != x; then
18160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18162      fi
18163      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18164    fi
18165  fi
18166
18167  # Now new_path has a complete unix path to the binary
18168  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18169    # Keep paths in /bin as-is, but remove trailing .exe if any
18170    new_path="${new_path/%.exe/}"
18171    # Do not save /bin paths to all_fixpath_prefixes!
18172  else
18173    # Not in mixed or Windows style, start by that.
18174    new_path=`cmd //c echo $new_path`
18175
18176  input_path="$new_path"
18177  # Check if we need to convert this using DOS-style short mode. If the path
18178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18179  # take no chances and rewrite it.
18180  # Note: m4 eats our [], so we need to use [ and ] instead.
18181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18182  if test "x$has_forbidden_chars" != x; then
18183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18185  fi
18186
18187    # Output is in $new_path
18188
18189  windows_path="$new_path"
18190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18191    unix_path=`$CYGPATH -u "$windows_path"`
18192    new_path="$unix_path"
18193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18195    new_path="$unix_path"
18196  fi
18197
18198    # remove trailing .exe if any
18199    new_path="${new_path/%.exe/}"
18200
18201    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18202    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18203  fi
18204
18205    else
18206      # We're on a unix platform. Hooray! :)
18207      # First separate the path from the arguments. This will split at the first
18208      # space.
18209      complete="$FOUND_MAKE"
18210      path="${complete%% *}"
18211      tmp="$complete EOL"
18212      arguments="${tmp#* }"
18213
18214      # Cannot rely on the command "which" here since it doesn't always work.
18215      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18216      if test -z "$is_absolute_path"; then
18217        # Path to executable is not absolute. Find it.
18218        IFS_save="$IFS"
18219        IFS=:
18220        for p in $PATH; do
18221          if test -f "$p/$path" && test -x "$p/$path"; then
18222            new_path="$p/$path"
18223            break
18224          fi
18225        done
18226        IFS="$IFS_save"
18227      else
18228        # This is an absolute path, we can use it without further modifications.
18229        new_path="$path"
18230      fi
18231
18232      if test "x$new_path" = x; then
18233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18234$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18235        has_space=`$ECHO "$complete" | $GREP " "`
18236        if test "x$has_space" != x; then
18237          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18238$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18239        fi
18240        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18241      fi
18242    fi
18243
18244    # Now join together the path and the arguments once again
18245    if test "x$arguments" != xEOL; then
18246      new_complete="$new_path ${arguments% *}"
18247    else
18248      new_complete="$new_path"
18249    fi
18250
18251    if test "x$complete" != "x$new_complete"; then
18252      FOUND_MAKE="$new_complete"
18253      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18254$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18255    fi
18256  fi
18257
18258        fi
18259      fi
18260    fi
18261  fi
18262
18263    fi
18264
18265    if test "x$FOUND_MAKE" = x; then
18266      if test "x$TOOLCHAIN_PATH" != x; then
18267        # We have a toolchain path, check that as well before giving up.
18268        OLD_PATH=$PATH
18269        PATH=$TOOLCHAIN_PATH:$PATH
18270        for ac_prog in gmake
18271do
18272  # Extract the first word of "$ac_prog", so it can be a program name with args.
18273set dummy $ac_prog; ac_word=$2
18274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18275$as_echo_n "checking for $ac_word... " >&6; }
18276if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18277  $as_echo_n "(cached) " >&6
18278else
18279  case $CHECK_TOOLSDIR_GMAKE in
18280  [\\/]* | ?:[\\/]*)
18281  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18282  ;;
18283  *)
18284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18285for as_dir in $PATH
18286do
18287  IFS=$as_save_IFS
18288  test -z "$as_dir" && as_dir=.
18289    for ac_exec_ext in '' $ac_executable_extensions; do
18290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18291    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18293    break 2
18294  fi
18295done
18296  done
18297IFS=$as_save_IFS
18298
18299  ;;
18300esac
18301fi
18302CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18303if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18305$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18306else
18307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18308$as_echo "no" >&6; }
18309fi
18310
18311
18312  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18313done
18314
18315
18316  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18317  DESCRIPTION="gmake in tools-dir"
18318
18319  # On Cygwin, we require a newer version of make than on other platforms
18320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18321    MAKE_VERSION_EXPR="-e 4\."
18322    MAKE_REQUIRED_VERSION="4.0"
18323   else
18324    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18325    MAKE_REQUIRED_VERSION="3.81"
18326  fi
18327
18328  if test "x$MAKE_CANDIDATE" != x; then
18329    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18330$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18331    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18332    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18333    if test "x$IS_GNU_MAKE" = x; then
18334      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18335$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18336    else
18337      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18338      if test "x$IS_MODERN_MAKE" = x; then
18339        { $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
18340$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;}
18341      else
18342        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18343          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18344            MAKE_EXPECTED_ENV='cygwin'
18345          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18346            MAKE_EXPECTED_ENV='msys'
18347          else
18348            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18349          fi
18350          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18351          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18352        else
18353          # Not relevant for non-Windows
18354          IS_MAKE_CORRECT_ENV=true
18355        fi
18356        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18357          { $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
18358$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;}
18359        else
18360          FOUND_MAKE=$MAKE_CANDIDATE
18361
18362  # Only process if variable expands to non-empty
18363
18364  if test "x$FOUND_MAKE" != x; then
18365    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18366
18367  # First separate the path from the arguments. This will split at the first
18368  # space.
18369  complete="$FOUND_MAKE"
18370  path="${complete%% *}"
18371  tmp="$complete EOL"
18372  arguments="${tmp#* }"
18373
18374  # Input might be given as Windows format, start by converting to
18375  # unix format.
18376  new_path=`$CYGPATH -u "$path"`
18377
18378  # Now try to locate executable using which
18379  new_path=`$WHICH "$new_path" 2> /dev/null`
18380  # bat and cmd files are not always considered executable in cygwin causing which
18381  # to not find them
18382  if test "x$new_path" = x \
18383      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18384      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18385    new_path=`$CYGPATH -u "$path"`
18386  fi
18387  if test "x$new_path" = x; then
18388    # Oops. Which didn't find the executable.
18389    # The splitting of arguments from the executable at a space might have been incorrect,
18390    # since paths with space are more likely in Windows. Give it another try with the whole
18391    # argument.
18392    path="$complete"
18393    arguments="EOL"
18394    new_path=`$CYGPATH -u "$path"`
18395    new_path=`$WHICH "$new_path" 2> /dev/null`
18396    # bat and cmd files are not always considered executable in cygwin causing which
18397    # to not find them
18398    if test "x$new_path" = x \
18399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18401      new_path=`$CYGPATH -u "$path"`
18402    fi
18403    if test "x$new_path" = x; then
18404      # It's still not found. Now this is an unrecoverable error.
18405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18406$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18407      has_space=`$ECHO "$complete" | $GREP " "`
18408      if test "x$has_space" != x; then
18409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18411      fi
18412      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18413    fi
18414  fi
18415
18416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18419  # "foo.exe" is OK but "foo" is an error.
18420  #
18421  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18422  # It is also a way to make sure we got the proper file name for the real test later on.
18423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18424  if test "x$test_shortpath" = x; then
18425    # Short path failed, file does not exist as specified.
18426    # Try adding .exe or .cmd
18427    if test -f "${new_path}.exe"; then
18428      input_to_shortpath="${new_path}.exe"
18429    elif test -f "${new_path}.cmd"; then
18430      input_to_shortpath="${new_path}.cmd"
18431    else
18432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18433$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18434      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18435$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18436      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18437    fi
18438  else
18439    input_to_shortpath="$new_path"
18440  fi
18441
18442  # Call helper function which possibly converts this using DOS-style short mode.
18443  # If so, the updated path is stored in $new_path.
18444  new_path="$input_to_shortpath"
18445
18446  input_path="$input_to_shortpath"
18447  # Check if we need to convert this using DOS-style short mode. If the path
18448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18449  # take no chances and rewrite it.
18450  # Note: m4 eats our [], so we need to use [ and ] instead.
18451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18452  if test "x$has_forbidden_chars" != x; then
18453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18454    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18455    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18456    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18457      # Going to short mode and back again did indeed matter. Since short mode is
18458      # case insensitive, let's make it lowercase to improve readability.
18459      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18460      # Now convert it back to Unix-style (cygpath)
18461      input_path=`$CYGPATH -u "$shortmode_path"`
18462      new_path="$input_path"
18463    fi
18464  fi
18465
18466  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18467  if test "x$test_cygdrive_prefix" = x; then
18468    # As a simple fix, exclude /usr/bin since it's not a real path.
18469    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18470      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18471      # a path prefixed by /cygdrive for fixpath to work.
18472      new_path="$CYGWIN_ROOT_PATH$input_path"
18473    fi
18474  fi
18475
18476  # remove trailing .exe if any
18477  new_path="${new_path/%.exe/}"
18478
18479    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18480
18481  # First separate the path from the arguments. This will split at the first
18482  # space.
18483  complete="$FOUND_MAKE"
18484  path="${complete%% *}"
18485  tmp="$complete EOL"
18486  arguments="${tmp#* }"
18487
18488  # Input might be given as Windows format, start by converting to
18489  # unix format.
18490  new_path="$path"
18491
18492  windows_path="$new_path"
18493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18494    unix_path=`$CYGPATH -u "$windows_path"`
18495    new_path="$unix_path"
18496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18498    new_path="$unix_path"
18499  fi
18500
18501
18502  # Now try to locate executable using which
18503  new_path=`$WHICH "$new_path" 2> /dev/null`
18504
18505  if test "x$new_path" = x; then
18506    # Oops. Which didn't find the executable.
18507    # The splitting of arguments from the executable at a space might have been incorrect,
18508    # since paths with space are more likely in Windows. Give it another try with the whole
18509    # argument.
18510    path="$complete"
18511    arguments="EOL"
18512    new_path="$path"
18513
18514  windows_path="$new_path"
18515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18516    unix_path=`$CYGPATH -u "$windows_path"`
18517    new_path="$unix_path"
18518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18520    new_path="$unix_path"
18521  fi
18522
18523
18524    new_path=`$WHICH "$new_path" 2> /dev/null`
18525    # bat and cmd files are not always considered executable in MSYS causing which
18526    # to not find them
18527    if test "x$new_path" = x \
18528        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18529        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18530      new_path="$path"
18531
18532  windows_path="$new_path"
18533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18534    unix_path=`$CYGPATH -u "$windows_path"`
18535    new_path="$unix_path"
18536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18538    new_path="$unix_path"
18539  fi
18540
18541    fi
18542
18543    if test "x$new_path" = x; then
18544      # It's still not found. Now this is an unrecoverable error.
18545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18546$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18547      has_space=`$ECHO "$complete" | $GREP " "`
18548      if test "x$has_space" != x; then
18549        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18550$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18551      fi
18552      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18553    fi
18554  fi
18555
18556  # Now new_path has a complete unix path to the binary
18557  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18558    # Keep paths in /bin as-is, but remove trailing .exe if any
18559    new_path="${new_path/%.exe/}"
18560    # Do not save /bin paths to all_fixpath_prefixes!
18561  else
18562    # Not in mixed or Windows style, start by that.
18563    new_path=`cmd //c echo $new_path`
18564
18565  input_path="$new_path"
18566  # Check if we need to convert this using DOS-style short mode. If the path
18567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18568  # take no chances and rewrite it.
18569  # Note: m4 eats our [], so we need to use [ and ] instead.
18570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18571  if test "x$has_forbidden_chars" != x; then
18572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18574  fi
18575
18576    # Output is in $new_path
18577
18578  windows_path="$new_path"
18579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18580    unix_path=`$CYGPATH -u "$windows_path"`
18581    new_path="$unix_path"
18582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18584    new_path="$unix_path"
18585  fi
18586
18587    # remove trailing .exe if any
18588    new_path="${new_path/%.exe/}"
18589
18590    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18591    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18592  fi
18593
18594    else
18595      # We're on a unix platform. Hooray! :)
18596      # First separate the path from the arguments. This will split at the first
18597      # space.
18598      complete="$FOUND_MAKE"
18599      path="${complete%% *}"
18600      tmp="$complete EOL"
18601      arguments="${tmp#* }"
18602
18603      # Cannot rely on the command "which" here since it doesn't always work.
18604      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18605      if test -z "$is_absolute_path"; then
18606        # Path to executable is not absolute. Find it.
18607        IFS_save="$IFS"
18608        IFS=:
18609        for p in $PATH; do
18610          if test -f "$p/$path" && test -x "$p/$path"; then
18611            new_path="$p/$path"
18612            break
18613          fi
18614        done
18615        IFS="$IFS_save"
18616      else
18617        # This is an absolute path, we can use it without further modifications.
18618        new_path="$path"
18619      fi
18620
18621      if test "x$new_path" = x; then
18622        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18623$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18624        has_space=`$ECHO "$complete" | $GREP " "`
18625        if test "x$has_space" != x; then
18626          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18627$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18628        fi
18629        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18630      fi
18631    fi
18632
18633    # Now join together the path and the arguments once again
18634    if test "x$arguments" != xEOL; then
18635      new_complete="$new_path ${arguments% *}"
18636    else
18637      new_complete="$new_path"
18638    fi
18639
18640    if test "x$complete" != "x$new_complete"; then
18641      FOUND_MAKE="$new_complete"
18642      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18643$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18644    fi
18645  fi
18646
18647        fi
18648      fi
18649    fi
18650  fi
18651
18652        if test "x$FOUND_MAKE" = x; then
18653          for ac_prog in make
18654do
18655  # Extract the first word of "$ac_prog", so it can be a program name with args.
18656set dummy $ac_prog; ac_word=$2
18657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18658$as_echo_n "checking for $ac_word... " >&6; }
18659if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18660  $as_echo_n "(cached) " >&6
18661else
18662  case $CHECK_TOOLSDIR_MAKE in
18663  [\\/]* | ?:[\\/]*)
18664  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18665  ;;
18666  *)
18667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18668for as_dir in $PATH
18669do
18670  IFS=$as_save_IFS
18671  test -z "$as_dir" && as_dir=.
18672    for ac_exec_ext in '' $ac_executable_extensions; do
18673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18674    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18676    break 2
18677  fi
18678done
18679  done
18680IFS=$as_save_IFS
18681
18682  ;;
18683esac
18684fi
18685CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18686if test -n "$CHECK_TOOLSDIR_MAKE"; then
18687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18688$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18689else
18690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18691$as_echo "no" >&6; }
18692fi
18693
18694
18695  test -n "$CHECK_TOOLSDIR_MAKE" && break
18696done
18697
18698
18699  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18700  DESCRIPTION="make in tools-dir"
18701
18702  # On Cygwin, we require a newer version of make than on other platforms
18703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18704    MAKE_VERSION_EXPR="-e 4\."
18705    MAKE_REQUIRED_VERSION="4.0"
18706   else
18707    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18708    MAKE_REQUIRED_VERSION="3.81"
18709  fi
18710
18711  if test "x$MAKE_CANDIDATE" != x; then
18712    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18713$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18714    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18715    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18716    if test "x$IS_GNU_MAKE" = x; then
18717      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18718$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18719    else
18720      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18721      if test "x$IS_MODERN_MAKE" = x; then
18722        { $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
18723$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;}
18724      else
18725        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18726          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18727            MAKE_EXPECTED_ENV='cygwin'
18728          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18729            MAKE_EXPECTED_ENV='msys'
18730          else
18731            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18732          fi
18733          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18734          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18735        else
18736          # Not relevant for non-Windows
18737          IS_MAKE_CORRECT_ENV=true
18738        fi
18739        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18740          { $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
18741$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;}
18742        else
18743          FOUND_MAKE=$MAKE_CANDIDATE
18744
18745  # Only process if variable expands to non-empty
18746
18747  if test "x$FOUND_MAKE" != x; then
18748    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18749
18750  # First separate the path from the arguments. This will split at the first
18751  # space.
18752  complete="$FOUND_MAKE"
18753  path="${complete%% *}"
18754  tmp="$complete EOL"
18755  arguments="${tmp#* }"
18756
18757  # Input might be given as Windows format, start by converting to
18758  # unix format.
18759  new_path=`$CYGPATH -u "$path"`
18760
18761  # Now try to locate executable using which
18762  new_path=`$WHICH "$new_path" 2> /dev/null`
18763  # bat and cmd files are not always considered executable in cygwin causing which
18764  # to not find them
18765  if test "x$new_path" = x \
18766      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18767      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18768    new_path=`$CYGPATH -u "$path"`
18769  fi
18770  if test "x$new_path" = x; then
18771    # Oops. Which didn't find the executable.
18772    # The splitting of arguments from the executable at a space might have been incorrect,
18773    # since paths with space are more likely in Windows. Give it another try with the whole
18774    # argument.
18775    path="$complete"
18776    arguments="EOL"
18777    new_path=`$CYGPATH -u "$path"`
18778    new_path=`$WHICH "$new_path" 2> /dev/null`
18779    # bat and cmd files are not always considered executable in cygwin causing which
18780    # to not find them
18781    if test "x$new_path" = x \
18782        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18783        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18784      new_path=`$CYGPATH -u "$path"`
18785    fi
18786    if test "x$new_path" = x; then
18787      # It's still not found. Now this is an unrecoverable error.
18788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18789$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18790      has_space=`$ECHO "$complete" | $GREP " "`
18791      if test "x$has_space" != x; then
18792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18794      fi
18795      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18796    fi
18797  fi
18798
18799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18802  # "foo.exe" is OK but "foo" is an error.
18803  #
18804  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18805  # It is also a way to make sure we got the proper file name for the real test later on.
18806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18807  if test "x$test_shortpath" = x; then
18808    # Short path failed, file does not exist as specified.
18809    # Try adding .exe or .cmd
18810    if test -f "${new_path}.exe"; then
18811      input_to_shortpath="${new_path}.exe"
18812    elif test -f "${new_path}.cmd"; then
18813      input_to_shortpath="${new_path}.cmd"
18814    else
18815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18816$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18817      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18818$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18819      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18820    fi
18821  else
18822    input_to_shortpath="$new_path"
18823  fi
18824
18825  # Call helper function which possibly converts this using DOS-style short mode.
18826  # If so, the updated path is stored in $new_path.
18827  new_path="$input_to_shortpath"
18828
18829  input_path="$input_to_shortpath"
18830  # Check if we need to convert this using DOS-style short mode. If the path
18831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18832  # take no chances and rewrite it.
18833  # Note: m4 eats our [], so we need to use [ and ] instead.
18834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18835  if test "x$has_forbidden_chars" != x; then
18836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18840      # Going to short mode and back again did indeed matter. Since short mode is
18841      # case insensitive, let's make it lowercase to improve readability.
18842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18843      # Now convert it back to Unix-style (cygpath)
18844      input_path=`$CYGPATH -u "$shortmode_path"`
18845      new_path="$input_path"
18846    fi
18847  fi
18848
18849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18850  if test "x$test_cygdrive_prefix" = x; then
18851    # As a simple fix, exclude /usr/bin since it's not a real path.
18852    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18854      # a path prefixed by /cygdrive for fixpath to work.
18855      new_path="$CYGWIN_ROOT_PATH$input_path"
18856    fi
18857  fi
18858
18859  # remove trailing .exe if any
18860  new_path="${new_path/%.exe/}"
18861
18862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18863
18864  # First separate the path from the arguments. This will split at the first
18865  # space.
18866  complete="$FOUND_MAKE"
18867  path="${complete%% *}"
18868  tmp="$complete EOL"
18869  arguments="${tmp#* }"
18870
18871  # Input might be given as Windows format, start by converting to
18872  # unix format.
18873  new_path="$path"
18874
18875  windows_path="$new_path"
18876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18877    unix_path=`$CYGPATH -u "$windows_path"`
18878    new_path="$unix_path"
18879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18881    new_path="$unix_path"
18882  fi
18883
18884
18885  # Now try to locate executable using which
18886  new_path=`$WHICH "$new_path" 2> /dev/null`
18887
18888  if test "x$new_path" = x; then
18889    # Oops. Which didn't find the executable.
18890    # The splitting of arguments from the executable at a space might have been incorrect,
18891    # since paths with space are more likely in Windows. Give it another try with the whole
18892    # argument.
18893    path="$complete"
18894    arguments="EOL"
18895    new_path="$path"
18896
18897  windows_path="$new_path"
18898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18899    unix_path=`$CYGPATH -u "$windows_path"`
18900    new_path="$unix_path"
18901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18903    new_path="$unix_path"
18904  fi
18905
18906
18907    new_path=`$WHICH "$new_path" 2> /dev/null`
18908    # bat and cmd files are not always considered executable in MSYS causing which
18909    # to not find them
18910    if test "x$new_path" = x \
18911        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18912        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18913      new_path="$path"
18914
18915  windows_path="$new_path"
18916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18917    unix_path=`$CYGPATH -u "$windows_path"`
18918    new_path="$unix_path"
18919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18921    new_path="$unix_path"
18922  fi
18923
18924    fi
18925
18926    if test "x$new_path" = x; then
18927      # It's still not found. Now this is an unrecoverable error.
18928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18929$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18930      has_space=`$ECHO "$complete" | $GREP " "`
18931      if test "x$has_space" != x; then
18932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18934      fi
18935      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18936    fi
18937  fi
18938
18939  # Now new_path has a complete unix path to the binary
18940  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18941    # Keep paths in /bin as-is, but remove trailing .exe if any
18942    new_path="${new_path/%.exe/}"
18943    # Do not save /bin paths to all_fixpath_prefixes!
18944  else
18945    # Not in mixed or Windows style, start by that.
18946    new_path=`cmd //c echo $new_path`
18947
18948  input_path="$new_path"
18949  # Check if we need to convert this using DOS-style short mode. If the path
18950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18951  # take no chances and rewrite it.
18952  # Note: m4 eats our [], so we need to use [ and ] instead.
18953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18954  if test "x$has_forbidden_chars" != x; then
18955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18957  fi
18958
18959    # Output is in $new_path
18960
18961  windows_path="$new_path"
18962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18963    unix_path=`$CYGPATH -u "$windows_path"`
18964    new_path="$unix_path"
18965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18967    new_path="$unix_path"
18968  fi
18969
18970    # remove trailing .exe if any
18971    new_path="${new_path/%.exe/}"
18972
18973    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18974    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18975  fi
18976
18977    else
18978      # We're on a unix platform. Hooray! :)
18979      # First separate the path from the arguments. This will split at the first
18980      # space.
18981      complete="$FOUND_MAKE"
18982      path="${complete%% *}"
18983      tmp="$complete EOL"
18984      arguments="${tmp#* }"
18985
18986      # Cannot rely on the command "which" here since it doesn't always work.
18987      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18988      if test -z "$is_absolute_path"; then
18989        # Path to executable is not absolute. Find it.
18990        IFS_save="$IFS"
18991        IFS=:
18992        for p in $PATH; do
18993          if test -f "$p/$path" && test -x "$p/$path"; then
18994            new_path="$p/$path"
18995            break
18996          fi
18997        done
18998        IFS="$IFS_save"
18999      else
19000        # This is an absolute path, we can use it without further modifications.
19001        new_path="$path"
19002      fi
19003
19004      if test "x$new_path" = x; then
19005        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19006$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19007        has_space=`$ECHO "$complete" | $GREP " "`
19008        if test "x$has_space" != x; then
19009          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19010$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19011        fi
19012        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19013      fi
19014    fi
19015
19016    # Now join together the path and the arguments once again
19017    if test "x$arguments" != xEOL; then
19018      new_complete="$new_path ${arguments% *}"
19019    else
19020      new_complete="$new_path"
19021    fi
19022
19023    if test "x$complete" != "x$new_complete"; then
19024      FOUND_MAKE="$new_complete"
19025      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19026$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19027    fi
19028  fi
19029
19030        fi
19031      fi
19032    fi
19033  fi
19034
19035        fi
19036        PATH=$OLD_PATH
19037      fi
19038    fi
19039
19040    if test "x$FOUND_MAKE" = x; then
19041      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
19042    fi
19043
19044  else
19045    # The variable is set, but is it from the command line or the environment?
19046
19047    # Try to remove the string !MAKE! from our list.
19048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19050      # If it failed, the variable was not from the command line. Ignore it,
19051      # but warn the user (except for BASH, which is always set by the calling BASH).
19052      if test "xMAKE" != xBASH; then
19053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19054$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19055      fi
19056      # Try to locate tool using the code snippet
19057
19058    # Try our hardest to locate a correct version of GNU make
19059    for ac_prog in gmake
19060do
19061  # Extract the first word of "$ac_prog", so it can be a program name with args.
19062set dummy $ac_prog; ac_word=$2
19063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19064$as_echo_n "checking for $ac_word... " >&6; }
19065if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19066  $as_echo_n "(cached) " >&6
19067else
19068  case $CHECK_GMAKE in
19069  [\\/]* | ?:[\\/]*)
19070  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19071  ;;
19072  *)
19073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19074for as_dir in $PATH
19075do
19076  IFS=$as_save_IFS
19077  test -z "$as_dir" && as_dir=.
19078    for ac_exec_ext in '' $ac_executable_extensions; do
19079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19080    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19082    break 2
19083  fi
19084done
19085  done
19086IFS=$as_save_IFS
19087
19088  ;;
19089esac
19090fi
19091CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19092if test -n "$CHECK_GMAKE"; then
19093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19094$as_echo "$CHECK_GMAKE" >&6; }
19095else
19096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19097$as_echo "no" >&6; }
19098fi
19099
19100
19101  test -n "$CHECK_GMAKE" && break
19102done
19103
19104
19105  MAKE_CANDIDATE=""$CHECK_GMAKE""
19106  DESCRIPTION="gmake in PATH"
19107
19108  # On Cygwin, we require a newer version of make than on other platforms
19109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19110    MAKE_VERSION_EXPR="-e 4\."
19111    MAKE_REQUIRED_VERSION="4.0"
19112   else
19113    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19114    MAKE_REQUIRED_VERSION="3.81"
19115  fi
19116
19117  if test "x$MAKE_CANDIDATE" != x; then
19118    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19119$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19120    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19121    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19122    if test "x$IS_GNU_MAKE" = x; then
19123      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19124$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19125    else
19126      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19127      if test "x$IS_MODERN_MAKE" = x; then
19128        { $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
19129$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;}
19130      else
19131        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19132          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19133            MAKE_EXPECTED_ENV='cygwin'
19134          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19135            MAKE_EXPECTED_ENV='msys'
19136          else
19137            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19138          fi
19139          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19140          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19141        else
19142          # Not relevant for non-Windows
19143          IS_MAKE_CORRECT_ENV=true
19144        fi
19145        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19146          { $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
19147$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;}
19148        else
19149          FOUND_MAKE=$MAKE_CANDIDATE
19150
19151  # Only process if variable expands to non-empty
19152
19153  if test "x$FOUND_MAKE" != x; then
19154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19155
19156  # First separate the path from the arguments. This will split at the first
19157  # space.
19158  complete="$FOUND_MAKE"
19159  path="${complete%% *}"
19160  tmp="$complete EOL"
19161  arguments="${tmp#* }"
19162
19163  # Input might be given as Windows format, start by converting to
19164  # unix format.
19165  new_path=`$CYGPATH -u "$path"`
19166
19167  # Now try to locate executable using which
19168  new_path=`$WHICH "$new_path" 2> /dev/null`
19169  # bat and cmd files are not always considered executable in cygwin causing which
19170  # to not find them
19171  if test "x$new_path" = x \
19172      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19173      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19174    new_path=`$CYGPATH -u "$path"`
19175  fi
19176  if test "x$new_path" = x; then
19177    # Oops. Which didn't find the executable.
19178    # The splitting of arguments from the executable at a space might have been incorrect,
19179    # since paths with space are more likely in Windows. Give it another try with the whole
19180    # argument.
19181    path="$complete"
19182    arguments="EOL"
19183    new_path=`$CYGPATH -u "$path"`
19184    new_path=`$WHICH "$new_path" 2> /dev/null`
19185    # bat and cmd files are not always considered executable in cygwin causing which
19186    # to not find them
19187    if test "x$new_path" = x \
19188        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19189        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19190      new_path=`$CYGPATH -u "$path"`
19191    fi
19192    if test "x$new_path" = x; then
19193      # It's still not found. Now this is an unrecoverable error.
19194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19195$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19196      has_space=`$ECHO "$complete" | $GREP " "`
19197      if test "x$has_space" != x; then
19198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19200      fi
19201      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19202    fi
19203  fi
19204
19205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19208  # "foo.exe" is OK but "foo" is an error.
19209  #
19210  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19211  # It is also a way to make sure we got the proper file name for the real test later on.
19212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19213  if test "x$test_shortpath" = x; then
19214    # Short path failed, file does not exist as specified.
19215    # Try adding .exe or .cmd
19216    if test -f "${new_path}.exe"; then
19217      input_to_shortpath="${new_path}.exe"
19218    elif test -f "${new_path}.cmd"; then
19219      input_to_shortpath="${new_path}.cmd"
19220    else
19221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19222$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19223      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19224$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19225      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19226    fi
19227  else
19228    input_to_shortpath="$new_path"
19229  fi
19230
19231  # Call helper function which possibly converts this using DOS-style short mode.
19232  # If so, the updated path is stored in $new_path.
19233  new_path="$input_to_shortpath"
19234
19235  input_path="$input_to_shortpath"
19236  # Check if we need to convert this using DOS-style short mode. If the path
19237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19238  # take no chances and rewrite it.
19239  # Note: m4 eats our [], so we need to use [ and ] instead.
19240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19241  if test "x$has_forbidden_chars" != x; then
19242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19246      # Going to short mode and back again did indeed matter. Since short mode is
19247      # case insensitive, let's make it lowercase to improve readability.
19248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19249      # Now convert it back to Unix-style (cygpath)
19250      input_path=`$CYGPATH -u "$shortmode_path"`
19251      new_path="$input_path"
19252    fi
19253  fi
19254
19255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19256  if test "x$test_cygdrive_prefix" = x; then
19257    # As a simple fix, exclude /usr/bin since it's not a real path.
19258    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19260      # a path prefixed by /cygdrive for fixpath to work.
19261      new_path="$CYGWIN_ROOT_PATH$input_path"
19262    fi
19263  fi
19264
19265  # remove trailing .exe if any
19266  new_path="${new_path/%.exe/}"
19267
19268    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19269
19270  # First separate the path from the arguments. This will split at the first
19271  # space.
19272  complete="$FOUND_MAKE"
19273  path="${complete%% *}"
19274  tmp="$complete EOL"
19275  arguments="${tmp#* }"
19276
19277  # Input might be given as Windows format, start by converting to
19278  # unix format.
19279  new_path="$path"
19280
19281  windows_path="$new_path"
19282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19283    unix_path=`$CYGPATH -u "$windows_path"`
19284    new_path="$unix_path"
19285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19287    new_path="$unix_path"
19288  fi
19289
19290
19291  # Now try to locate executable using which
19292  new_path=`$WHICH "$new_path" 2> /dev/null`
19293
19294  if test "x$new_path" = x; then
19295    # Oops. Which didn't find the executable.
19296    # The splitting of arguments from the executable at a space might have been incorrect,
19297    # since paths with space are more likely in Windows. Give it another try with the whole
19298    # argument.
19299    path="$complete"
19300    arguments="EOL"
19301    new_path="$path"
19302
19303  windows_path="$new_path"
19304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19305    unix_path=`$CYGPATH -u "$windows_path"`
19306    new_path="$unix_path"
19307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19309    new_path="$unix_path"
19310  fi
19311
19312
19313    new_path=`$WHICH "$new_path" 2> /dev/null`
19314    # bat and cmd files are not always considered executable in MSYS causing which
19315    # to not find them
19316    if test "x$new_path" = x \
19317        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19318        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19319      new_path="$path"
19320
19321  windows_path="$new_path"
19322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19323    unix_path=`$CYGPATH -u "$windows_path"`
19324    new_path="$unix_path"
19325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19327    new_path="$unix_path"
19328  fi
19329
19330    fi
19331
19332    if test "x$new_path" = x; then
19333      # It's still not found. Now this is an unrecoverable error.
19334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19335$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19336      has_space=`$ECHO "$complete" | $GREP " "`
19337      if test "x$has_space" != x; then
19338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19340      fi
19341      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19342    fi
19343  fi
19344
19345  # Now new_path has a complete unix path to the binary
19346  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19347    # Keep paths in /bin as-is, but remove trailing .exe if any
19348    new_path="${new_path/%.exe/}"
19349    # Do not save /bin paths to all_fixpath_prefixes!
19350  else
19351    # Not in mixed or Windows style, start by that.
19352    new_path=`cmd //c echo $new_path`
19353
19354  input_path="$new_path"
19355  # Check if we need to convert this using DOS-style short mode. If the path
19356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19357  # take no chances and rewrite it.
19358  # Note: m4 eats our [], so we need to use [ and ] instead.
19359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19360  if test "x$has_forbidden_chars" != x; then
19361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19363  fi
19364
19365    # Output is in $new_path
19366
19367  windows_path="$new_path"
19368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19369    unix_path=`$CYGPATH -u "$windows_path"`
19370    new_path="$unix_path"
19371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19373    new_path="$unix_path"
19374  fi
19375
19376    # remove trailing .exe if any
19377    new_path="${new_path/%.exe/}"
19378
19379    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19380    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19381  fi
19382
19383    else
19384      # We're on a unix platform. Hooray! :)
19385      # First separate the path from the arguments. This will split at the first
19386      # space.
19387      complete="$FOUND_MAKE"
19388      path="${complete%% *}"
19389      tmp="$complete EOL"
19390      arguments="${tmp#* }"
19391
19392      # Cannot rely on the command "which" here since it doesn't always work.
19393      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19394      if test -z "$is_absolute_path"; then
19395        # Path to executable is not absolute. Find it.
19396        IFS_save="$IFS"
19397        IFS=:
19398        for p in $PATH; do
19399          if test -f "$p/$path" && test -x "$p/$path"; then
19400            new_path="$p/$path"
19401            break
19402          fi
19403        done
19404        IFS="$IFS_save"
19405      else
19406        # This is an absolute path, we can use it without further modifications.
19407        new_path="$path"
19408      fi
19409
19410      if test "x$new_path" = x; then
19411        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19412$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19413        has_space=`$ECHO "$complete" | $GREP " "`
19414        if test "x$has_space" != x; then
19415          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19416$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19417        fi
19418        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19419      fi
19420    fi
19421
19422    # Now join together the path and the arguments once again
19423    if test "x$arguments" != xEOL; then
19424      new_complete="$new_path ${arguments% *}"
19425    else
19426      new_complete="$new_path"
19427    fi
19428
19429    if test "x$complete" != "x$new_complete"; then
19430      FOUND_MAKE="$new_complete"
19431      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19432$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19433    fi
19434  fi
19435
19436        fi
19437      fi
19438    fi
19439  fi
19440
19441
19442    if test "x$FOUND_MAKE" = x; then
19443      for ac_prog in make
19444do
19445  # Extract the first word of "$ac_prog", so it can be a program name with args.
19446set dummy $ac_prog; ac_word=$2
19447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19448$as_echo_n "checking for $ac_word... " >&6; }
19449if ${ac_cv_path_CHECK_MAKE+:} false; then :
19450  $as_echo_n "(cached) " >&6
19451else
19452  case $CHECK_MAKE in
19453  [\\/]* | ?:[\\/]*)
19454  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19455  ;;
19456  *)
19457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19458for as_dir in $PATH
19459do
19460  IFS=$as_save_IFS
19461  test -z "$as_dir" && as_dir=.
19462    for ac_exec_ext in '' $ac_executable_extensions; do
19463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19464    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19466    break 2
19467  fi
19468done
19469  done
19470IFS=$as_save_IFS
19471
19472  ;;
19473esac
19474fi
19475CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19476if test -n "$CHECK_MAKE"; then
19477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19478$as_echo "$CHECK_MAKE" >&6; }
19479else
19480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19481$as_echo "no" >&6; }
19482fi
19483
19484
19485  test -n "$CHECK_MAKE" && break
19486done
19487
19488
19489  MAKE_CANDIDATE=""$CHECK_MAKE""
19490  DESCRIPTION="make in PATH"
19491
19492  # On Cygwin, we require a newer version of make than on other platforms
19493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19494    MAKE_VERSION_EXPR="-e 4\."
19495    MAKE_REQUIRED_VERSION="4.0"
19496   else
19497    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19498    MAKE_REQUIRED_VERSION="3.81"
19499  fi
19500
19501  if test "x$MAKE_CANDIDATE" != x; then
19502    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19503$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19504    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19505    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19506    if test "x$IS_GNU_MAKE" = x; then
19507      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19508$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19509    else
19510      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19511      if test "x$IS_MODERN_MAKE" = x; then
19512        { $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
19513$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;}
19514      else
19515        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19516          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19517            MAKE_EXPECTED_ENV='cygwin'
19518          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19519            MAKE_EXPECTED_ENV='msys'
19520          else
19521            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19522          fi
19523          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19524          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19525        else
19526          # Not relevant for non-Windows
19527          IS_MAKE_CORRECT_ENV=true
19528        fi
19529        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19530          { $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
19531$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;}
19532        else
19533          FOUND_MAKE=$MAKE_CANDIDATE
19534
19535  # Only process if variable expands to non-empty
19536
19537  if test "x$FOUND_MAKE" != x; then
19538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19539
19540  # First separate the path from the arguments. This will split at the first
19541  # space.
19542  complete="$FOUND_MAKE"
19543  path="${complete%% *}"
19544  tmp="$complete EOL"
19545  arguments="${tmp#* }"
19546
19547  # Input might be given as Windows format, start by converting to
19548  # unix format.
19549  new_path=`$CYGPATH -u "$path"`
19550
19551  # Now try to locate executable using which
19552  new_path=`$WHICH "$new_path" 2> /dev/null`
19553  # bat and cmd files are not always considered executable in cygwin causing which
19554  # to not find them
19555  if test "x$new_path" = x \
19556      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19557      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19558    new_path=`$CYGPATH -u "$path"`
19559  fi
19560  if test "x$new_path" = x; then
19561    # Oops. Which didn't find the executable.
19562    # The splitting of arguments from the executable at a space might have been incorrect,
19563    # since paths with space are more likely in Windows. Give it another try with the whole
19564    # argument.
19565    path="$complete"
19566    arguments="EOL"
19567    new_path=`$CYGPATH -u "$path"`
19568    new_path=`$WHICH "$new_path" 2> /dev/null`
19569    # bat and cmd files are not always considered executable in cygwin causing which
19570    # to not find them
19571    if test "x$new_path" = x \
19572        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19573        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19574      new_path=`$CYGPATH -u "$path"`
19575    fi
19576    if test "x$new_path" = x; then
19577      # It's still not found. Now this is an unrecoverable error.
19578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19579$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19580      has_space=`$ECHO "$complete" | $GREP " "`
19581      if test "x$has_space" != x; then
19582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19584      fi
19585      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19586    fi
19587  fi
19588
19589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19592  # "foo.exe" is OK but "foo" is an error.
19593  #
19594  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19595  # It is also a way to make sure we got the proper file name for the real test later on.
19596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19597  if test "x$test_shortpath" = x; then
19598    # Short path failed, file does not exist as specified.
19599    # Try adding .exe or .cmd
19600    if test -f "${new_path}.exe"; then
19601      input_to_shortpath="${new_path}.exe"
19602    elif test -f "${new_path}.cmd"; then
19603      input_to_shortpath="${new_path}.cmd"
19604    else
19605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19606$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19607      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19608$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19609      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19610    fi
19611  else
19612    input_to_shortpath="$new_path"
19613  fi
19614
19615  # Call helper function which possibly converts this using DOS-style short mode.
19616  # If so, the updated path is stored in $new_path.
19617  new_path="$input_to_shortpath"
19618
19619  input_path="$input_to_shortpath"
19620  # Check if we need to convert this using DOS-style short mode. If the path
19621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19622  # take no chances and rewrite it.
19623  # Note: m4 eats our [], so we need to use [ and ] instead.
19624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19625  if test "x$has_forbidden_chars" != x; then
19626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19630      # Going to short mode and back again did indeed matter. Since short mode is
19631      # case insensitive, let's make it lowercase to improve readability.
19632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19633      # Now convert it back to Unix-style (cygpath)
19634      input_path=`$CYGPATH -u "$shortmode_path"`
19635      new_path="$input_path"
19636    fi
19637  fi
19638
19639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19640  if test "x$test_cygdrive_prefix" = x; then
19641    # As a simple fix, exclude /usr/bin since it's not a real path.
19642    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19644      # a path prefixed by /cygdrive for fixpath to work.
19645      new_path="$CYGWIN_ROOT_PATH$input_path"
19646    fi
19647  fi
19648
19649  # remove trailing .exe if any
19650  new_path="${new_path/%.exe/}"
19651
19652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19653
19654  # First separate the path from the arguments. This will split at the first
19655  # space.
19656  complete="$FOUND_MAKE"
19657  path="${complete%% *}"
19658  tmp="$complete EOL"
19659  arguments="${tmp#* }"
19660
19661  # Input might be given as Windows format, start by converting to
19662  # unix format.
19663  new_path="$path"
19664
19665  windows_path="$new_path"
19666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19667    unix_path=`$CYGPATH -u "$windows_path"`
19668    new_path="$unix_path"
19669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19671    new_path="$unix_path"
19672  fi
19673
19674
19675  # Now try to locate executable using which
19676  new_path=`$WHICH "$new_path" 2> /dev/null`
19677
19678  if test "x$new_path" = x; then
19679    # Oops. Which didn't find the executable.
19680    # The splitting of arguments from the executable at a space might have been incorrect,
19681    # since paths with space are more likely in Windows. Give it another try with the whole
19682    # argument.
19683    path="$complete"
19684    arguments="EOL"
19685    new_path="$path"
19686
19687  windows_path="$new_path"
19688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19689    unix_path=`$CYGPATH -u "$windows_path"`
19690    new_path="$unix_path"
19691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19693    new_path="$unix_path"
19694  fi
19695
19696
19697    new_path=`$WHICH "$new_path" 2> /dev/null`
19698    # bat and cmd files are not always considered executable in MSYS causing which
19699    # to not find them
19700    if test "x$new_path" = x \
19701        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19702        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19703      new_path="$path"
19704
19705  windows_path="$new_path"
19706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19707    unix_path=`$CYGPATH -u "$windows_path"`
19708    new_path="$unix_path"
19709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19711    new_path="$unix_path"
19712  fi
19713
19714    fi
19715
19716    if test "x$new_path" = x; then
19717      # It's still not found. Now this is an unrecoverable error.
19718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19719$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19720      has_space=`$ECHO "$complete" | $GREP " "`
19721      if test "x$has_space" != x; then
19722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19724      fi
19725      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19726    fi
19727  fi
19728
19729  # Now new_path has a complete unix path to the binary
19730  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19731    # Keep paths in /bin as-is, but remove trailing .exe if any
19732    new_path="${new_path/%.exe/}"
19733    # Do not save /bin paths to all_fixpath_prefixes!
19734  else
19735    # Not in mixed or Windows style, start by that.
19736    new_path=`cmd //c echo $new_path`
19737
19738  input_path="$new_path"
19739  # Check if we need to convert this using DOS-style short mode. If the path
19740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19741  # take no chances and rewrite it.
19742  # Note: m4 eats our [], so we need to use [ and ] instead.
19743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19744  if test "x$has_forbidden_chars" != x; then
19745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19747  fi
19748
19749    # Output is in $new_path
19750
19751  windows_path="$new_path"
19752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19753    unix_path=`$CYGPATH -u "$windows_path"`
19754    new_path="$unix_path"
19755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19757    new_path="$unix_path"
19758  fi
19759
19760    # remove trailing .exe if any
19761    new_path="${new_path/%.exe/}"
19762
19763    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19764    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19765  fi
19766
19767    else
19768      # We're on a unix platform. Hooray! :)
19769      # First separate the path from the arguments. This will split at the first
19770      # space.
19771      complete="$FOUND_MAKE"
19772      path="${complete%% *}"
19773      tmp="$complete EOL"
19774      arguments="${tmp#* }"
19775
19776      # Cannot rely on the command "which" here since it doesn't always work.
19777      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19778      if test -z "$is_absolute_path"; then
19779        # Path to executable is not absolute. Find it.
19780        IFS_save="$IFS"
19781        IFS=:
19782        for p in $PATH; do
19783          if test -f "$p/$path" && test -x "$p/$path"; then
19784            new_path="$p/$path"
19785            break
19786          fi
19787        done
19788        IFS="$IFS_save"
19789      else
19790        # This is an absolute path, we can use it without further modifications.
19791        new_path="$path"
19792      fi
19793
19794      if test "x$new_path" = x; then
19795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19796$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19797        has_space=`$ECHO "$complete" | $GREP " "`
19798        if test "x$has_space" != x; then
19799          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19800$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19801        fi
19802        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19803      fi
19804    fi
19805
19806    # Now join together the path and the arguments once again
19807    if test "x$arguments" != xEOL; then
19808      new_complete="$new_path ${arguments% *}"
19809    else
19810      new_complete="$new_path"
19811    fi
19812
19813    if test "x$complete" != "x$new_complete"; then
19814      FOUND_MAKE="$new_complete"
19815      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19816$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19817    fi
19818  fi
19819
19820        fi
19821      fi
19822    fi
19823  fi
19824
19825    fi
19826
19827    if test "x$FOUND_MAKE" = x; then
19828      if test "x$TOOLCHAIN_PATH" != x; then
19829        # We have a toolchain path, check that as well before giving up.
19830        OLD_PATH=$PATH
19831        PATH=$TOOLCHAIN_PATH:$PATH
19832        for ac_prog in gmake
19833do
19834  # Extract the first word of "$ac_prog", so it can be a program name with args.
19835set dummy $ac_prog; ac_word=$2
19836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19837$as_echo_n "checking for $ac_word... " >&6; }
19838if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19839  $as_echo_n "(cached) " >&6
19840else
19841  case $CHECK_TOOLSDIR_GMAKE in
19842  [\\/]* | ?:[\\/]*)
19843  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19844  ;;
19845  *)
19846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19847for as_dir in $PATH
19848do
19849  IFS=$as_save_IFS
19850  test -z "$as_dir" && as_dir=.
19851    for ac_exec_ext in '' $ac_executable_extensions; do
19852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19853    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19855    break 2
19856  fi
19857done
19858  done
19859IFS=$as_save_IFS
19860
19861  ;;
19862esac
19863fi
19864CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19865if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19867$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19868else
19869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19870$as_echo "no" >&6; }
19871fi
19872
19873
19874  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19875done
19876
19877
19878  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19879  DESCRIPTION="gmake in tools-dir"
19880
19881  # On Cygwin, we require a newer version of make than on other platforms
19882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19883    MAKE_VERSION_EXPR="-e 4\."
19884    MAKE_REQUIRED_VERSION="4.0"
19885   else
19886    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19887    MAKE_REQUIRED_VERSION="3.81"
19888  fi
19889
19890  if test "x$MAKE_CANDIDATE" != x; then
19891    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19892$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19893    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19894    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19895    if test "x$IS_GNU_MAKE" = x; then
19896      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19897$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19898    else
19899      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19900      if test "x$IS_MODERN_MAKE" = x; then
19901        { $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
19902$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;}
19903      else
19904        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19905          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19906            MAKE_EXPECTED_ENV='cygwin'
19907          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19908            MAKE_EXPECTED_ENV='msys'
19909          else
19910            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19911          fi
19912          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19913          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19914        else
19915          # Not relevant for non-Windows
19916          IS_MAKE_CORRECT_ENV=true
19917        fi
19918        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19919          { $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
19920$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;}
19921        else
19922          FOUND_MAKE=$MAKE_CANDIDATE
19923
19924  # Only process if variable expands to non-empty
19925
19926  if test "x$FOUND_MAKE" != x; then
19927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19928
19929  # First separate the path from the arguments. This will split at the first
19930  # space.
19931  complete="$FOUND_MAKE"
19932  path="${complete%% *}"
19933  tmp="$complete EOL"
19934  arguments="${tmp#* }"
19935
19936  # Input might be given as Windows format, start by converting to
19937  # unix format.
19938  new_path=`$CYGPATH -u "$path"`
19939
19940  # Now try to locate executable using which
19941  new_path=`$WHICH "$new_path" 2> /dev/null`
19942  # bat and cmd files are not always considered executable in cygwin causing which
19943  # to not find them
19944  if test "x$new_path" = x \
19945      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19946      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19947    new_path=`$CYGPATH -u "$path"`
19948  fi
19949  if test "x$new_path" = x; then
19950    # Oops. Which didn't find the executable.
19951    # The splitting of arguments from the executable at a space might have been incorrect,
19952    # since paths with space are more likely in Windows. Give it another try with the whole
19953    # argument.
19954    path="$complete"
19955    arguments="EOL"
19956    new_path=`$CYGPATH -u "$path"`
19957    new_path=`$WHICH "$new_path" 2> /dev/null`
19958    # bat and cmd files are not always considered executable in cygwin causing which
19959    # to not find them
19960    if test "x$new_path" = x \
19961        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19962        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19963      new_path=`$CYGPATH -u "$path"`
19964    fi
19965    if test "x$new_path" = x; then
19966      # It's still not found. Now this is an unrecoverable error.
19967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19968$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19969      has_space=`$ECHO "$complete" | $GREP " "`
19970      if test "x$has_space" != x; then
19971        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19972$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19973      fi
19974      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19975    fi
19976  fi
19977
19978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19981  # "foo.exe" is OK but "foo" is an error.
19982  #
19983  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19984  # It is also a way to make sure we got the proper file name for the real test later on.
19985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19986  if test "x$test_shortpath" = x; then
19987    # Short path failed, file does not exist as specified.
19988    # Try adding .exe or .cmd
19989    if test -f "${new_path}.exe"; then
19990      input_to_shortpath="${new_path}.exe"
19991    elif test -f "${new_path}.cmd"; then
19992      input_to_shortpath="${new_path}.cmd"
19993    else
19994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19995$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19996      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19997$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19998      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19999    fi
20000  else
20001    input_to_shortpath="$new_path"
20002  fi
20003
20004  # Call helper function which possibly converts this using DOS-style short mode.
20005  # If so, the updated path is stored in $new_path.
20006  new_path="$input_to_shortpath"
20007
20008  input_path="$input_to_shortpath"
20009  # Check if we need to convert this using DOS-style short mode. If the path
20010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20011  # take no chances and rewrite it.
20012  # Note: m4 eats our [], so we need to use [ and ] instead.
20013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20014  if test "x$has_forbidden_chars" != x; then
20015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20019      # Going to short mode and back again did indeed matter. Since short mode is
20020      # case insensitive, let's make it lowercase to improve readability.
20021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20022      # Now convert it back to Unix-style (cygpath)
20023      input_path=`$CYGPATH -u "$shortmode_path"`
20024      new_path="$input_path"
20025    fi
20026  fi
20027
20028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20029  if test "x$test_cygdrive_prefix" = x; then
20030    # As a simple fix, exclude /usr/bin since it's not a real path.
20031    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20033      # a path prefixed by /cygdrive for fixpath to work.
20034      new_path="$CYGWIN_ROOT_PATH$input_path"
20035    fi
20036  fi
20037
20038  # remove trailing .exe if any
20039  new_path="${new_path/%.exe/}"
20040
20041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20042
20043  # First separate the path from the arguments. This will split at the first
20044  # space.
20045  complete="$FOUND_MAKE"
20046  path="${complete%% *}"
20047  tmp="$complete EOL"
20048  arguments="${tmp#* }"
20049
20050  # Input might be given as Windows format, start by converting to
20051  # unix format.
20052  new_path="$path"
20053
20054  windows_path="$new_path"
20055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20056    unix_path=`$CYGPATH -u "$windows_path"`
20057    new_path="$unix_path"
20058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20060    new_path="$unix_path"
20061  fi
20062
20063
20064  # Now try to locate executable using which
20065  new_path=`$WHICH "$new_path" 2> /dev/null`
20066
20067  if test "x$new_path" = x; then
20068    # Oops. Which didn't find the executable.
20069    # The splitting of arguments from the executable at a space might have been incorrect,
20070    # since paths with space are more likely in Windows. Give it another try with the whole
20071    # argument.
20072    path="$complete"
20073    arguments="EOL"
20074    new_path="$path"
20075
20076  windows_path="$new_path"
20077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20078    unix_path=`$CYGPATH -u "$windows_path"`
20079    new_path="$unix_path"
20080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20082    new_path="$unix_path"
20083  fi
20084
20085
20086    new_path=`$WHICH "$new_path" 2> /dev/null`
20087    # bat and cmd files are not always considered executable in MSYS causing which
20088    # to not find them
20089    if test "x$new_path" = x \
20090        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20091        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20092      new_path="$path"
20093
20094  windows_path="$new_path"
20095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20096    unix_path=`$CYGPATH -u "$windows_path"`
20097    new_path="$unix_path"
20098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20100    new_path="$unix_path"
20101  fi
20102
20103    fi
20104
20105    if test "x$new_path" = x; then
20106      # It's still not found. Now this is an unrecoverable error.
20107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20108$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20109      has_space=`$ECHO "$complete" | $GREP " "`
20110      if test "x$has_space" != x; then
20111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20113      fi
20114      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20115    fi
20116  fi
20117
20118  # Now new_path has a complete unix path to the binary
20119  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20120    # Keep paths in /bin as-is, but remove trailing .exe if any
20121    new_path="${new_path/%.exe/}"
20122    # Do not save /bin paths to all_fixpath_prefixes!
20123  else
20124    # Not in mixed or Windows style, start by that.
20125    new_path=`cmd //c echo $new_path`
20126
20127  input_path="$new_path"
20128  # Check if we need to convert this using DOS-style short mode. If the path
20129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20130  # take no chances and rewrite it.
20131  # Note: m4 eats our [], so we need to use [ and ] instead.
20132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20133  if test "x$has_forbidden_chars" != x; then
20134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20136  fi
20137
20138    # Output is in $new_path
20139
20140  windows_path="$new_path"
20141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20142    unix_path=`$CYGPATH -u "$windows_path"`
20143    new_path="$unix_path"
20144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20146    new_path="$unix_path"
20147  fi
20148
20149    # remove trailing .exe if any
20150    new_path="${new_path/%.exe/}"
20151
20152    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20153    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20154  fi
20155
20156    else
20157      # We're on a unix platform. Hooray! :)
20158      # First separate the path from the arguments. This will split at the first
20159      # space.
20160      complete="$FOUND_MAKE"
20161      path="${complete%% *}"
20162      tmp="$complete EOL"
20163      arguments="${tmp#* }"
20164
20165      # Cannot rely on the command "which" here since it doesn't always work.
20166      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20167      if test -z "$is_absolute_path"; then
20168        # Path to executable is not absolute. Find it.
20169        IFS_save="$IFS"
20170        IFS=:
20171        for p in $PATH; do
20172          if test -f "$p/$path" && test -x "$p/$path"; then
20173            new_path="$p/$path"
20174            break
20175          fi
20176        done
20177        IFS="$IFS_save"
20178      else
20179        # This is an absolute path, we can use it without further modifications.
20180        new_path="$path"
20181      fi
20182
20183      if test "x$new_path" = x; then
20184        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20185$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20186        has_space=`$ECHO "$complete" | $GREP " "`
20187        if test "x$has_space" != x; then
20188          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20189$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20190        fi
20191        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20192      fi
20193    fi
20194
20195    # Now join together the path and the arguments once again
20196    if test "x$arguments" != xEOL; then
20197      new_complete="$new_path ${arguments% *}"
20198    else
20199      new_complete="$new_path"
20200    fi
20201
20202    if test "x$complete" != "x$new_complete"; then
20203      FOUND_MAKE="$new_complete"
20204      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20205$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20206    fi
20207  fi
20208
20209        fi
20210      fi
20211    fi
20212  fi
20213
20214        if test "x$FOUND_MAKE" = x; then
20215          for ac_prog in make
20216do
20217  # Extract the first word of "$ac_prog", so it can be a program name with args.
20218set dummy $ac_prog; ac_word=$2
20219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20220$as_echo_n "checking for $ac_word... " >&6; }
20221if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20222  $as_echo_n "(cached) " >&6
20223else
20224  case $CHECK_TOOLSDIR_MAKE in
20225  [\\/]* | ?:[\\/]*)
20226  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20227  ;;
20228  *)
20229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20230for as_dir in $PATH
20231do
20232  IFS=$as_save_IFS
20233  test -z "$as_dir" && as_dir=.
20234    for ac_exec_ext in '' $ac_executable_extensions; do
20235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20236    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20238    break 2
20239  fi
20240done
20241  done
20242IFS=$as_save_IFS
20243
20244  ;;
20245esac
20246fi
20247CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20248if test -n "$CHECK_TOOLSDIR_MAKE"; then
20249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20250$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20251else
20252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20253$as_echo "no" >&6; }
20254fi
20255
20256
20257  test -n "$CHECK_TOOLSDIR_MAKE" && break
20258done
20259
20260
20261  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20262  DESCRIPTION="make in tools-dir"
20263
20264  # On Cygwin, we require a newer version of make than on other platforms
20265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20266    MAKE_VERSION_EXPR="-e 4\."
20267    MAKE_REQUIRED_VERSION="4.0"
20268   else
20269    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20270    MAKE_REQUIRED_VERSION="3.81"
20271  fi
20272
20273  if test "x$MAKE_CANDIDATE" != x; then
20274    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20275$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20276    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20277    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20278    if test "x$IS_GNU_MAKE" = x; then
20279      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20280$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20281    else
20282      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20283      if test "x$IS_MODERN_MAKE" = x; then
20284        { $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
20285$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;}
20286      else
20287        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20288          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20289            MAKE_EXPECTED_ENV='cygwin'
20290          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20291            MAKE_EXPECTED_ENV='msys'
20292          else
20293            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20294          fi
20295          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20296          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20297        else
20298          # Not relevant for non-Windows
20299          IS_MAKE_CORRECT_ENV=true
20300        fi
20301        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20302          { $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
20303$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;}
20304        else
20305          FOUND_MAKE=$MAKE_CANDIDATE
20306
20307  # Only process if variable expands to non-empty
20308
20309  if test "x$FOUND_MAKE" != x; then
20310    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20311
20312  # First separate the path from the arguments. This will split at the first
20313  # space.
20314  complete="$FOUND_MAKE"
20315  path="${complete%% *}"
20316  tmp="$complete EOL"
20317  arguments="${tmp#* }"
20318
20319  # Input might be given as Windows format, start by converting to
20320  # unix format.
20321  new_path=`$CYGPATH -u "$path"`
20322
20323  # Now try to locate executable using which
20324  new_path=`$WHICH "$new_path" 2> /dev/null`
20325  # bat and cmd files are not always considered executable in cygwin causing which
20326  # to not find them
20327  if test "x$new_path" = x \
20328      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20329      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20330    new_path=`$CYGPATH -u "$path"`
20331  fi
20332  if test "x$new_path" = x; then
20333    # Oops. Which didn't find the executable.
20334    # The splitting of arguments from the executable at a space might have been incorrect,
20335    # since paths with space are more likely in Windows. Give it another try with the whole
20336    # argument.
20337    path="$complete"
20338    arguments="EOL"
20339    new_path=`$CYGPATH -u "$path"`
20340    new_path=`$WHICH "$new_path" 2> /dev/null`
20341    # bat and cmd files are not always considered executable in cygwin causing which
20342    # to not find them
20343    if test "x$new_path" = x \
20344        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20345        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20346      new_path=`$CYGPATH -u "$path"`
20347    fi
20348    if test "x$new_path" = x; then
20349      # It's still not found. Now this is an unrecoverable error.
20350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20351$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20352      has_space=`$ECHO "$complete" | $GREP " "`
20353      if test "x$has_space" != x; then
20354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20356      fi
20357      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20358    fi
20359  fi
20360
20361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20364  # "foo.exe" is OK but "foo" is an error.
20365  #
20366  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20367  # It is also a way to make sure we got the proper file name for the real test later on.
20368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20369  if test "x$test_shortpath" = x; then
20370    # Short path failed, file does not exist as specified.
20371    # Try adding .exe or .cmd
20372    if test -f "${new_path}.exe"; then
20373      input_to_shortpath="${new_path}.exe"
20374    elif test -f "${new_path}.cmd"; then
20375      input_to_shortpath="${new_path}.cmd"
20376    else
20377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20378$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20379      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20380$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20381      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20382    fi
20383  else
20384    input_to_shortpath="$new_path"
20385  fi
20386
20387  # Call helper function which possibly converts this using DOS-style short mode.
20388  # If so, the updated path is stored in $new_path.
20389  new_path="$input_to_shortpath"
20390
20391  input_path="$input_to_shortpath"
20392  # Check if we need to convert this using DOS-style short mode. If the path
20393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20394  # take no chances and rewrite it.
20395  # Note: m4 eats our [], so we need to use [ and ] instead.
20396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20397  if test "x$has_forbidden_chars" != x; then
20398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20402      # Going to short mode and back again did indeed matter. Since short mode is
20403      # case insensitive, let's make it lowercase to improve readability.
20404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20405      # Now convert it back to Unix-style (cygpath)
20406      input_path=`$CYGPATH -u "$shortmode_path"`
20407      new_path="$input_path"
20408    fi
20409  fi
20410
20411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20412  if test "x$test_cygdrive_prefix" = x; then
20413    # As a simple fix, exclude /usr/bin since it's not a real path.
20414    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20416      # a path prefixed by /cygdrive for fixpath to work.
20417      new_path="$CYGWIN_ROOT_PATH$input_path"
20418    fi
20419  fi
20420
20421  # remove trailing .exe if any
20422  new_path="${new_path/%.exe/}"
20423
20424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20425
20426  # First separate the path from the arguments. This will split at the first
20427  # space.
20428  complete="$FOUND_MAKE"
20429  path="${complete%% *}"
20430  tmp="$complete EOL"
20431  arguments="${tmp#* }"
20432
20433  # Input might be given as Windows format, start by converting to
20434  # unix format.
20435  new_path="$path"
20436
20437  windows_path="$new_path"
20438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20439    unix_path=`$CYGPATH -u "$windows_path"`
20440    new_path="$unix_path"
20441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20443    new_path="$unix_path"
20444  fi
20445
20446
20447  # Now try to locate executable using which
20448  new_path=`$WHICH "$new_path" 2> /dev/null`
20449
20450  if test "x$new_path" = x; then
20451    # Oops. Which didn't find the executable.
20452    # The splitting of arguments from the executable at a space might have been incorrect,
20453    # since paths with space are more likely in Windows. Give it another try with the whole
20454    # argument.
20455    path="$complete"
20456    arguments="EOL"
20457    new_path="$path"
20458
20459  windows_path="$new_path"
20460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20461    unix_path=`$CYGPATH -u "$windows_path"`
20462    new_path="$unix_path"
20463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20465    new_path="$unix_path"
20466  fi
20467
20468
20469    new_path=`$WHICH "$new_path" 2> /dev/null`
20470    # bat and cmd files are not always considered executable in MSYS causing which
20471    # to not find them
20472    if test "x$new_path" = x \
20473        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20474        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20475      new_path="$path"
20476
20477  windows_path="$new_path"
20478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20479    unix_path=`$CYGPATH -u "$windows_path"`
20480    new_path="$unix_path"
20481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20483    new_path="$unix_path"
20484  fi
20485
20486    fi
20487
20488    if test "x$new_path" = x; then
20489      # It's still not found. Now this is an unrecoverable error.
20490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20491$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20492      has_space=`$ECHO "$complete" | $GREP " "`
20493      if test "x$has_space" != x; then
20494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20496      fi
20497      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20498    fi
20499  fi
20500
20501  # Now new_path has a complete unix path to the binary
20502  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20503    # Keep paths in /bin as-is, but remove trailing .exe if any
20504    new_path="${new_path/%.exe/}"
20505    # Do not save /bin paths to all_fixpath_prefixes!
20506  else
20507    # Not in mixed or Windows style, start by that.
20508    new_path=`cmd //c echo $new_path`
20509
20510  input_path="$new_path"
20511  # Check if we need to convert this using DOS-style short mode. If the path
20512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20513  # take no chances and rewrite it.
20514  # Note: m4 eats our [], so we need to use [ and ] instead.
20515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20516  if test "x$has_forbidden_chars" != x; then
20517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20519  fi
20520
20521    # Output is in $new_path
20522
20523  windows_path="$new_path"
20524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20525    unix_path=`$CYGPATH -u "$windows_path"`
20526    new_path="$unix_path"
20527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20529    new_path="$unix_path"
20530  fi
20531
20532    # remove trailing .exe if any
20533    new_path="${new_path/%.exe/}"
20534
20535    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20536    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20537  fi
20538
20539    else
20540      # We're on a unix platform. Hooray! :)
20541      # First separate the path from the arguments. This will split at the first
20542      # space.
20543      complete="$FOUND_MAKE"
20544      path="${complete%% *}"
20545      tmp="$complete EOL"
20546      arguments="${tmp#* }"
20547
20548      # Cannot rely on the command "which" here since it doesn't always work.
20549      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20550      if test -z "$is_absolute_path"; then
20551        # Path to executable is not absolute. Find it.
20552        IFS_save="$IFS"
20553        IFS=:
20554        for p in $PATH; do
20555          if test -f "$p/$path" && test -x "$p/$path"; then
20556            new_path="$p/$path"
20557            break
20558          fi
20559        done
20560        IFS="$IFS_save"
20561      else
20562        # This is an absolute path, we can use it without further modifications.
20563        new_path="$path"
20564      fi
20565
20566      if test "x$new_path" = x; then
20567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20568$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20569        has_space=`$ECHO "$complete" | $GREP " "`
20570        if test "x$has_space" != x; then
20571          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20572$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20573        fi
20574        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20575      fi
20576    fi
20577
20578    # Now join together the path and the arguments once again
20579    if test "x$arguments" != xEOL; then
20580      new_complete="$new_path ${arguments% *}"
20581    else
20582      new_complete="$new_path"
20583    fi
20584
20585    if test "x$complete" != "x$new_complete"; then
20586      FOUND_MAKE="$new_complete"
20587      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20588$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20589    fi
20590  fi
20591
20592        fi
20593      fi
20594    fi
20595  fi
20596
20597        fi
20598        PATH=$OLD_PATH
20599      fi
20600    fi
20601
20602    if test "x$FOUND_MAKE" = x; then
20603      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
20604    fi
20605
20606    else
20607      # If it succeeded, then it was overridden by the user. We will use it
20608      # for the tool.
20609
20610      # First remove it from the list of overridden variables, so we can test
20611      # for unknown variables in the end.
20612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20613
20614      # Check if we try to supply an empty value
20615      if test "x$MAKE" = x; then
20616        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20617$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20619$as_echo_n "checking for MAKE... " >&6; }
20620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20621$as_echo "disabled" >&6; }
20622      else
20623        # Check if the provided tool contains a complete path.
20624        tool_specified="$MAKE"
20625        tool_basename="${tool_specified##*/}"
20626        if test "x$tool_basename" = "x$tool_specified"; then
20627          # A command without a complete path is provided, search $PATH.
20628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20629$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20630          # Extract the first word of "$tool_basename", so it can be a program name with args.
20631set dummy $tool_basename; ac_word=$2
20632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20633$as_echo_n "checking for $ac_word... " >&6; }
20634if ${ac_cv_path_MAKE+:} false; then :
20635  $as_echo_n "(cached) " >&6
20636else
20637  case $MAKE in
20638  [\\/]* | ?:[\\/]*)
20639  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20640  ;;
20641  *)
20642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20643for as_dir in $PATH
20644do
20645  IFS=$as_save_IFS
20646  test -z "$as_dir" && as_dir=.
20647    for ac_exec_ext in '' $ac_executable_extensions; do
20648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20649    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20651    break 2
20652  fi
20653done
20654  done
20655IFS=$as_save_IFS
20656
20657  ;;
20658esac
20659fi
20660MAKE=$ac_cv_path_MAKE
20661if test -n "$MAKE"; then
20662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20663$as_echo "$MAKE" >&6; }
20664else
20665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20666$as_echo "no" >&6; }
20667fi
20668
20669
20670          if test "x$MAKE" = x; then
20671            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20672          fi
20673        else
20674          # Otherwise we believe it is a complete path. Use it as it is.
20675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20676$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20677          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20678$as_echo_n "checking for MAKE... " >&6; }
20679          if test ! -x "$tool_specified"; then
20680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20681$as_echo "not found" >&6; }
20682            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20683          fi
20684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20685$as_echo "$tool_specified" >&6; }
20686        fi
20687      fi
20688    fi
20689
20690    # If MAKE was set by user, verify the version
20691
20692  MAKE_CANDIDATE=""$MAKE""
20693  DESCRIPTION="user supplied MAKE=$MAKE"
20694
20695  # On Cygwin, we require a newer version of make than on other platforms
20696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20697    MAKE_VERSION_EXPR="-e 4\."
20698    MAKE_REQUIRED_VERSION="4.0"
20699   else
20700    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20701    MAKE_REQUIRED_VERSION="3.81"
20702  fi
20703
20704  if test "x$MAKE_CANDIDATE" != x; then
20705    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20706$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20707    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20708    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20709    if test "x$IS_GNU_MAKE" = x; then
20710      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20711$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20712    else
20713      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20714      if test "x$IS_MODERN_MAKE" = x; then
20715        { $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
20716$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;}
20717      else
20718        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20719          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20720            MAKE_EXPECTED_ENV='cygwin'
20721          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20722            MAKE_EXPECTED_ENV='msys'
20723          else
20724            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20725          fi
20726          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20727          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20728        else
20729          # Not relevant for non-Windows
20730          IS_MAKE_CORRECT_ENV=true
20731        fi
20732        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20733          { $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
20734$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;}
20735        else
20736          FOUND_MAKE=$MAKE_CANDIDATE
20737
20738  # Only process if variable expands to non-empty
20739
20740  if test "x$FOUND_MAKE" != x; then
20741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20742
20743  # First separate the path from the arguments. This will split at the first
20744  # space.
20745  complete="$FOUND_MAKE"
20746  path="${complete%% *}"
20747  tmp="$complete EOL"
20748  arguments="${tmp#* }"
20749
20750  # Input might be given as Windows format, start by converting to
20751  # unix format.
20752  new_path=`$CYGPATH -u "$path"`
20753
20754  # Now try to locate executable using which
20755  new_path=`$WHICH "$new_path" 2> /dev/null`
20756  # bat and cmd files are not always considered executable in cygwin causing which
20757  # to not find them
20758  if test "x$new_path" = x \
20759      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20760      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20761    new_path=`$CYGPATH -u "$path"`
20762  fi
20763  if test "x$new_path" = x; then
20764    # Oops. Which didn't find the executable.
20765    # The splitting of arguments from the executable at a space might have been incorrect,
20766    # since paths with space are more likely in Windows. Give it another try with the whole
20767    # argument.
20768    path="$complete"
20769    arguments="EOL"
20770    new_path=`$CYGPATH -u "$path"`
20771    new_path=`$WHICH "$new_path" 2> /dev/null`
20772    # bat and cmd files are not always considered executable in cygwin causing which
20773    # to not find them
20774    if test "x$new_path" = x \
20775        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20776        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20777      new_path=`$CYGPATH -u "$path"`
20778    fi
20779    if test "x$new_path" = x; then
20780      # It's still not found. Now this is an unrecoverable error.
20781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20782$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20783      has_space=`$ECHO "$complete" | $GREP " "`
20784      if test "x$has_space" != x; then
20785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20787      fi
20788      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20789    fi
20790  fi
20791
20792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20795  # "foo.exe" is OK but "foo" is an error.
20796  #
20797  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20798  # It is also a way to make sure we got the proper file name for the real test later on.
20799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20800  if test "x$test_shortpath" = x; then
20801    # Short path failed, file does not exist as specified.
20802    # Try adding .exe or .cmd
20803    if test -f "${new_path}.exe"; then
20804      input_to_shortpath="${new_path}.exe"
20805    elif test -f "${new_path}.cmd"; then
20806      input_to_shortpath="${new_path}.cmd"
20807    else
20808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20809$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20810      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20811$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20812      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20813    fi
20814  else
20815    input_to_shortpath="$new_path"
20816  fi
20817
20818  # Call helper function which possibly converts this using DOS-style short mode.
20819  # If so, the updated path is stored in $new_path.
20820  new_path="$input_to_shortpath"
20821
20822  input_path="$input_to_shortpath"
20823  # Check if we need to convert this using DOS-style short mode. If the path
20824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20825  # take no chances and rewrite it.
20826  # Note: m4 eats our [], so we need to use [ and ] instead.
20827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20828  if test "x$has_forbidden_chars" != x; then
20829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20833      # Going to short mode and back again did indeed matter. Since short mode is
20834      # case insensitive, let's make it lowercase to improve readability.
20835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20836      # Now convert it back to Unix-style (cygpath)
20837      input_path=`$CYGPATH -u "$shortmode_path"`
20838      new_path="$input_path"
20839    fi
20840  fi
20841
20842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20843  if test "x$test_cygdrive_prefix" = x; then
20844    # As a simple fix, exclude /usr/bin since it's not a real path.
20845    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20847      # a path prefixed by /cygdrive for fixpath to work.
20848      new_path="$CYGWIN_ROOT_PATH$input_path"
20849    fi
20850  fi
20851
20852  # remove trailing .exe if any
20853  new_path="${new_path/%.exe/}"
20854
20855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20856
20857  # First separate the path from the arguments. This will split at the first
20858  # space.
20859  complete="$FOUND_MAKE"
20860  path="${complete%% *}"
20861  tmp="$complete EOL"
20862  arguments="${tmp#* }"
20863
20864  # Input might be given as Windows format, start by converting to
20865  # unix format.
20866  new_path="$path"
20867
20868  windows_path="$new_path"
20869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20870    unix_path=`$CYGPATH -u "$windows_path"`
20871    new_path="$unix_path"
20872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20874    new_path="$unix_path"
20875  fi
20876
20877
20878  # Now try to locate executable using which
20879  new_path=`$WHICH "$new_path" 2> /dev/null`
20880
20881  if test "x$new_path" = x; then
20882    # Oops. Which didn't find the executable.
20883    # The splitting of arguments from the executable at a space might have been incorrect,
20884    # since paths with space are more likely in Windows. Give it another try with the whole
20885    # argument.
20886    path="$complete"
20887    arguments="EOL"
20888    new_path="$path"
20889
20890  windows_path="$new_path"
20891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20892    unix_path=`$CYGPATH -u "$windows_path"`
20893    new_path="$unix_path"
20894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20896    new_path="$unix_path"
20897  fi
20898
20899
20900    new_path=`$WHICH "$new_path" 2> /dev/null`
20901    # bat and cmd files are not always considered executable in MSYS causing which
20902    # to not find them
20903    if test "x$new_path" = x \
20904        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20905        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20906      new_path="$path"
20907
20908  windows_path="$new_path"
20909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20910    unix_path=`$CYGPATH -u "$windows_path"`
20911    new_path="$unix_path"
20912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20914    new_path="$unix_path"
20915  fi
20916
20917    fi
20918
20919    if test "x$new_path" = x; then
20920      # It's still not found. Now this is an unrecoverable error.
20921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20922$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20923      has_space=`$ECHO "$complete" | $GREP " "`
20924      if test "x$has_space" != x; then
20925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20927      fi
20928      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20929    fi
20930  fi
20931
20932  # Now new_path has a complete unix path to the binary
20933  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20934    # Keep paths in /bin as-is, but remove trailing .exe if any
20935    new_path="${new_path/%.exe/}"
20936    # Do not save /bin paths to all_fixpath_prefixes!
20937  else
20938    # Not in mixed or Windows style, start by that.
20939    new_path=`cmd //c echo $new_path`
20940
20941  input_path="$new_path"
20942  # Check if we need to convert this using DOS-style short mode. If the path
20943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20944  # take no chances and rewrite it.
20945  # Note: m4 eats our [], so we need to use [ and ] instead.
20946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20947  if test "x$has_forbidden_chars" != x; then
20948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20950  fi
20951
20952    # Output is in $new_path
20953
20954  windows_path="$new_path"
20955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20956    unix_path=`$CYGPATH -u "$windows_path"`
20957    new_path="$unix_path"
20958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20960    new_path="$unix_path"
20961  fi
20962
20963    # remove trailing .exe if any
20964    new_path="${new_path/%.exe/}"
20965
20966    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20967    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20968  fi
20969
20970    else
20971      # We're on a unix platform. Hooray! :)
20972      # First separate the path from the arguments. This will split at the first
20973      # space.
20974      complete="$FOUND_MAKE"
20975      path="${complete%% *}"
20976      tmp="$complete EOL"
20977      arguments="${tmp#* }"
20978
20979      # Cannot rely on the command "which" here since it doesn't always work.
20980      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20981      if test -z "$is_absolute_path"; then
20982        # Path to executable is not absolute. Find it.
20983        IFS_save="$IFS"
20984        IFS=:
20985        for p in $PATH; do
20986          if test -f "$p/$path" && test -x "$p/$path"; then
20987            new_path="$p/$path"
20988            break
20989          fi
20990        done
20991        IFS="$IFS_save"
20992      else
20993        # This is an absolute path, we can use it without further modifications.
20994        new_path="$path"
20995      fi
20996
20997      if test "x$new_path" = x; then
20998        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20999$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21000        has_space=`$ECHO "$complete" | $GREP " "`
21001        if test "x$has_space" != x; then
21002          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21003$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21004        fi
21005        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21006      fi
21007    fi
21008
21009    # Now join together the path and the arguments once again
21010    if test "x$arguments" != xEOL; then
21011      new_complete="$new_path ${arguments% *}"
21012    else
21013      new_complete="$new_path"
21014    fi
21015
21016    if test "x$complete" != "x$new_complete"; then
21017      FOUND_MAKE="$new_complete"
21018      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21019$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21020    fi
21021  fi
21022
21023        fi
21024      fi
21025    fi
21026  fi
21027
21028    if test "x$FOUND_MAKE" = x; then
21029      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21030    fi
21031
21032  fi
21033
21034
21035  MAKE=$FOUND_MAKE
21036
21037  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21038$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21039
21040
21041  # Check if make supports the output sync option and if so, setup using it.
21042  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21043$as_echo_n "checking if make --output-sync is supported... " >&6; }
21044  if $MAKE --version -O > /dev/null 2>&1; then
21045    OUTPUT_SYNC_SUPPORTED=true
21046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21047$as_echo "yes" >&6; }
21048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21049$as_echo_n "checking for output-sync value... " >&6; }
21050
21051# Check whether --with-output-sync was given.
21052if test "${with_output_sync+set}" = set; then :
21053  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21054fi
21055
21056    if test "x$OUTPUT_SYNC" = "x"; then
21057      OUTPUT_SYNC=none
21058    fi
21059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21060$as_echo "$OUTPUT_SYNC" >&6; }
21061    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21062      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21063    fi
21064  else
21065    OUTPUT_SYNC_SUPPORTED=false
21066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21067$as_echo "no" >&6; }
21068  fi
21069
21070
21071
21072
21073
21074
21075  # Test if find supports -delete
21076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21077$as_echo_n "checking if find supports -delete... " >&6; }
21078  FIND_DELETE="-delete"
21079
21080  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21081
21082  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21083
21084  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21085  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21086    # No, it does not.
21087    $RM $DELETEDIR/TestIfFindSupportsDelete
21088    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21089      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21090      FIND_DELETE="-print | $XARGS $RM"
21091    else
21092      FIND_DELETE="-exec $RM \{\} \+"
21093    fi
21094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21095$as_echo "no" >&6; }
21096  else
21097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21098$as_echo "yes" >&6; }
21099  fi
21100  $RMDIR $DELETEDIR
21101
21102
21103
21104  # Test which kind of tar was found
21105  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21106    TAR_TYPE="gnu"
21107  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21108    TAR_TYPE="bsd"
21109  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21110    TAR_TYPE="solaris"
21111  fi
21112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21113$as_echo_n "checking what type of tar was found... " >&6; }
21114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21115$as_echo "$TAR_TYPE" >&6; }
21116
21117  TAR_CREATE_FILE_PARAM=""
21118
21119  if test "x$TAR_TYPE" = "xgnu"; then
21120    TAR_INCLUDE_PARAM="T"
21121    TAR_SUPPORTS_TRANSFORM="true"
21122    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21123      # When using gnu tar for Solaris targets, need to use compatibility mode
21124      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21125    fi
21126  else
21127    TAR_INCLUDE_PARAM="I"
21128    TAR_SUPPORTS_TRANSFORM="false"
21129  fi
21130
21131
21132
21133
21134
21135
21136  # These tools might not be installed by default,
21137  # need hint on how to install them.
21138
21139
21140
21141  # Publish this variable in the help.
21142
21143
21144  if [ -z "${UNZIP+x}" ]; then
21145    # The variable is not set by user, try to locate tool using the code snippet
21146    for ac_prog in unzip
21147do
21148  # Extract the first word of "$ac_prog", so it can be a program name with args.
21149set dummy $ac_prog; ac_word=$2
21150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21151$as_echo_n "checking for $ac_word... " >&6; }
21152if ${ac_cv_path_UNZIP+:} false; then :
21153  $as_echo_n "(cached) " >&6
21154else
21155  case $UNZIP in
21156  [\\/]* | ?:[\\/]*)
21157  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21158  ;;
21159  *)
21160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21161for as_dir in $PATH
21162do
21163  IFS=$as_save_IFS
21164  test -z "$as_dir" && as_dir=.
21165    for ac_exec_ext in '' $ac_executable_extensions; do
21166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21167    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21169    break 2
21170  fi
21171done
21172  done
21173IFS=$as_save_IFS
21174
21175  ;;
21176esac
21177fi
21178UNZIP=$ac_cv_path_UNZIP
21179if test -n "$UNZIP"; then
21180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21181$as_echo "$UNZIP" >&6; }
21182else
21183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21184$as_echo "no" >&6; }
21185fi
21186
21187
21188  test -n "$UNZIP" && break
21189done
21190
21191  else
21192    # The variable is set, but is it from the command line or the environment?
21193
21194    # Try to remove the string !UNZIP! from our list.
21195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21197      # If it failed, the variable was not from the command line. Ignore it,
21198      # but warn the user (except for BASH, which is always set by the calling BASH).
21199      if test "xUNZIP" != xBASH; then
21200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21201$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21202      fi
21203      # Try to locate tool using the code snippet
21204      for ac_prog in unzip
21205do
21206  # Extract the first word of "$ac_prog", so it can be a program name with args.
21207set dummy $ac_prog; ac_word=$2
21208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21209$as_echo_n "checking for $ac_word... " >&6; }
21210if ${ac_cv_path_UNZIP+:} false; then :
21211  $as_echo_n "(cached) " >&6
21212else
21213  case $UNZIP in
21214  [\\/]* | ?:[\\/]*)
21215  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21216  ;;
21217  *)
21218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21219for as_dir in $PATH
21220do
21221  IFS=$as_save_IFS
21222  test -z "$as_dir" && as_dir=.
21223    for ac_exec_ext in '' $ac_executable_extensions; do
21224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21225    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21227    break 2
21228  fi
21229done
21230  done
21231IFS=$as_save_IFS
21232
21233  ;;
21234esac
21235fi
21236UNZIP=$ac_cv_path_UNZIP
21237if test -n "$UNZIP"; then
21238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21239$as_echo "$UNZIP" >&6; }
21240else
21241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21242$as_echo "no" >&6; }
21243fi
21244
21245
21246  test -n "$UNZIP" && break
21247done
21248
21249    else
21250      # If it succeeded, then it was overridden by the user. We will use it
21251      # for the tool.
21252
21253      # First remove it from the list of overridden variables, so we can test
21254      # for unknown variables in the end.
21255      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21256
21257      # Check if we try to supply an empty value
21258      if test "x$UNZIP" = x; then
21259        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21260$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21262$as_echo_n "checking for UNZIP... " >&6; }
21263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21264$as_echo "disabled" >&6; }
21265      else
21266        # Check if the provided tool contains a complete path.
21267        tool_specified="$UNZIP"
21268        tool_basename="${tool_specified##*/}"
21269        if test "x$tool_basename" = "x$tool_specified"; then
21270          # A command without a complete path is provided, search $PATH.
21271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21272$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21273          # Extract the first word of "$tool_basename", so it can be a program name with args.
21274set dummy $tool_basename; ac_word=$2
21275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21276$as_echo_n "checking for $ac_word... " >&6; }
21277if ${ac_cv_path_UNZIP+:} false; then :
21278  $as_echo_n "(cached) " >&6
21279else
21280  case $UNZIP in
21281  [\\/]* | ?:[\\/]*)
21282  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21283  ;;
21284  *)
21285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21286for as_dir in $PATH
21287do
21288  IFS=$as_save_IFS
21289  test -z "$as_dir" && as_dir=.
21290    for ac_exec_ext in '' $ac_executable_extensions; do
21291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21292    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21294    break 2
21295  fi
21296done
21297  done
21298IFS=$as_save_IFS
21299
21300  ;;
21301esac
21302fi
21303UNZIP=$ac_cv_path_UNZIP
21304if test -n "$UNZIP"; then
21305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21306$as_echo "$UNZIP" >&6; }
21307else
21308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21309$as_echo "no" >&6; }
21310fi
21311
21312
21313          if test "x$UNZIP" = x; then
21314            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21315          fi
21316        else
21317          # Otherwise we believe it is a complete path. Use it as it is.
21318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21319$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21320          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21321$as_echo_n "checking for UNZIP... " >&6; }
21322          if test ! -x "$tool_specified"; then
21323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21324$as_echo "not found" >&6; }
21325            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21326          fi
21327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21328$as_echo "$tool_specified" >&6; }
21329        fi
21330      fi
21331    fi
21332
21333  fi
21334
21335
21336
21337  if test "x$UNZIP" = x; then
21338    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21339  fi
21340
21341
21342  # Since zip uses "ZIP" as a environment variable for passing options, we need
21343  # to name our variable differently, hence ZIPEXE.
21344
21345
21346
21347  # Publish this variable in the help.
21348
21349
21350  if [ -z "${ZIPEXE+x}" ]; then
21351    # The variable is not set by user, try to locate tool using the code snippet
21352    for ac_prog in zip
21353do
21354  # Extract the first word of "$ac_prog", so it can be a program name with args.
21355set dummy $ac_prog; ac_word=$2
21356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21357$as_echo_n "checking for $ac_word... " >&6; }
21358if ${ac_cv_path_ZIPEXE+:} false; then :
21359  $as_echo_n "(cached) " >&6
21360else
21361  case $ZIPEXE in
21362  [\\/]* | ?:[\\/]*)
21363  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21364  ;;
21365  *)
21366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21367for as_dir in $PATH
21368do
21369  IFS=$as_save_IFS
21370  test -z "$as_dir" && as_dir=.
21371    for ac_exec_ext in '' $ac_executable_extensions; do
21372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21373    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21375    break 2
21376  fi
21377done
21378  done
21379IFS=$as_save_IFS
21380
21381  ;;
21382esac
21383fi
21384ZIPEXE=$ac_cv_path_ZIPEXE
21385if test -n "$ZIPEXE"; then
21386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21387$as_echo "$ZIPEXE" >&6; }
21388else
21389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21390$as_echo "no" >&6; }
21391fi
21392
21393
21394  test -n "$ZIPEXE" && break
21395done
21396
21397  else
21398    # The variable is set, but is it from the command line or the environment?
21399
21400    # Try to remove the string !ZIPEXE! from our list.
21401    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21402    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21403      # If it failed, the variable was not from the command line. Ignore it,
21404      # but warn the user (except for BASH, which is always set by the calling BASH).
21405      if test "xZIPEXE" != xBASH; then
21406        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21407$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21408      fi
21409      # Try to locate tool using the code snippet
21410      for ac_prog in zip
21411do
21412  # Extract the first word of "$ac_prog", so it can be a program name with args.
21413set dummy $ac_prog; ac_word=$2
21414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21415$as_echo_n "checking for $ac_word... " >&6; }
21416if ${ac_cv_path_ZIPEXE+:} false; then :
21417  $as_echo_n "(cached) " >&6
21418else
21419  case $ZIPEXE in
21420  [\\/]* | ?:[\\/]*)
21421  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21422  ;;
21423  *)
21424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21425for as_dir in $PATH
21426do
21427  IFS=$as_save_IFS
21428  test -z "$as_dir" && as_dir=.
21429    for ac_exec_ext in '' $ac_executable_extensions; do
21430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21431    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21433    break 2
21434  fi
21435done
21436  done
21437IFS=$as_save_IFS
21438
21439  ;;
21440esac
21441fi
21442ZIPEXE=$ac_cv_path_ZIPEXE
21443if test -n "$ZIPEXE"; then
21444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21445$as_echo "$ZIPEXE" >&6; }
21446else
21447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21448$as_echo "no" >&6; }
21449fi
21450
21451
21452  test -n "$ZIPEXE" && break
21453done
21454
21455    else
21456      # If it succeeded, then it was overridden by the user. We will use it
21457      # for the tool.
21458
21459      # First remove it from the list of overridden variables, so we can test
21460      # for unknown variables in the end.
21461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21462
21463      # Check if we try to supply an empty value
21464      if test "x$ZIPEXE" = x; then
21465        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21466$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21468$as_echo_n "checking for ZIPEXE... " >&6; }
21469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21470$as_echo "disabled" >&6; }
21471      else
21472        # Check if the provided tool contains a complete path.
21473        tool_specified="$ZIPEXE"
21474        tool_basename="${tool_specified##*/}"
21475        if test "x$tool_basename" = "x$tool_specified"; then
21476          # A command without a complete path is provided, search $PATH.
21477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21478$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21479          # Extract the first word of "$tool_basename", so it can be a program name with args.
21480set dummy $tool_basename; ac_word=$2
21481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21482$as_echo_n "checking for $ac_word... " >&6; }
21483if ${ac_cv_path_ZIPEXE+:} false; then :
21484  $as_echo_n "(cached) " >&6
21485else
21486  case $ZIPEXE in
21487  [\\/]* | ?:[\\/]*)
21488  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21489  ;;
21490  *)
21491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21492for as_dir in $PATH
21493do
21494  IFS=$as_save_IFS
21495  test -z "$as_dir" && as_dir=.
21496    for ac_exec_ext in '' $ac_executable_extensions; do
21497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21498    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21500    break 2
21501  fi
21502done
21503  done
21504IFS=$as_save_IFS
21505
21506  ;;
21507esac
21508fi
21509ZIPEXE=$ac_cv_path_ZIPEXE
21510if test -n "$ZIPEXE"; then
21511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21512$as_echo "$ZIPEXE" >&6; }
21513else
21514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21515$as_echo "no" >&6; }
21516fi
21517
21518
21519          if test "x$ZIPEXE" = x; then
21520            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21521          fi
21522        else
21523          # Otherwise we believe it is a complete path. Use it as it is.
21524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21525$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21526          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21527$as_echo_n "checking for ZIPEXE... " >&6; }
21528          if test ! -x "$tool_specified"; then
21529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21530$as_echo "not found" >&6; }
21531            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21532          fi
21533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21534$as_echo "$tool_specified" >&6; }
21535        fi
21536      fi
21537    fi
21538
21539  fi
21540
21541
21542
21543  if test "x$ZIPEXE" = x; then
21544    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21545  fi
21546
21547
21548
21549  # Non-required basic tools
21550
21551
21552
21553  # Publish this variable in the help.
21554
21555
21556  if [ -z "${LDD+x}" ]; then
21557    # The variable is not set by user, try to locate tool using the code snippet
21558    for ac_prog in ldd
21559do
21560  # Extract the first word of "$ac_prog", so it can be a program name with args.
21561set dummy $ac_prog; ac_word=$2
21562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21563$as_echo_n "checking for $ac_word... " >&6; }
21564if ${ac_cv_path_LDD+:} false; then :
21565  $as_echo_n "(cached) " >&6
21566else
21567  case $LDD in
21568  [\\/]* | ?:[\\/]*)
21569  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21570  ;;
21571  *)
21572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21573for as_dir in $PATH
21574do
21575  IFS=$as_save_IFS
21576  test -z "$as_dir" && as_dir=.
21577    for ac_exec_ext in '' $ac_executable_extensions; do
21578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21579    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21581    break 2
21582  fi
21583done
21584  done
21585IFS=$as_save_IFS
21586
21587  ;;
21588esac
21589fi
21590LDD=$ac_cv_path_LDD
21591if test -n "$LDD"; then
21592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21593$as_echo "$LDD" >&6; }
21594else
21595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21596$as_echo "no" >&6; }
21597fi
21598
21599
21600  test -n "$LDD" && break
21601done
21602
21603  else
21604    # The variable is set, but is it from the command line or the environment?
21605
21606    # Try to remove the string !LDD! from our list.
21607    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21608    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21609      # If it failed, the variable was not from the command line. Ignore it,
21610      # but warn the user (except for BASH, which is always set by the calling BASH).
21611      if test "xLDD" != xBASH; then
21612        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21613$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21614      fi
21615      # Try to locate tool using the code snippet
21616      for ac_prog in ldd
21617do
21618  # Extract the first word of "$ac_prog", so it can be a program name with args.
21619set dummy $ac_prog; ac_word=$2
21620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21621$as_echo_n "checking for $ac_word... " >&6; }
21622if ${ac_cv_path_LDD+:} false; then :
21623  $as_echo_n "(cached) " >&6
21624else
21625  case $LDD in
21626  [\\/]* | ?:[\\/]*)
21627  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21628  ;;
21629  *)
21630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21631for as_dir in $PATH
21632do
21633  IFS=$as_save_IFS
21634  test -z "$as_dir" && as_dir=.
21635    for ac_exec_ext in '' $ac_executable_extensions; do
21636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21637    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21639    break 2
21640  fi
21641done
21642  done
21643IFS=$as_save_IFS
21644
21645  ;;
21646esac
21647fi
21648LDD=$ac_cv_path_LDD
21649if test -n "$LDD"; then
21650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21651$as_echo "$LDD" >&6; }
21652else
21653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21654$as_echo "no" >&6; }
21655fi
21656
21657
21658  test -n "$LDD" && break
21659done
21660
21661    else
21662      # If it succeeded, then it was overridden by the user. We will use it
21663      # for the tool.
21664
21665      # First remove it from the list of overridden variables, so we can test
21666      # for unknown variables in the end.
21667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21668
21669      # Check if we try to supply an empty value
21670      if test "x$LDD" = x; then
21671        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21672$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21674$as_echo_n "checking for LDD... " >&6; }
21675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21676$as_echo "disabled" >&6; }
21677      else
21678        # Check if the provided tool contains a complete path.
21679        tool_specified="$LDD"
21680        tool_basename="${tool_specified##*/}"
21681        if test "x$tool_basename" = "x$tool_specified"; then
21682          # A command without a complete path is provided, search $PATH.
21683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21684$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21685          # Extract the first word of "$tool_basename", so it can be a program name with args.
21686set dummy $tool_basename; ac_word=$2
21687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21688$as_echo_n "checking for $ac_word... " >&6; }
21689if ${ac_cv_path_LDD+:} false; then :
21690  $as_echo_n "(cached) " >&6
21691else
21692  case $LDD in
21693  [\\/]* | ?:[\\/]*)
21694  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21695  ;;
21696  *)
21697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21698for as_dir in $PATH
21699do
21700  IFS=$as_save_IFS
21701  test -z "$as_dir" && as_dir=.
21702    for ac_exec_ext in '' $ac_executable_extensions; do
21703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21704    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21706    break 2
21707  fi
21708done
21709  done
21710IFS=$as_save_IFS
21711
21712  ;;
21713esac
21714fi
21715LDD=$ac_cv_path_LDD
21716if test -n "$LDD"; then
21717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21718$as_echo "$LDD" >&6; }
21719else
21720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21721$as_echo "no" >&6; }
21722fi
21723
21724
21725          if test "x$LDD" = x; then
21726            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21727          fi
21728        else
21729          # Otherwise we believe it is a complete path. Use it as it is.
21730          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21731$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21732          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21733$as_echo_n "checking for LDD... " >&6; }
21734          if test ! -x "$tool_specified"; then
21735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21736$as_echo "not found" >&6; }
21737            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21738          fi
21739          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21740$as_echo "$tool_specified" >&6; }
21741        fi
21742      fi
21743    fi
21744
21745  fi
21746
21747
21748  if test "x$LDD" = "x"; then
21749    # List shared lib dependencies is used for
21750    # debug output and checking for forbidden dependencies.
21751    # We can build without it.
21752    LDD="true"
21753  fi
21754
21755
21756  # Publish this variable in the help.
21757
21758
21759  if [ -z "${OTOOL+x}" ]; then
21760    # The variable is not set by user, try to locate tool using the code snippet
21761    for ac_prog in otool
21762do
21763  # Extract the first word of "$ac_prog", so it can be a program name with args.
21764set dummy $ac_prog; ac_word=$2
21765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21766$as_echo_n "checking for $ac_word... " >&6; }
21767if ${ac_cv_path_OTOOL+:} false; then :
21768  $as_echo_n "(cached) " >&6
21769else
21770  case $OTOOL in
21771  [\\/]* | ?:[\\/]*)
21772  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21773  ;;
21774  *)
21775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21776for as_dir in $PATH
21777do
21778  IFS=$as_save_IFS
21779  test -z "$as_dir" && as_dir=.
21780    for ac_exec_ext in '' $ac_executable_extensions; do
21781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21782    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21784    break 2
21785  fi
21786done
21787  done
21788IFS=$as_save_IFS
21789
21790  ;;
21791esac
21792fi
21793OTOOL=$ac_cv_path_OTOOL
21794if test -n "$OTOOL"; then
21795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21796$as_echo "$OTOOL" >&6; }
21797else
21798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21799$as_echo "no" >&6; }
21800fi
21801
21802
21803  test -n "$OTOOL" && break
21804done
21805
21806  else
21807    # The variable is set, but is it from the command line or the environment?
21808
21809    # Try to remove the string !OTOOL! from our list.
21810    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21811    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21812      # If it failed, the variable was not from the command line. Ignore it,
21813      # but warn the user (except for BASH, which is always set by the calling BASH).
21814      if test "xOTOOL" != xBASH; then
21815        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21816$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21817      fi
21818      # Try to locate tool using the code snippet
21819      for ac_prog in otool
21820do
21821  # Extract the first word of "$ac_prog", so it can be a program name with args.
21822set dummy $ac_prog; ac_word=$2
21823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21824$as_echo_n "checking for $ac_word... " >&6; }
21825if ${ac_cv_path_OTOOL+:} false; then :
21826  $as_echo_n "(cached) " >&6
21827else
21828  case $OTOOL in
21829  [\\/]* | ?:[\\/]*)
21830  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21831  ;;
21832  *)
21833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21834for as_dir in $PATH
21835do
21836  IFS=$as_save_IFS
21837  test -z "$as_dir" && as_dir=.
21838    for ac_exec_ext in '' $ac_executable_extensions; do
21839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21840    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21842    break 2
21843  fi
21844done
21845  done
21846IFS=$as_save_IFS
21847
21848  ;;
21849esac
21850fi
21851OTOOL=$ac_cv_path_OTOOL
21852if test -n "$OTOOL"; then
21853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21854$as_echo "$OTOOL" >&6; }
21855else
21856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21857$as_echo "no" >&6; }
21858fi
21859
21860
21861  test -n "$OTOOL" && break
21862done
21863
21864    else
21865      # If it succeeded, then it was overridden by the user. We will use it
21866      # for the tool.
21867
21868      # First remove it from the list of overridden variables, so we can test
21869      # for unknown variables in the end.
21870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21871
21872      # Check if we try to supply an empty value
21873      if test "x$OTOOL" = x; then
21874        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21875$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21877$as_echo_n "checking for OTOOL... " >&6; }
21878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21879$as_echo "disabled" >&6; }
21880      else
21881        # Check if the provided tool contains a complete path.
21882        tool_specified="$OTOOL"
21883        tool_basename="${tool_specified##*/}"
21884        if test "x$tool_basename" = "x$tool_specified"; then
21885          # A command without a complete path is provided, search $PATH.
21886          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21887$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21888          # Extract the first word of "$tool_basename", so it can be a program name with args.
21889set dummy $tool_basename; ac_word=$2
21890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21891$as_echo_n "checking for $ac_word... " >&6; }
21892if ${ac_cv_path_OTOOL+:} false; then :
21893  $as_echo_n "(cached) " >&6
21894else
21895  case $OTOOL in
21896  [\\/]* | ?:[\\/]*)
21897  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21898  ;;
21899  *)
21900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21901for as_dir in $PATH
21902do
21903  IFS=$as_save_IFS
21904  test -z "$as_dir" && as_dir=.
21905    for ac_exec_ext in '' $ac_executable_extensions; do
21906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21907    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21909    break 2
21910  fi
21911done
21912  done
21913IFS=$as_save_IFS
21914
21915  ;;
21916esac
21917fi
21918OTOOL=$ac_cv_path_OTOOL
21919if test -n "$OTOOL"; then
21920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21921$as_echo "$OTOOL" >&6; }
21922else
21923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21924$as_echo "no" >&6; }
21925fi
21926
21927
21928          if test "x$OTOOL" = x; then
21929            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21930          fi
21931        else
21932          # Otherwise we believe it is a complete path. Use it as it is.
21933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21934$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21935          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21936$as_echo_n "checking for OTOOL... " >&6; }
21937          if test ! -x "$tool_specified"; then
21938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21939$as_echo "not found" >&6; }
21940            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21941          fi
21942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21943$as_echo "$tool_specified" >&6; }
21944        fi
21945      fi
21946    fi
21947
21948  fi
21949
21950
21951  if test "x$OTOOL" = "x"; then
21952    OTOOL="true"
21953  fi
21954
21955
21956  # Publish this variable in the help.
21957
21958
21959  if [ -z "${READELF+x}" ]; then
21960    # The variable is not set by user, try to locate tool using the code snippet
21961    for ac_prog in greadelf readelf
21962do
21963  # Extract the first word of "$ac_prog", so it can be a program name with args.
21964set dummy $ac_prog; ac_word=$2
21965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21966$as_echo_n "checking for $ac_word... " >&6; }
21967if ${ac_cv_path_READELF+:} false; then :
21968  $as_echo_n "(cached) " >&6
21969else
21970  case $READELF in
21971  [\\/]* | ?:[\\/]*)
21972  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21973  ;;
21974  *)
21975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21976for as_dir in $PATH
21977do
21978  IFS=$as_save_IFS
21979  test -z "$as_dir" && as_dir=.
21980    for ac_exec_ext in '' $ac_executable_extensions; do
21981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21982    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21984    break 2
21985  fi
21986done
21987  done
21988IFS=$as_save_IFS
21989
21990  ;;
21991esac
21992fi
21993READELF=$ac_cv_path_READELF
21994if test -n "$READELF"; then
21995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21996$as_echo "$READELF" >&6; }
21997else
21998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21999$as_echo "no" >&6; }
22000fi
22001
22002
22003  test -n "$READELF" && break
22004done
22005
22006  else
22007    # The variable is set, but is it from the command line or the environment?
22008
22009    # Try to remove the string !READELF! from our list.
22010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22012      # If it failed, the variable was not from the command line. Ignore it,
22013      # but warn the user (except for BASH, which is always set by the calling BASH).
22014      if test "xREADELF" != xBASH; then
22015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22016$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22017      fi
22018      # Try to locate tool using the code snippet
22019      for ac_prog in greadelf readelf
22020do
22021  # Extract the first word of "$ac_prog", so it can be a program name with args.
22022set dummy $ac_prog; ac_word=$2
22023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22024$as_echo_n "checking for $ac_word... " >&6; }
22025if ${ac_cv_path_READELF+:} false; then :
22026  $as_echo_n "(cached) " >&6
22027else
22028  case $READELF in
22029  [\\/]* | ?:[\\/]*)
22030  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22031  ;;
22032  *)
22033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22034for as_dir in $PATH
22035do
22036  IFS=$as_save_IFS
22037  test -z "$as_dir" && as_dir=.
22038    for ac_exec_ext in '' $ac_executable_extensions; do
22039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22040    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22042    break 2
22043  fi
22044done
22045  done
22046IFS=$as_save_IFS
22047
22048  ;;
22049esac
22050fi
22051READELF=$ac_cv_path_READELF
22052if test -n "$READELF"; then
22053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22054$as_echo "$READELF" >&6; }
22055else
22056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22057$as_echo "no" >&6; }
22058fi
22059
22060
22061  test -n "$READELF" && break
22062done
22063
22064    else
22065      # If it succeeded, then it was overridden by the user. We will use it
22066      # for the tool.
22067
22068      # First remove it from the list of overridden variables, so we can test
22069      # for unknown variables in the end.
22070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22071
22072      # Check if we try to supply an empty value
22073      if test "x$READELF" = x; then
22074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22075$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22077$as_echo_n "checking for READELF... " >&6; }
22078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22079$as_echo "disabled" >&6; }
22080      else
22081        # Check if the provided tool contains a complete path.
22082        tool_specified="$READELF"
22083        tool_basename="${tool_specified##*/}"
22084        if test "x$tool_basename" = "x$tool_specified"; then
22085          # A command without a complete path is provided, search $PATH.
22086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22087$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22088          # Extract the first word of "$tool_basename", so it can be a program name with args.
22089set dummy $tool_basename; ac_word=$2
22090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22091$as_echo_n "checking for $ac_word... " >&6; }
22092if ${ac_cv_path_READELF+:} false; then :
22093  $as_echo_n "(cached) " >&6
22094else
22095  case $READELF in
22096  [\\/]* | ?:[\\/]*)
22097  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22098  ;;
22099  *)
22100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22101for as_dir in $PATH
22102do
22103  IFS=$as_save_IFS
22104  test -z "$as_dir" && as_dir=.
22105    for ac_exec_ext in '' $ac_executable_extensions; do
22106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22107    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22109    break 2
22110  fi
22111done
22112  done
22113IFS=$as_save_IFS
22114
22115  ;;
22116esac
22117fi
22118READELF=$ac_cv_path_READELF
22119if test -n "$READELF"; then
22120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22121$as_echo "$READELF" >&6; }
22122else
22123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22124$as_echo "no" >&6; }
22125fi
22126
22127
22128          if test "x$READELF" = x; then
22129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22130          fi
22131        else
22132          # Otherwise we believe it is a complete path. Use it as it is.
22133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22134$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22136$as_echo_n "checking for READELF... " >&6; }
22137          if test ! -x "$tool_specified"; then
22138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22139$as_echo "not found" >&6; }
22140            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22141          fi
22142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22143$as_echo "$tool_specified" >&6; }
22144        fi
22145      fi
22146    fi
22147
22148  fi
22149
22150
22151
22152
22153  # Publish this variable in the help.
22154
22155
22156  if [ -z "${HG+x}" ]; then
22157    # The variable is not set by user, try to locate tool using the code snippet
22158    for ac_prog in hg
22159do
22160  # Extract the first word of "$ac_prog", so it can be a program name with args.
22161set dummy $ac_prog; ac_word=$2
22162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22163$as_echo_n "checking for $ac_word... " >&6; }
22164if ${ac_cv_path_HG+:} false; then :
22165  $as_echo_n "(cached) " >&6
22166else
22167  case $HG in
22168  [\\/]* | ?:[\\/]*)
22169  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22170  ;;
22171  *)
22172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22173for as_dir in $PATH
22174do
22175  IFS=$as_save_IFS
22176  test -z "$as_dir" && as_dir=.
22177    for ac_exec_ext in '' $ac_executable_extensions; do
22178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22179    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22181    break 2
22182  fi
22183done
22184  done
22185IFS=$as_save_IFS
22186
22187  ;;
22188esac
22189fi
22190HG=$ac_cv_path_HG
22191if test -n "$HG"; then
22192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22193$as_echo "$HG" >&6; }
22194else
22195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22196$as_echo "no" >&6; }
22197fi
22198
22199
22200  test -n "$HG" && break
22201done
22202
22203  else
22204    # The variable is set, but is it from the command line or the environment?
22205
22206    # Try to remove the string !HG! from our list.
22207    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22208    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22209      # If it failed, the variable was not from the command line. Ignore it,
22210      # but warn the user (except for BASH, which is always set by the calling BASH).
22211      if test "xHG" != xBASH; then
22212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22213$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22214      fi
22215      # Try to locate tool using the code snippet
22216      for ac_prog in hg
22217do
22218  # Extract the first word of "$ac_prog", so it can be a program name with args.
22219set dummy $ac_prog; ac_word=$2
22220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22221$as_echo_n "checking for $ac_word... " >&6; }
22222if ${ac_cv_path_HG+:} false; then :
22223  $as_echo_n "(cached) " >&6
22224else
22225  case $HG in
22226  [\\/]* | ?:[\\/]*)
22227  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22228  ;;
22229  *)
22230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22231for as_dir in $PATH
22232do
22233  IFS=$as_save_IFS
22234  test -z "$as_dir" && as_dir=.
22235    for ac_exec_ext in '' $ac_executable_extensions; do
22236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22237    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22239    break 2
22240  fi
22241done
22242  done
22243IFS=$as_save_IFS
22244
22245  ;;
22246esac
22247fi
22248HG=$ac_cv_path_HG
22249if test -n "$HG"; then
22250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22251$as_echo "$HG" >&6; }
22252else
22253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22254$as_echo "no" >&6; }
22255fi
22256
22257
22258  test -n "$HG" && break
22259done
22260
22261    else
22262      # If it succeeded, then it was overridden by the user. We will use it
22263      # for the tool.
22264
22265      # First remove it from the list of overridden variables, so we can test
22266      # for unknown variables in the end.
22267      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22268
22269      # Check if we try to supply an empty value
22270      if test "x$HG" = x; then
22271        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22272$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22273        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22274$as_echo_n "checking for HG... " >&6; }
22275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22276$as_echo "disabled" >&6; }
22277      else
22278        # Check if the provided tool contains a complete path.
22279        tool_specified="$HG"
22280        tool_basename="${tool_specified##*/}"
22281        if test "x$tool_basename" = "x$tool_specified"; then
22282          # A command without a complete path is provided, search $PATH.
22283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22284$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22285          # Extract the first word of "$tool_basename", so it can be a program name with args.
22286set dummy $tool_basename; ac_word=$2
22287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22288$as_echo_n "checking for $ac_word... " >&6; }
22289if ${ac_cv_path_HG+:} false; then :
22290  $as_echo_n "(cached) " >&6
22291else
22292  case $HG in
22293  [\\/]* | ?:[\\/]*)
22294  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22295  ;;
22296  *)
22297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22298for as_dir in $PATH
22299do
22300  IFS=$as_save_IFS
22301  test -z "$as_dir" && as_dir=.
22302    for ac_exec_ext in '' $ac_executable_extensions; do
22303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22304    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22306    break 2
22307  fi
22308done
22309  done
22310IFS=$as_save_IFS
22311
22312  ;;
22313esac
22314fi
22315HG=$ac_cv_path_HG
22316if test -n "$HG"; then
22317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22318$as_echo "$HG" >&6; }
22319else
22320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22321$as_echo "no" >&6; }
22322fi
22323
22324
22325          if test "x$HG" = x; then
22326            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22327          fi
22328        else
22329          # Otherwise we believe it is a complete path. Use it as it is.
22330          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22331$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22332          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22333$as_echo_n "checking for HG... " >&6; }
22334          if test ! -x "$tool_specified"; then
22335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22336$as_echo "not found" >&6; }
22337            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22338          fi
22339          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22340$as_echo "$tool_specified" >&6; }
22341        fi
22342      fi
22343    fi
22344
22345  fi
22346
22347
22348
22349
22350  # Publish this variable in the help.
22351
22352
22353  if [ -z "${STAT+x}" ]; then
22354    # The variable is not set by user, try to locate tool using the code snippet
22355    for ac_prog in stat
22356do
22357  # Extract the first word of "$ac_prog", so it can be a program name with args.
22358set dummy $ac_prog; ac_word=$2
22359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22360$as_echo_n "checking for $ac_word... " >&6; }
22361if ${ac_cv_path_STAT+:} false; then :
22362  $as_echo_n "(cached) " >&6
22363else
22364  case $STAT in
22365  [\\/]* | ?:[\\/]*)
22366  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22367  ;;
22368  *)
22369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22370for as_dir in $PATH
22371do
22372  IFS=$as_save_IFS
22373  test -z "$as_dir" && as_dir=.
22374    for ac_exec_ext in '' $ac_executable_extensions; do
22375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22376    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22378    break 2
22379  fi
22380done
22381  done
22382IFS=$as_save_IFS
22383
22384  ;;
22385esac
22386fi
22387STAT=$ac_cv_path_STAT
22388if test -n "$STAT"; then
22389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22390$as_echo "$STAT" >&6; }
22391else
22392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22393$as_echo "no" >&6; }
22394fi
22395
22396
22397  test -n "$STAT" && break
22398done
22399
22400  else
22401    # The variable is set, but is it from the command line or the environment?
22402
22403    # Try to remove the string !STAT! from our list.
22404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22406      # If it failed, the variable was not from the command line. Ignore it,
22407      # but warn the user (except for BASH, which is always set by the calling BASH).
22408      if test "xSTAT" != xBASH; then
22409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22410$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22411      fi
22412      # Try to locate tool using the code snippet
22413      for ac_prog in stat
22414do
22415  # Extract the first word of "$ac_prog", so it can be a program name with args.
22416set dummy $ac_prog; ac_word=$2
22417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22418$as_echo_n "checking for $ac_word... " >&6; }
22419if ${ac_cv_path_STAT+:} false; then :
22420  $as_echo_n "(cached) " >&6
22421else
22422  case $STAT in
22423  [\\/]* | ?:[\\/]*)
22424  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22425  ;;
22426  *)
22427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22428for as_dir in $PATH
22429do
22430  IFS=$as_save_IFS
22431  test -z "$as_dir" && as_dir=.
22432    for ac_exec_ext in '' $ac_executable_extensions; do
22433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22434    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22436    break 2
22437  fi
22438done
22439  done
22440IFS=$as_save_IFS
22441
22442  ;;
22443esac
22444fi
22445STAT=$ac_cv_path_STAT
22446if test -n "$STAT"; then
22447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22448$as_echo "$STAT" >&6; }
22449else
22450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22451$as_echo "no" >&6; }
22452fi
22453
22454
22455  test -n "$STAT" && break
22456done
22457
22458    else
22459      # If it succeeded, then it was overridden by the user. We will use it
22460      # for the tool.
22461
22462      # First remove it from the list of overridden variables, so we can test
22463      # for unknown variables in the end.
22464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22465
22466      # Check if we try to supply an empty value
22467      if test "x$STAT" = x; then
22468        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22469$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22471$as_echo_n "checking for STAT... " >&6; }
22472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22473$as_echo "disabled" >&6; }
22474      else
22475        # Check if the provided tool contains a complete path.
22476        tool_specified="$STAT"
22477        tool_basename="${tool_specified##*/}"
22478        if test "x$tool_basename" = "x$tool_specified"; then
22479          # A command without a complete path is provided, search $PATH.
22480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22481$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22482          # Extract the first word of "$tool_basename", so it can be a program name with args.
22483set dummy $tool_basename; ac_word=$2
22484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22485$as_echo_n "checking for $ac_word... " >&6; }
22486if ${ac_cv_path_STAT+:} false; then :
22487  $as_echo_n "(cached) " >&6
22488else
22489  case $STAT in
22490  [\\/]* | ?:[\\/]*)
22491  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22492  ;;
22493  *)
22494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22495for as_dir in $PATH
22496do
22497  IFS=$as_save_IFS
22498  test -z "$as_dir" && as_dir=.
22499    for ac_exec_ext in '' $ac_executable_extensions; do
22500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22501    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22503    break 2
22504  fi
22505done
22506  done
22507IFS=$as_save_IFS
22508
22509  ;;
22510esac
22511fi
22512STAT=$ac_cv_path_STAT
22513if test -n "$STAT"; then
22514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22515$as_echo "$STAT" >&6; }
22516else
22517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22518$as_echo "no" >&6; }
22519fi
22520
22521
22522          if test "x$STAT" = x; then
22523            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22524          fi
22525        else
22526          # Otherwise we believe it is a complete path. Use it as it is.
22527          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22528$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22529          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22530$as_echo_n "checking for STAT... " >&6; }
22531          if test ! -x "$tool_specified"; then
22532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22533$as_echo "not found" >&6; }
22534            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22535          fi
22536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22537$as_echo "$tool_specified" >&6; }
22538        fi
22539      fi
22540    fi
22541
22542  fi
22543
22544
22545
22546
22547  # Publish this variable in the help.
22548
22549
22550  if [ -z "${TIME+x}" ]; then
22551    # The variable is not set by user, try to locate tool using the code snippet
22552    for ac_prog in time
22553do
22554  # Extract the first word of "$ac_prog", so it can be a program name with args.
22555set dummy $ac_prog; ac_word=$2
22556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22557$as_echo_n "checking for $ac_word... " >&6; }
22558if ${ac_cv_path_TIME+:} false; then :
22559  $as_echo_n "(cached) " >&6
22560else
22561  case $TIME in
22562  [\\/]* | ?:[\\/]*)
22563  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22564  ;;
22565  *)
22566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22567for as_dir in $PATH
22568do
22569  IFS=$as_save_IFS
22570  test -z "$as_dir" && as_dir=.
22571    for ac_exec_ext in '' $ac_executable_extensions; do
22572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22573    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22575    break 2
22576  fi
22577done
22578  done
22579IFS=$as_save_IFS
22580
22581  ;;
22582esac
22583fi
22584TIME=$ac_cv_path_TIME
22585if test -n "$TIME"; then
22586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22587$as_echo "$TIME" >&6; }
22588else
22589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22590$as_echo "no" >&6; }
22591fi
22592
22593
22594  test -n "$TIME" && break
22595done
22596
22597  else
22598    # The variable is set, but is it from the command line or the environment?
22599
22600    # Try to remove the string !TIME! from our list.
22601    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22602    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22603      # If it failed, the variable was not from the command line. Ignore it,
22604      # but warn the user (except for BASH, which is always set by the calling BASH).
22605      if test "xTIME" != xBASH; then
22606        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22607$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22608      fi
22609      # Try to locate tool using the code snippet
22610      for ac_prog in time
22611do
22612  # Extract the first word of "$ac_prog", so it can be a program name with args.
22613set dummy $ac_prog; ac_word=$2
22614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22615$as_echo_n "checking for $ac_word... " >&6; }
22616if ${ac_cv_path_TIME+:} false; then :
22617  $as_echo_n "(cached) " >&6
22618else
22619  case $TIME in
22620  [\\/]* | ?:[\\/]*)
22621  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22622  ;;
22623  *)
22624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22625for as_dir in $PATH
22626do
22627  IFS=$as_save_IFS
22628  test -z "$as_dir" && as_dir=.
22629    for ac_exec_ext in '' $ac_executable_extensions; do
22630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22631    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22633    break 2
22634  fi
22635done
22636  done
22637IFS=$as_save_IFS
22638
22639  ;;
22640esac
22641fi
22642TIME=$ac_cv_path_TIME
22643if test -n "$TIME"; then
22644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22645$as_echo "$TIME" >&6; }
22646else
22647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22648$as_echo "no" >&6; }
22649fi
22650
22651
22652  test -n "$TIME" && break
22653done
22654
22655    else
22656      # If it succeeded, then it was overridden by the user. We will use it
22657      # for the tool.
22658
22659      # First remove it from the list of overridden variables, so we can test
22660      # for unknown variables in the end.
22661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22662
22663      # Check if we try to supply an empty value
22664      if test "x$TIME" = x; then
22665        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22666$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22667        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22668$as_echo_n "checking for TIME... " >&6; }
22669        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22670$as_echo "disabled" >&6; }
22671      else
22672        # Check if the provided tool contains a complete path.
22673        tool_specified="$TIME"
22674        tool_basename="${tool_specified##*/}"
22675        if test "x$tool_basename" = "x$tool_specified"; then
22676          # A command without a complete path is provided, search $PATH.
22677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22678$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22679          # Extract the first word of "$tool_basename", so it can be a program name with args.
22680set dummy $tool_basename; ac_word=$2
22681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22682$as_echo_n "checking for $ac_word... " >&6; }
22683if ${ac_cv_path_TIME+:} false; then :
22684  $as_echo_n "(cached) " >&6
22685else
22686  case $TIME in
22687  [\\/]* | ?:[\\/]*)
22688  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22689  ;;
22690  *)
22691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22692for as_dir in $PATH
22693do
22694  IFS=$as_save_IFS
22695  test -z "$as_dir" && as_dir=.
22696    for ac_exec_ext in '' $ac_executable_extensions; do
22697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22698    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22700    break 2
22701  fi
22702done
22703  done
22704IFS=$as_save_IFS
22705
22706  ;;
22707esac
22708fi
22709TIME=$ac_cv_path_TIME
22710if test -n "$TIME"; then
22711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22712$as_echo "$TIME" >&6; }
22713else
22714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22715$as_echo "no" >&6; }
22716fi
22717
22718
22719          if test "x$TIME" = x; then
22720            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22721          fi
22722        else
22723          # Otherwise we believe it is a complete path. Use it as it is.
22724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22725$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22726          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22727$as_echo_n "checking for TIME... " >&6; }
22728          if test ! -x "$tool_specified"; then
22729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22730$as_echo "not found" >&6; }
22731            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22732          fi
22733          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22734$as_echo "$tool_specified" >&6; }
22735        fi
22736      fi
22737    fi
22738
22739  fi
22740
22741
22742  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22743  # be in the user path.
22744
22745
22746  # Publish this variable in the help.
22747
22748
22749  if [ -z "${DTRACE+x}" ]; then
22750    # The variable is not set by user, try to locate tool using the code snippet
22751    for ac_prog in dtrace
22752do
22753  # Extract the first word of "$ac_prog", so it can be a program name with args.
22754set dummy $ac_prog; ac_word=$2
22755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22756$as_echo_n "checking for $ac_word... " >&6; }
22757if ${ac_cv_path_DTRACE+:} false; then :
22758  $as_echo_n "(cached) " >&6
22759else
22760  case $DTRACE in
22761  [\\/]* | ?:[\\/]*)
22762  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22763  ;;
22764  *)
22765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22766as_dummy="$PATH:/usr/sbin"
22767for as_dir in $as_dummy
22768do
22769  IFS=$as_save_IFS
22770  test -z "$as_dir" && as_dir=.
22771    for ac_exec_ext in '' $ac_executable_extensions; do
22772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22773    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22775    break 2
22776  fi
22777done
22778  done
22779IFS=$as_save_IFS
22780
22781  ;;
22782esac
22783fi
22784DTRACE=$ac_cv_path_DTRACE
22785if test -n "$DTRACE"; then
22786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22787$as_echo "$DTRACE" >&6; }
22788else
22789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22790$as_echo "no" >&6; }
22791fi
22792
22793
22794  test -n "$DTRACE" && break
22795done
22796
22797  else
22798    # The variable is set, but is it from the command line or the environment?
22799
22800    # Try to remove the string !DTRACE! from our list.
22801    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22802    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22803      # If it failed, the variable was not from the command line. Ignore it,
22804      # but warn the user (except for BASH, which is always set by the calling BASH).
22805      if test "xDTRACE" != xBASH; then
22806        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22807$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22808      fi
22809      # Try to locate tool using the code snippet
22810      for ac_prog in dtrace
22811do
22812  # Extract the first word of "$ac_prog", so it can be a program name with args.
22813set dummy $ac_prog; ac_word=$2
22814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22815$as_echo_n "checking for $ac_word... " >&6; }
22816if ${ac_cv_path_DTRACE+:} false; then :
22817  $as_echo_n "(cached) " >&6
22818else
22819  case $DTRACE in
22820  [\\/]* | ?:[\\/]*)
22821  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22822  ;;
22823  *)
22824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22825as_dummy="$PATH:/usr/sbin"
22826for as_dir in $as_dummy
22827do
22828  IFS=$as_save_IFS
22829  test -z "$as_dir" && as_dir=.
22830    for ac_exec_ext in '' $ac_executable_extensions; do
22831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22832    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22834    break 2
22835  fi
22836done
22837  done
22838IFS=$as_save_IFS
22839
22840  ;;
22841esac
22842fi
22843DTRACE=$ac_cv_path_DTRACE
22844if test -n "$DTRACE"; then
22845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22846$as_echo "$DTRACE" >&6; }
22847else
22848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22849$as_echo "no" >&6; }
22850fi
22851
22852
22853  test -n "$DTRACE" && break
22854done
22855
22856    else
22857      # If it succeeded, then it was overridden by the user. We will use it
22858      # for the tool.
22859
22860      # First remove it from the list of overridden variables, so we can test
22861      # for unknown variables in the end.
22862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22863
22864      # Check if we try to supply an empty value
22865      if test "x$DTRACE" = x; then
22866        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22867$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22868        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22869$as_echo_n "checking for DTRACE... " >&6; }
22870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22871$as_echo "disabled" >&6; }
22872      else
22873        # Check if the provided tool contains a complete path.
22874        tool_specified="$DTRACE"
22875        tool_basename="${tool_specified##*/}"
22876        if test "x$tool_basename" = "x$tool_specified"; then
22877          # A command without a complete path is provided, search $PATH.
22878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22879$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22880          # Extract the first word of "$tool_basename", so it can be a program name with args.
22881set dummy $tool_basename; ac_word=$2
22882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22883$as_echo_n "checking for $ac_word... " >&6; }
22884if ${ac_cv_path_DTRACE+:} false; then :
22885  $as_echo_n "(cached) " >&6
22886else
22887  case $DTRACE in
22888  [\\/]* | ?:[\\/]*)
22889  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22890  ;;
22891  *)
22892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22893for as_dir in $PATH
22894do
22895  IFS=$as_save_IFS
22896  test -z "$as_dir" && as_dir=.
22897    for ac_exec_ext in '' $ac_executable_extensions; do
22898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22899    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22901    break 2
22902  fi
22903done
22904  done
22905IFS=$as_save_IFS
22906
22907  ;;
22908esac
22909fi
22910DTRACE=$ac_cv_path_DTRACE
22911if test -n "$DTRACE"; then
22912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22913$as_echo "$DTRACE" >&6; }
22914else
22915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22916$as_echo "no" >&6; }
22917fi
22918
22919
22920          if test "x$DTRACE" = x; then
22921            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22922          fi
22923        else
22924          # Otherwise we believe it is a complete path. Use it as it is.
22925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22926$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22927          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22928$as_echo_n "checking for DTRACE... " >&6; }
22929          if test ! -x "$tool_specified"; then
22930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22931$as_echo "not found" >&6; }
22932            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22933          fi
22934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22935$as_echo "$tool_specified" >&6; }
22936        fi
22937      fi
22938    fi
22939
22940  fi
22941
22942
22943
22944
22945  # Publish this variable in the help.
22946
22947
22948  if [ -z "${PATCH+x}" ]; then
22949    # The variable is not set by user, try to locate tool using the code snippet
22950    for ac_prog in gpatch patch
22951do
22952  # Extract the first word of "$ac_prog", so it can be a program name with args.
22953set dummy $ac_prog; ac_word=$2
22954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22955$as_echo_n "checking for $ac_word... " >&6; }
22956if ${ac_cv_path_PATCH+:} false; then :
22957  $as_echo_n "(cached) " >&6
22958else
22959  case $PATCH in
22960  [\\/]* | ?:[\\/]*)
22961  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22962  ;;
22963  *)
22964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22965for as_dir in $PATH
22966do
22967  IFS=$as_save_IFS
22968  test -z "$as_dir" && as_dir=.
22969    for ac_exec_ext in '' $ac_executable_extensions; do
22970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22971    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22973    break 2
22974  fi
22975done
22976  done
22977IFS=$as_save_IFS
22978
22979  ;;
22980esac
22981fi
22982PATCH=$ac_cv_path_PATCH
22983if test -n "$PATCH"; then
22984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22985$as_echo "$PATCH" >&6; }
22986else
22987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22988$as_echo "no" >&6; }
22989fi
22990
22991
22992  test -n "$PATCH" && break
22993done
22994
22995  else
22996    # The variable is set, but is it from the command line or the environment?
22997
22998    # Try to remove the string !PATCH! from our list.
22999    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23000    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23001      # If it failed, the variable was not from the command line. Ignore it,
23002      # but warn the user (except for BASH, which is always set by the calling BASH).
23003      if test "xPATCH" != xBASH; then
23004        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23005$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23006      fi
23007      # Try to locate tool using the code snippet
23008      for ac_prog in gpatch patch
23009do
23010  # Extract the first word of "$ac_prog", so it can be a program name with args.
23011set dummy $ac_prog; ac_word=$2
23012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23013$as_echo_n "checking for $ac_word... " >&6; }
23014if ${ac_cv_path_PATCH+:} false; then :
23015  $as_echo_n "(cached) " >&6
23016else
23017  case $PATCH in
23018  [\\/]* | ?:[\\/]*)
23019  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23020  ;;
23021  *)
23022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23023for as_dir in $PATH
23024do
23025  IFS=$as_save_IFS
23026  test -z "$as_dir" && as_dir=.
23027    for ac_exec_ext in '' $ac_executable_extensions; do
23028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23029    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23031    break 2
23032  fi
23033done
23034  done
23035IFS=$as_save_IFS
23036
23037  ;;
23038esac
23039fi
23040PATCH=$ac_cv_path_PATCH
23041if test -n "$PATCH"; then
23042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23043$as_echo "$PATCH" >&6; }
23044else
23045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23046$as_echo "no" >&6; }
23047fi
23048
23049
23050  test -n "$PATCH" && break
23051done
23052
23053    else
23054      # If it succeeded, then it was overridden by the user. We will use it
23055      # for the tool.
23056
23057      # First remove it from the list of overridden variables, so we can test
23058      # for unknown variables in the end.
23059      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23060
23061      # Check if we try to supply an empty value
23062      if test "x$PATCH" = x; then
23063        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23064$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23065        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23066$as_echo_n "checking for PATCH... " >&6; }
23067        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23068$as_echo "disabled" >&6; }
23069      else
23070        # Check if the provided tool contains a complete path.
23071        tool_specified="$PATCH"
23072        tool_basename="${tool_specified##*/}"
23073        if test "x$tool_basename" = "x$tool_specified"; then
23074          # A command without a complete path is provided, search $PATH.
23075          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23076$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23077          # Extract the first word of "$tool_basename", so it can be a program name with args.
23078set dummy $tool_basename; ac_word=$2
23079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23080$as_echo_n "checking for $ac_word... " >&6; }
23081if ${ac_cv_path_PATCH+:} false; then :
23082  $as_echo_n "(cached) " >&6
23083else
23084  case $PATCH in
23085  [\\/]* | ?:[\\/]*)
23086  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23087  ;;
23088  *)
23089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23090for as_dir in $PATH
23091do
23092  IFS=$as_save_IFS
23093  test -z "$as_dir" && as_dir=.
23094    for ac_exec_ext in '' $ac_executable_extensions; do
23095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23096    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23098    break 2
23099  fi
23100done
23101  done
23102IFS=$as_save_IFS
23103
23104  ;;
23105esac
23106fi
23107PATCH=$ac_cv_path_PATCH
23108if test -n "$PATCH"; then
23109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23110$as_echo "$PATCH" >&6; }
23111else
23112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23113$as_echo "no" >&6; }
23114fi
23115
23116
23117          if test "x$PATCH" = x; then
23118            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23119          fi
23120        else
23121          # Otherwise we believe it is a complete path. Use it as it is.
23122          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23123$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23124          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23125$as_echo_n "checking for PATCH... " >&6; }
23126          if test ! -x "$tool_specified"; then
23127            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23128$as_echo "not found" >&6; }
23129            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23130          fi
23131          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23132$as_echo "$tool_specified" >&6; }
23133        fi
23134      fi
23135    fi
23136
23137  fi
23138
23139
23140  # Check if it's GNU time
23141  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23142  if test "x$IS_GNU_TIME" != x; then
23143    IS_GNU_TIME=yes
23144  else
23145    IS_GNU_TIME=no
23146  fi
23147
23148
23149  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23150
23151
23152
23153  # Publish this variable in the help.
23154
23155
23156  if [ -z "${DSYMUTIL+x}" ]; then
23157    # The variable is not set by user, try to locate tool using the code snippet
23158    for ac_prog in dsymutil
23159do
23160  # Extract the first word of "$ac_prog", so it can be a program name with args.
23161set dummy $ac_prog; ac_word=$2
23162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23163$as_echo_n "checking for $ac_word... " >&6; }
23164if ${ac_cv_path_DSYMUTIL+:} false; then :
23165  $as_echo_n "(cached) " >&6
23166else
23167  case $DSYMUTIL in
23168  [\\/]* | ?:[\\/]*)
23169  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23170  ;;
23171  *)
23172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23173for as_dir in $PATH
23174do
23175  IFS=$as_save_IFS
23176  test -z "$as_dir" && as_dir=.
23177    for ac_exec_ext in '' $ac_executable_extensions; do
23178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23179    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23181    break 2
23182  fi
23183done
23184  done
23185IFS=$as_save_IFS
23186
23187  ;;
23188esac
23189fi
23190DSYMUTIL=$ac_cv_path_DSYMUTIL
23191if test -n "$DSYMUTIL"; then
23192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23193$as_echo "$DSYMUTIL" >&6; }
23194else
23195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23196$as_echo "no" >&6; }
23197fi
23198
23199
23200  test -n "$DSYMUTIL" && break
23201done
23202
23203  else
23204    # The variable is set, but is it from the command line or the environment?
23205
23206    # Try to remove the string !DSYMUTIL! from our list.
23207    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23208    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23209      # If it failed, the variable was not from the command line. Ignore it,
23210      # but warn the user (except for BASH, which is always set by the calling BASH).
23211      if test "xDSYMUTIL" != xBASH; then
23212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23213$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23214      fi
23215      # Try to locate tool using the code snippet
23216      for ac_prog in dsymutil
23217do
23218  # Extract the first word of "$ac_prog", so it can be a program name with args.
23219set dummy $ac_prog; ac_word=$2
23220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23221$as_echo_n "checking for $ac_word... " >&6; }
23222if ${ac_cv_path_DSYMUTIL+:} false; then :
23223  $as_echo_n "(cached) " >&6
23224else
23225  case $DSYMUTIL in
23226  [\\/]* | ?:[\\/]*)
23227  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23228  ;;
23229  *)
23230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23231for as_dir in $PATH
23232do
23233  IFS=$as_save_IFS
23234  test -z "$as_dir" && as_dir=.
23235    for ac_exec_ext in '' $ac_executable_extensions; do
23236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23237    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23239    break 2
23240  fi
23241done
23242  done
23243IFS=$as_save_IFS
23244
23245  ;;
23246esac
23247fi
23248DSYMUTIL=$ac_cv_path_DSYMUTIL
23249if test -n "$DSYMUTIL"; then
23250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23251$as_echo "$DSYMUTIL" >&6; }
23252else
23253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23254$as_echo "no" >&6; }
23255fi
23256
23257
23258  test -n "$DSYMUTIL" && break
23259done
23260
23261    else
23262      # If it succeeded, then it was overridden by the user. We will use it
23263      # for the tool.
23264
23265      # First remove it from the list of overridden variables, so we can test
23266      # for unknown variables in the end.
23267      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23268
23269      # Check if we try to supply an empty value
23270      if test "x$DSYMUTIL" = x; then
23271        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23272$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23273        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23274$as_echo_n "checking for DSYMUTIL... " >&6; }
23275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23276$as_echo "disabled" >&6; }
23277      else
23278        # Check if the provided tool contains a complete path.
23279        tool_specified="$DSYMUTIL"
23280        tool_basename="${tool_specified##*/}"
23281        if test "x$tool_basename" = "x$tool_specified"; then
23282          # A command without a complete path is provided, search $PATH.
23283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23284$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23285          # Extract the first word of "$tool_basename", so it can be a program name with args.
23286set dummy $tool_basename; ac_word=$2
23287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23288$as_echo_n "checking for $ac_word... " >&6; }
23289if ${ac_cv_path_DSYMUTIL+:} false; then :
23290  $as_echo_n "(cached) " >&6
23291else
23292  case $DSYMUTIL in
23293  [\\/]* | ?:[\\/]*)
23294  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23295  ;;
23296  *)
23297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23298for as_dir in $PATH
23299do
23300  IFS=$as_save_IFS
23301  test -z "$as_dir" && as_dir=.
23302    for ac_exec_ext in '' $ac_executable_extensions; do
23303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23304    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23306    break 2
23307  fi
23308done
23309  done
23310IFS=$as_save_IFS
23311
23312  ;;
23313esac
23314fi
23315DSYMUTIL=$ac_cv_path_DSYMUTIL
23316if test -n "$DSYMUTIL"; then
23317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23318$as_echo "$DSYMUTIL" >&6; }
23319else
23320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23321$as_echo "no" >&6; }
23322fi
23323
23324
23325          if test "x$DSYMUTIL" = x; then
23326            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23327          fi
23328        else
23329          # Otherwise we believe it is a complete path. Use it as it is.
23330          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23331$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23332          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23333$as_echo_n "checking for DSYMUTIL... " >&6; }
23334          if test ! -x "$tool_specified"; then
23335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23336$as_echo "not found" >&6; }
23337            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23338          fi
23339          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23340$as_echo "$tool_specified" >&6; }
23341        fi
23342      fi
23343    fi
23344
23345  fi
23346
23347
23348
23349  if test "x$DSYMUTIL" = x; then
23350    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23351  fi
23352
23353
23354
23355
23356
23357  # Publish this variable in the help.
23358
23359
23360  if [ -z "${XATTR+x}" ]; then
23361    # The variable is not set by user, try to locate tool using the code snippet
23362    for ac_prog in xattr
23363do
23364  # Extract the first word of "$ac_prog", so it can be a program name with args.
23365set dummy $ac_prog; ac_word=$2
23366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23367$as_echo_n "checking for $ac_word... " >&6; }
23368if ${ac_cv_path_XATTR+:} false; then :
23369  $as_echo_n "(cached) " >&6
23370else
23371  case $XATTR in
23372  [\\/]* | ?:[\\/]*)
23373  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23374  ;;
23375  *)
23376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23377for as_dir in $PATH
23378do
23379  IFS=$as_save_IFS
23380  test -z "$as_dir" && as_dir=.
23381    for ac_exec_ext in '' $ac_executable_extensions; do
23382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23383    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23385    break 2
23386  fi
23387done
23388  done
23389IFS=$as_save_IFS
23390
23391  ;;
23392esac
23393fi
23394XATTR=$ac_cv_path_XATTR
23395if test -n "$XATTR"; then
23396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23397$as_echo "$XATTR" >&6; }
23398else
23399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23400$as_echo "no" >&6; }
23401fi
23402
23403
23404  test -n "$XATTR" && break
23405done
23406
23407  else
23408    # The variable is set, but is it from the command line or the environment?
23409
23410    # Try to remove the string !XATTR! from our list.
23411    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23412    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23413      # If it failed, the variable was not from the command line. Ignore it,
23414      # but warn the user (except for BASH, which is always set by the calling BASH).
23415      if test "xXATTR" != xBASH; then
23416        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23417$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23418      fi
23419      # Try to locate tool using the code snippet
23420      for ac_prog in xattr
23421do
23422  # Extract the first word of "$ac_prog", so it can be a program name with args.
23423set dummy $ac_prog; ac_word=$2
23424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23425$as_echo_n "checking for $ac_word... " >&6; }
23426if ${ac_cv_path_XATTR+:} false; then :
23427  $as_echo_n "(cached) " >&6
23428else
23429  case $XATTR in
23430  [\\/]* | ?:[\\/]*)
23431  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23432  ;;
23433  *)
23434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23435for as_dir in $PATH
23436do
23437  IFS=$as_save_IFS
23438  test -z "$as_dir" && as_dir=.
23439    for ac_exec_ext in '' $ac_executable_extensions; do
23440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23441    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23443    break 2
23444  fi
23445done
23446  done
23447IFS=$as_save_IFS
23448
23449  ;;
23450esac
23451fi
23452XATTR=$ac_cv_path_XATTR
23453if test -n "$XATTR"; then
23454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23455$as_echo "$XATTR" >&6; }
23456else
23457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23458$as_echo "no" >&6; }
23459fi
23460
23461
23462  test -n "$XATTR" && break
23463done
23464
23465    else
23466      # If it succeeded, then it was overridden by the user. We will use it
23467      # for the tool.
23468
23469      # First remove it from the list of overridden variables, so we can test
23470      # for unknown variables in the end.
23471      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23472
23473      # Check if we try to supply an empty value
23474      if test "x$XATTR" = x; then
23475        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23476$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23478$as_echo_n "checking for XATTR... " >&6; }
23479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23480$as_echo "disabled" >&6; }
23481      else
23482        # Check if the provided tool contains a complete path.
23483        tool_specified="$XATTR"
23484        tool_basename="${tool_specified##*/}"
23485        if test "x$tool_basename" = "x$tool_specified"; then
23486          # A command without a complete path is provided, search $PATH.
23487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23488$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23489          # Extract the first word of "$tool_basename", so it can be a program name with args.
23490set dummy $tool_basename; ac_word=$2
23491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23492$as_echo_n "checking for $ac_word... " >&6; }
23493if ${ac_cv_path_XATTR+:} false; then :
23494  $as_echo_n "(cached) " >&6
23495else
23496  case $XATTR in
23497  [\\/]* | ?:[\\/]*)
23498  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23499  ;;
23500  *)
23501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23502for as_dir in $PATH
23503do
23504  IFS=$as_save_IFS
23505  test -z "$as_dir" && as_dir=.
23506    for ac_exec_ext in '' $ac_executable_extensions; do
23507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23508    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23510    break 2
23511  fi
23512done
23513  done
23514IFS=$as_save_IFS
23515
23516  ;;
23517esac
23518fi
23519XATTR=$ac_cv_path_XATTR
23520if test -n "$XATTR"; then
23521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23522$as_echo "$XATTR" >&6; }
23523else
23524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23525$as_echo "no" >&6; }
23526fi
23527
23528
23529          if test "x$XATTR" = x; then
23530            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23531          fi
23532        else
23533          # Otherwise we believe it is a complete path. Use it as it is.
23534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23535$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23536          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23537$as_echo_n "checking for XATTR... " >&6; }
23538          if test ! -x "$tool_specified"; then
23539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23540$as_echo "not found" >&6; }
23541            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23542          fi
23543          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23544$as_echo "$tool_specified" >&6; }
23545        fi
23546      fi
23547    fi
23548
23549  fi
23550
23551
23552
23553  if test "x$XATTR" = x; then
23554    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23555  fi
23556
23557
23558
23559
23560  # Publish this variable in the help.
23561
23562
23563  if [ -z "${CODESIGN+x}" ]; then
23564    # The variable is not set by user, try to locate tool using the code snippet
23565    for ac_prog in codesign
23566do
23567  # Extract the first word of "$ac_prog", so it can be a program name with args.
23568set dummy $ac_prog; ac_word=$2
23569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23570$as_echo_n "checking for $ac_word... " >&6; }
23571if ${ac_cv_path_CODESIGN+:} false; then :
23572  $as_echo_n "(cached) " >&6
23573else
23574  case $CODESIGN in
23575  [\\/]* | ?:[\\/]*)
23576  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23577  ;;
23578  *)
23579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23580for as_dir in $PATH
23581do
23582  IFS=$as_save_IFS
23583  test -z "$as_dir" && as_dir=.
23584    for ac_exec_ext in '' $ac_executable_extensions; do
23585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23586    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23588    break 2
23589  fi
23590done
23591  done
23592IFS=$as_save_IFS
23593
23594  ;;
23595esac
23596fi
23597CODESIGN=$ac_cv_path_CODESIGN
23598if test -n "$CODESIGN"; then
23599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23600$as_echo "$CODESIGN" >&6; }
23601else
23602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23603$as_echo "no" >&6; }
23604fi
23605
23606
23607  test -n "$CODESIGN" && break
23608done
23609
23610  else
23611    # The variable is set, but is it from the command line or the environment?
23612
23613    # Try to remove the string !CODESIGN! from our list.
23614    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23615    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23616      # If it failed, the variable was not from the command line. Ignore it,
23617      # but warn the user (except for BASH, which is always set by the calling BASH).
23618      if test "xCODESIGN" != xBASH; then
23619        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23620$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23621      fi
23622      # Try to locate tool using the code snippet
23623      for ac_prog in codesign
23624do
23625  # Extract the first word of "$ac_prog", so it can be a program name with args.
23626set dummy $ac_prog; ac_word=$2
23627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23628$as_echo_n "checking for $ac_word... " >&6; }
23629if ${ac_cv_path_CODESIGN+:} false; then :
23630  $as_echo_n "(cached) " >&6
23631else
23632  case $CODESIGN in
23633  [\\/]* | ?:[\\/]*)
23634  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23635  ;;
23636  *)
23637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23638for as_dir in $PATH
23639do
23640  IFS=$as_save_IFS
23641  test -z "$as_dir" && as_dir=.
23642    for ac_exec_ext in '' $ac_executable_extensions; do
23643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23644    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23646    break 2
23647  fi
23648done
23649  done
23650IFS=$as_save_IFS
23651
23652  ;;
23653esac
23654fi
23655CODESIGN=$ac_cv_path_CODESIGN
23656if test -n "$CODESIGN"; then
23657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23658$as_echo "$CODESIGN" >&6; }
23659else
23660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23661$as_echo "no" >&6; }
23662fi
23663
23664
23665  test -n "$CODESIGN" && break
23666done
23667
23668    else
23669      # If it succeeded, then it was overridden by the user. We will use it
23670      # for the tool.
23671
23672      # First remove it from the list of overridden variables, so we can test
23673      # for unknown variables in the end.
23674      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23675
23676      # Check if we try to supply an empty value
23677      if test "x$CODESIGN" = x; then
23678        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23679$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23680        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23681$as_echo_n "checking for CODESIGN... " >&6; }
23682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23683$as_echo "disabled" >&6; }
23684      else
23685        # Check if the provided tool contains a complete path.
23686        tool_specified="$CODESIGN"
23687        tool_basename="${tool_specified##*/}"
23688        if test "x$tool_basename" = "x$tool_specified"; then
23689          # A command without a complete path is provided, search $PATH.
23690          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23691$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23692          # Extract the first word of "$tool_basename", so it can be a program name with args.
23693set dummy $tool_basename; ac_word=$2
23694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23695$as_echo_n "checking for $ac_word... " >&6; }
23696if ${ac_cv_path_CODESIGN+:} false; then :
23697  $as_echo_n "(cached) " >&6
23698else
23699  case $CODESIGN in
23700  [\\/]* | ?:[\\/]*)
23701  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23702  ;;
23703  *)
23704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23705for as_dir in $PATH
23706do
23707  IFS=$as_save_IFS
23708  test -z "$as_dir" && as_dir=.
23709    for ac_exec_ext in '' $ac_executable_extensions; do
23710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23711    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23713    break 2
23714  fi
23715done
23716  done
23717IFS=$as_save_IFS
23718
23719  ;;
23720esac
23721fi
23722CODESIGN=$ac_cv_path_CODESIGN
23723if test -n "$CODESIGN"; then
23724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23725$as_echo "$CODESIGN" >&6; }
23726else
23727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23728$as_echo "no" >&6; }
23729fi
23730
23731
23732          if test "x$CODESIGN" = x; then
23733            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23734          fi
23735        else
23736          # Otherwise we believe it is a complete path. Use it as it is.
23737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23738$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23739          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23740$as_echo_n "checking for CODESIGN... " >&6; }
23741          if test ! -x "$tool_specified"; then
23742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23743$as_echo "not found" >&6; }
23744            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23745          fi
23746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23747$as_echo "$tool_specified" >&6; }
23748        fi
23749      fi
23750    fi
23751
23752  fi
23753
23754
23755    if test "x$CODESIGN" != "x"; then
23756      # Verify that the openjdk_codesign certificate is present
23757      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23758$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23759      $RM codesign-testfile
23760      $TOUCH codesign-testfile
23761      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23762      $RM codesign-testfile
23763      if test "x$CODESIGN" = x; then
23764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23765$as_echo "no" >&6; }
23766      else
23767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23768$as_echo "yes" >&6; }
23769      fi
23770    fi
23771
23772
23773
23774  # Publish this variable in the help.
23775
23776
23777  if [ -z "${SETFILE+x}" ]; then
23778    # The variable is not set by user, try to locate tool using the code snippet
23779    for ac_prog in SetFile
23780do
23781  # Extract the first word of "$ac_prog", so it can be a program name with args.
23782set dummy $ac_prog; ac_word=$2
23783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23784$as_echo_n "checking for $ac_word... " >&6; }
23785if ${ac_cv_path_SETFILE+:} false; then :
23786  $as_echo_n "(cached) " >&6
23787else
23788  case $SETFILE in
23789  [\\/]* | ?:[\\/]*)
23790  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23791  ;;
23792  *)
23793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23794for as_dir in $PATH
23795do
23796  IFS=$as_save_IFS
23797  test -z "$as_dir" && as_dir=.
23798    for ac_exec_ext in '' $ac_executable_extensions; do
23799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23800    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23802    break 2
23803  fi
23804done
23805  done
23806IFS=$as_save_IFS
23807
23808  ;;
23809esac
23810fi
23811SETFILE=$ac_cv_path_SETFILE
23812if test -n "$SETFILE"; then
23813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23814$as_echo "$SETFILE" >&6; }
23815else
23816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23817$as_echo "no" >&6; }
23818fi
23819
23820
23821  test -n "$SETFILE" && break
23822done
23823
23824  else
23825    # The variable is set, but is it from the command line or the environment?
23826
23827    # Try to remove the string !SETFILE! from our list.
23828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23830      # If it failed, the variable was not from the command line. Ignore it,
23831      # but warn the user (except for BASH, which is always set by the calling BASH).
23832      if test "xSETFILE" != xBASH; then
23833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23834$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23835      fi
23836      # Try to locate tool using the code snippet
23837      for ac_prog in SetFile
23838do
23839  # Extract the first word of "$ac_prog", so it can be a program name with args.
23840set dummy $ac_prog; ac_word=$2
23841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23842$as_echo_n "checking for $ac_word... " >&6; }
23843if ${ac_cv_path_SETFILE+:} false; then :
23844  $as_echo_n "(cached) " >&6
23845else
23846  case $SETFILE in
23847  [\\/]* | ?:[\\/]*)
23848  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23849  ;;
23850  *)
23851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23852for as_dir in $PATH
23853do
23854  IFS=$as_save_IFS
23855  test -z "$as_dir" && as_dir=.
23856    for ac_exec_ext in '' $ac_executable_extensions; do
23857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23858    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23860    break 2
23861  fi
23862done
23863  done
23864IFS=$as_save_IFS
23865
23866  ;;
23867esac
23868fi
23869SETFILE=$ac_cv_path_SETFILE
23870if test -n "$SETFILE"; then
23871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23872$as_echo "$SETFILE" >&6; }
23873else
23874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23875$as_echo "no" >&6; }
23876fi
23877
23878
23879  test -n "$SETFILE" && break
23880done
23881
23882    else
23883      # If it succeeded, then it was overridden by the user. We will use it
23884      # for the tool.
23885
23886      # First remove it from the list of overridden variables, so we can test
23887      # for unknown variables in the end.
23888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23889
23890      # Check if we try to supply an empty value
23891      if test "x$SETFILE" = x; then
23892        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23893$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23895$as_echo_n "checking for SETFILE... " >&6; }
23896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23897$as_echo "disabled" >&6; }
23898      else
23899        # Check if the provided tool contains a complete path.
23900        tool_specified="$SETFILE"
23901        tool_basename="${tool_specified##*/}"
23902        if test "x$tool_basename" = "x$tool_specified"; then
23903          # A command without a complete path is provided, search $PATH.
23904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23905$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23906          # Extract the first word of "$tool_basename", so it can be a program name with args.
23907set dummy $tool_basename; ac_word=$2
23908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23909$as_echo_n "checking for $ac_word... " >&6; }
23910if ${ac_cv_path_SETFILE+:} false; then :
23911  $as_echo_n "(cached) " >&6
23912else
23913  case $SETFILE in
23914  [\\/]* | ?:[\\/]*)
23915  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23916  ;;
23917  *)
23918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23919for as_dir in $PATH
23920do
23921  IFS=$as_save_IFS
23922  test -z "$as_dir" && as_dir=.
23923    for ac_exec_ext in '' $ac_executable_extensions; do
23924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23925    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23927    break 2
23928  fi
23929done
23930  done
23931IFS=$as_save_IFS
23932
23933  ;;
23934esac
23935fi
23936SETFILE=$ac_cv_path_SETFILE
23937if test -n "$SETFILE"; then
23938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23939$as_echo "$SETFILE" >&6; }
23940else
23941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23942$as_echo "no" >&6; }
23943fi
23944
23945
23946          if test "x$SETFILE" = x; then
23947            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23948          fi
23949        else
23950          # Otherwise we believe it is a complete path. Use it as it is.
23951          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23952$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23953          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23954$as_echo_n "checking for SETFILE... " >&6; }
23955          if test ! -x "$tool_specified"; then
23956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23957$as_echo "not found" >&6; }
23958            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23959          fi
23960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23961$as_echo "$tool_specified" >&6; }
23962        fi
23963      fi
23964    fi
23965
23966  fi
23967
23968
23969
23970  if test "x$SETFILE" = x; then
23971    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23972  fi
23973
23974
23975  fi
23976
23977
23978  # Test if bash supports pipefail.
23979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23980$as_echo_n "checking if bash supports pipefail... " >&6; }
23981  if ${BASH} -c 'set -o pipefail'; then
23982    BASH_ARGS="$BASH_ARGS -o pipefail"
23983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23984$as_echo "yes" >&6; }
23985  else
23986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23987$as_echo "no" >&6; }
23988  fi
23989
23990  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23991$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23992  if ${BASH} -e -c 'true'; then
23993    BASH_ARGS="$BASH_ARGS -e"
23994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23995$as_echo "yes" >&6; }
23996  else
23997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23998$as_echo "no" >&6; }
23999  fi
24000
24001
24002
24003
24004# Check if pkg-config is available.
24005
24006
24007if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24008	if test -n "$ac_tool_prefix"; then
24009  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24010set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24012$as_echo_n "checking for $ac_word... " >&6; }
24013if ${ac_cv_path_PKG_CONFIG+:} false; then :
24014  $as_echo_n "(cached) " >&6
24015else
24016  case $PKG_CONFIG in
24017  [\\/]* | ?:[\\/]*)
24018  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24019  ;;
24020  *)
24021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24022for as_dir in $PATH
24023do
24024  IFS=$as_save_IFS
24025  test -z "$as_dir" && as_dir=.
24026    for ac_exec_ext in '' $ac_executable_extensions; do
24027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24028    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24030    break 2
24031  fi
24032done
24033  done
24034IFS=$as_save_IFS
24035
24036  ;;
24037esac
24038fi
24039PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24040if test -n "$PKG_CONFIG"; then
24041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24042$as_echo "$PKG_CONFIG" >&6; }
24043else
24044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24045$as_echo "no" >&6; }
24046fi
24047
24048
24049fi
24050if test -z "$ac_cv_path_PKG_CONFIG"; then
24051  ac_pt_PKG_CONFIG=$PKG_CONFIG
24052  # Extract the first word of "pkg-config", so it can be a program name with args.
24053set dummy pkg-config; ac_word=$2
24054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24055$as_echo_n "checking for $ac_word... " >&6; }
24056if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24057  $as_echo_n "(cached) " >&6
24058else
24059  case $ac_pt_PKG_CONFIG in
24060  [\\/]* | ?:[\\/]*)
24061  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24062  ;;
24063  *)
24064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24065for as_dir in $PATH
24066do
24067  IFS=$as_save_IFS
24068  test -z "$as_dir" && as_dir=.
24069    for ac_exec_ext in '' $ac_executable_extensions; do
24070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24071    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24073    break 2
24074  fi
24075done
24076  done
24077IFS=$as_save_IFS
24078
24079  ;;
24080esac
24081fi
24082ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24083if test -n "$ac_pt_PKG_CONFIG"; then
24084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24085$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24086else
24087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24088$as_echo "no" >&6; }
24089fi
24090
24091  if test "x$ac_pt_PKG_CONFIG" = x; then
24092    PKG_CONFIG=""
24093  else
24094    case $cross_compiling:$ac_tool_warned in
24095yes:)
24096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24098ac_tool_warned=yes ;;
24099esac
24100    PKG_CONFIG=$ac_pt_PKG_CONFIG
24101  fi
24102else
24103  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24104fi
24105
24106fi
24107if test -n "$PKG_CONFIG"; then
24108	_pkg_min_version=0.9.0
24109	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24110$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24111	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24112		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24113$as_echo "yes" >&6; }
24114	else
24115		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24116$as_echo "no" >&6; }
24117		PKG_CONFIG=""
24118	fi
24119
24120fi
24121
24122# After basic tools have been setup, we can check build os specific details.
24123
24124  ###############################################################################
24125
24126  # Note that this is the build platform OS version!
24127
24128  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24129  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24130  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24131  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24132
24133
24134
24135
24136
24137# Misc basic settings
24138
24139
24140# Check whether --with-default-make-target was given.
24141if test "${with_default_make_target+set}" = set; then :
24142  withval=$with_default_make_target;
24143fi
24144
24145  if test "x$with_default_make_target" = "x" \
24146      || test "x$with_default_make_target" = "xyes"; then
24147    DEFAULT_MAKE_TARGET="exploded-image"
24148  elif test "x$with_default_make_target" = "xno"; then
24149    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24150  else
24151    DEFAULT_MAKE_TARGET="$with_default_make_target"
24152  fi
24153
24154
24155
24156
24157###############################################################################
24158#
24159# Determine OpenJDK variants, options and version numbers.
24160#
24161###############################################################################
24162
24163# We need build & target for this.
24164
24165  # Should we build a JDK without a graphical UI?
24166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24167$as_echo_n "checking headless only... " >&6; }
24168  # Check whether --enable-headless-only was given.
24169if test "${enable_headless_only+set}" = set; then :
24170  enableval=$enable_headless_only;
24171fi
24172
24173
24174  if test "x$enable_headless_only" = "xyes"; then
24175    ENABLE_HEADLESS_ONLY="true"
24176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24177$as_echo "yes" >&6; }
24178  elif test "x$enable_headless_only" = "xno"; then
24179    ENABLE_HEADLESS_ONLY="false"
24180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24181$as_echo "no" >&6; }
24182  elif test "x$enable_headless_only" = "x"; then
24183    ENABLE_HEADLESS_ONLY="false"
24184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24185$as_echo "no" >&6; }
24186  else
24187    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24188  fi
24189
24190
24191
24192  # Choose cacerts source file
24193
24194# Check whether --with-cacerts-file was given.
24195if test "${with_cacerts_file+set}" = set; then :
24196  withval=$with_cacerts_file;
24197fi
24198
24199  if test "x$with_cacerts_file" != x; then
24200    CACERTS_FILE=$with_cacerts_file
24201  fi
24202
24203
24204  # Enable or disable unlimited crypto
24205  # Check whether --enable-unlimited-crypto was given.
24206if test "${enable_unlimited_crypto+set}" = set; then :
24207  enableval=$enable_unlimited_crypto;
24208else
24209  enable_unlimited_crypto=yes
24210fi
24211
24212  if test "x$enable_unlimited_crypto" = "xyes"; then
24213    UNLIMITED_CRYPTO=true
24214  else
24215    UNLIMITED_CRYPTO=false
24216  fi
24217
24218
24219  # Should we build the serviceability agent (SA)?
24220  INCLUDE_SA=true
24221  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24222    INCLUDE_SA=false
24223  fi
24224  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24225    INCLUDE_SA=false
24226  fi
24227
24228
24229  # Compress jars
24230  COMPRESS_JARS=false
24231
24232
24233
24234  # Setup default copyright year. Mostly overridden when building close to a new year.
24235
24236# Check whether --with-copyright-year was given.
24237if test "${with_copyright_year+set}" = set; then :
24238  withval=$with_copyright_year;
24239fi
24240
24241  if test "x$with_copyright_year" = xyes; then
24242    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24243  elif test "x$with_copyright_year" != x; then
24244    COPYRIGHT_YEAR="$with_copyright_year"
24245  else
24246    COPYRIGHT_YEAR=`$DATE +'%Y'`
24247  fi
24248
24249
24250
24251  # Check whether --enable-keep-packaged-modules was given.
24252if test "${enable_keep_packaged_modules+set}" = set; then :
24253  enableval=$enable_keep_packaged_modules;
24254fi
24255
24256
24257  if test "x$enable_keep_packaged_modules" = "xyes"; then
24258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24259$as_echo_n "checking if packaged modules are kept... " >&6; }
24260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24261$as_echo "yes" >&6; }
24262    JLINK_KEEP_PACKAGED_MODULES=true
24263  elif test "x$enable_keep_packaged_modules" = "xno"; then
24264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24265$as_echo_n "checking if packaged modules are kept... " >&6; }
24266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24267$as_echo "no" >&6; }
24268    JLINK_KEEP_PACKAGED_MODULES=false
24269  elif test "x$enable_keep_packaged_modules" = "x"; then
24270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24271$as_echo "yes (default)" >&6; }
24272    JLINK_KEEP_PACKAGED_MODULES=true
24273  else
24274    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24275  fi
24276
24277
24278
24279
24280  # Warn user that old version arguments are deprecated.
24281
24282
24283# Check whether --with-milestone was given.
24284if test "${with_milestone+set}" = set; then :
24285  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24286$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24287fi
24288
24289
24290
24291
24292# Check whether --with-update-version was given.
24293if test "${with_update_version+set}" = set; then :
24294  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24295$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24296fi
24297
24298
24299
24300
24301# Check whether --with-user-release-suffix was given.
24302if test "${with_user_release_suffix+set}" = set; then :
24303  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
24304$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24305fi
24306
24307
24308
24309
24310# Check whether --with-build-number was given.
24311if test "${with_build_number+set}" = set; then :
24312  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24313$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24314fi
24315
24316
24317
24318  # Source the version numbers file
24319  . $AUTOCONF_DIR/version-numbers
24320
24321  # Some non-version number information is set in that file
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331  # Override version from arguments
24332
24333  # If --with-version-string is set, process it first. It is possible to
24334  # override parts with more specific flags, since these are processed later.
24335
24336# Check whether --with-version-string was given.
24337if test "${with_version_string+set}" = set; then :
24338  withval=$with_version_string;
24339fi
24340
24341  if test "x$with_version_string" = xyes; then
24342    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24343  elif test "x$with_version_string" != x; then
24344    # Additional [] needed to keep m4 from mangling shell constructs.
24345    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24346      VERSION_MAJOR=${BASH_REMATCH[1]}
24347      VERSION_MINOR=${BASH_REMATCH[3]}
24348      VERSION_SECURITY=${BASH_REMATCH[5]}
24349      VERSION_PATCH=${BASH_REMATCH[7]}
24350      VERSION_PRE=${BASH_REMATCH[9]}
24351      version_plus_separator=${BASH_REMATCH[11]}
24352      VERSION_BUILD=${BASH_REMATCH[12]}
24353      VERSION_OPT=${BASH_REMATCH[14]}
24354      # Unspecified numerical fields are interpreted as 0.
24355      if test "x$VERSION_MINOR" = x; then
24356        VERSION_MINOR=0
24357      fi
24358      if test "x$VERSION_SECURITY" = x; then
24359        VERSION_SECURITY=0
24360      fi
24361      if test "x$VERSION_PATCH" = x; then
24362        VERSION_PATCH=0
24363      fi
24364      if test "x$version_plus_separator" != x \
24365          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24366        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24367      fi
24368      # Stop the version part process from setting default values.
24369      # We still allow them to explicitly override though.
24370      NO_DEFAULT_VERSION_PARTS=true
24371    else
24372      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24373    fi
24374  fi
24375
24376
24377# Check whether --with-version-pre was given.
24378if test "${with_version_pre+set}" = set; then :
24379  withval=$with_version_pre; with_version_pre_present=true
24380else
24381  with_version_pre_present=false
24382fi
24383
24384
24385  if test "x$with_version_pre_present" = xtrue; then
24386    if test "x$with_version_pre" = xyes; then
24387      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24388    elif test "x$with_version_pre" = xno; then
24389      # Interpret --without-* as empty string instead of the literal "no"
24390      VERSION_PRE=
24391    else
24392      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24393       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24394      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24395        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24396$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24397      fi
24398    fi
24399  else
24400    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24401      # Default is to use "internal" as pre
24402      VERSION_PRE="internal"
24403    fi
24404  fi
24405
24406
24407# Check whether --with-version-opt was given.
24408if test "${with_version_opt+set}" = set; then :
24409  withval=$with_version_opt; with_version_opt_present=true
24410else
24411  with_version_opt_present=false
24412fi
24413
24414
24415  if test "x$with_version_opt_present" = xtrue; then
24416    if test "x$with_version_opt" = xyes; then
24417      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24418    elif test "x$with_version_opt" = xno; then
24419      # Interpret --without-* as empty string instead of the literal "no"
24420      VERSION_OPT=
24421    else
24422      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24423       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24424      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24426$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24427      fi
24428    fi
24429  else
24430    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24431      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24432      # Outer [ ] to quote m4.
24433       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24434      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24435    fi
24436  fi
24437
24438
24439# Check whether --with-version-build was given.
24440if test "${with_version_build+set}" = set; then :
24441  withval=$with_version_build; with_version_build_present=true
24442else
24443  with_version_build_present=false
24444fi
24445
24446
24447  if test "x$with_version_build_present" = xtrue; then
24448    if test "x$with_version_build" = xyes; then
24449      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24450    elif test "x$with_version_build" = xno; then
24451      # Interpret --without-* as empty string instead of the literal "no"
24452      VERSION_BUILD=
24453    elif test "x$with_version_build" = x; then
24454      VERSION_BUILD=
24455    else
24456
24457  # Additional [] needed to keep m4 from mangling shell constructs.
24458  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24459    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24460  fi
24461  # Extract the version number without leading zeros.
24462  cleaned_value=${BASH_REMATCH[1]}
24463  if test "x$cleaned_value" = x; then
24464    # Special case for zero
24465    cleaned_value=${BASH_REMATCH[2]}
24466  fi
24467
24468  if test $cleaned_value -gt 255; then
24469    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24470  fi
24471  if test "x$cleaned_value" != "x$with_version_build"; then
24472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24473$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24474  fi
24475  VERSION_BUILD=$cleaned_value
24476
24477    fi
24478  else
24479    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24480      # Default is to not have a build number.
24481      VERSION_BUILD=""
24482      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24483      VERSION_BUILD=0
24484    fi
24485  fi
24486
24487
24488# Check whether --with-version-major was given.
24489if test "${with_version_major+set}" = set; then :
24490  withval=$with_version_major; with_version_major_present=true
24491else
24492  with_version_major_present=false
24493fi
24494
24495
24496  if test "x$with_version_major_present" = xtrue; then
24497    if test "x$with_version_major" = xyes; then
24498      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24499    else
24500
24501  # Additional [] needed to keep m4 from mangling shell constructs.
24502  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24503    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24504  fi
24505  # Extract the version number without leading zeros.
24506  cleaned_value=${BASH_REMATCH[1]}
24507  if test "x$cleaned_value" = x; then
24508    # Special case for zero
24509    cleaned_value=${BASH_REMATCH[2]}
24510  fi
24511
24512  if test $cleaned_value -gt 255; then
24513    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24514  fi
24515  if test "x$cleaned_value" != "x$with_version_major"; then
24516    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24517$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24518  fi
24519  VERSION_MAJOR=$cleaned_value
24520
24521    fi
24522  else
24523    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24524      # Default is to get value from version-numbers
24525      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24526    fi
24527  fi
24528
24529
24530# Check whether --with-version-minor was given.
24531if test "${with_version_minor+set}" = set; then :
24532  withval=$with_version_minor; with_version_minor_present=true
24533else
24534  with_version_minor_present=false
24535fi
24536
24537
24538  if test "x$with_version_minor_present" = xtrue; then
24539    if test "x$with_version_minor" = xyes; then
24540      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24541    elif test "x$with_version_minor" = xno; then
24542      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24543      VERSION_MINOR=0
24544    elif test "x$with_version_minor" = x; then
24545      VERSION_MINOR=0
24546    else
24547
24548  # Additional [] needed to keep m4 from mangling shell constructs.
24549  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24550    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24551  fi
24552  # Extract the version number without leading zeros.
24553  cleaned_value=${BASH_REMATCH[1]}
24554  if test "x$cleaned_value" = x; then
24555    # Special case for zero
24556    cleaned_value=${BASH_REMATCH[2]}
24557  fi
24558
24559  if test $cleaned_value -gt 255; then
24560    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24561  fi
24562  if test "x$cleaned_value" != "x$with_version_minor"; then
24563    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24564$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24565  fi
24566  VERSION_MINOR=$cleaned_value
24567
24568    fi
24569  else
24570    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24571      # Default is 0, if unspecified
24572      VERSION_MINOR=0
24573    fi
24574  fi
24575
24576
24577# Check whether --with-version-security was given.
24578if test "${with_version_security+set}" = set; then :
24579  withval=$with_version_security; with_version_security_present=true
24580else
24581  with_version_security_present=false
24582fi
24583
24584
24585  if test "x$with_version_security_present" = xtrue; then
24586    if test "x$with_version_security" = xyes; then
24587      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24588    elif test "x$with_version_security" = xno; then
24589      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24590      VERSION_SECURITY=0
24591    elif test "x$with_version_security" = x; then
24592      VERSION_SECURITY=0
24593    else
24594
24595  # Additional [] needed to keep m4 from mangling shell constructs.
24596  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24597    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24598  fi
24599  # Extract the version number without leading zeros.
24600  cleaned_value=${BASH_REMATCH[1]}
24601  if test "x$cleaned_value" = x; then
24602    # Special case for zero
24603    cleaned_value=${BASH_REMATCH[2]}
24604  fi
24605
24606  if test $cleaned_value -gt 255; then
24607    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24608  fi
24609  if test "x$cleaned_value" != "x$with_version_security"; then
24610    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24611$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24612  fi
24613  VERSION_SECURITY=$cleaned_value
24614
24615    fi
24616  else
24617    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24618      # Default is 0, if unspecified
24619      VERSION_SECURITY=0
24620    fi
24621  fi
24622
24623
24624# Check whether --with-version-patch was given.
24625if test "${with_version_patch+set}" = set; then :
24626  withval=$with_version_patch; with_version_patch_present=true
24627else
24628  with_version_patch_present=false
24629fi
24630
24631
24632  if test "x$with_version_patch_present" = xtrue; then
24633    if test "x$with_version_patch" = xyes; then
24634      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24635    elif test "x$with_version_patch" = xno; then
24636      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24637      VERSION_PATCH=0
24638    elif test "x$with_version_patch" = x; then
24639      VERSION_PATCH=0
24640    else
24641
24642  # Additional [] needed to keep m4 from mangling shell constructs.
24643  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24644    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24645  fi
24646  # Extract the version number without leading zeros.
24647  cleaned_value=${BASH_REMATCH[1]}
24648  if test "x$cleaned_value" = x; then
24649    # Special case for zero
24650    cleaned_value=${BASH_REMATCH[2]}
24651  fi
24652
24653  if test $cleaned_value -gt 255; then
24654    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24655  fi
24656  if test "x$cleaned_value" != "x$with_version_patch"; then
24657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24658$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24659  fi
24660  VERSION_PATCH=$cleaned_value
24661
24662    fi
24663  else
24664    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24665      # Default is 0, if unspecified
24666      VERSION_PATCH=0
24667    fi
24668  fi
24669
24670  # Calculate derived version properties
24671
24672  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24673  if test "x$VERSION_PRE" = x; then
24674    VERSION_IS_GA=true
24675  else
24676    VERSION_IS_GA=false
24677  fi
24678
24679  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24680  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24681
24682  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24683  # Strip trailing zeroes from stripped_version_number
24684  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24685  VERSION_NUMBER=$stripped_version_number
24686
24687  # The complete version string, with additional build information
24688  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24689    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24690  else
24691    # If either build or opt is set, we need a + separator
24692    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24693  fi
24694
24695  # The short version string, just VERSION_NUMBER and PRE, if present.
24696  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24697
24698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24699$as_echo_n "checking for version string... " >&6; }
24700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24701$as_echo "$VERSION_STRING" >&6; }
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717###############################################################################
24718#
24719# Setup BootJDK, used to bootstrap the build.
24720#
24721###############################################################################
24722
24723
24724  BOOT_JDK_FOUND=no
24725
24726# Check whether --with-boot-jdk was given.
24727if test "${with_boot_jdk+set}" = set; then :
24728  withval=$with_boot_jdk;
24729fi
24730
24731
24732  # We look for the Boot JDK through various means, going from more certain to
24733  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24734  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24735  # must check if this is indeed valid; otherwise we'll continue looking.
24736
24737  # Test: Is bootjdk explicitly set by command line arguments?
24738
24739  if test "x$BOOT_JDK_FOUND" = xno; then
24740    # Now execute the test
24741
24742  if test "x$with_boot_jdk" != x; then
24743    BOOT_JDK=$with_boot_jdk
24744    BOOT_JDK_FOUND=maybe
24745    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24746$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24747  fi
24748
24749
24750    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24751    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24752      # Do we have a bin/java?
24753      if test ! -x "$BOOT_JDK/bin/java"; then
24754        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24755$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24756        BOOT_JDK_FOUND=no
24757      else
24758        # Do we have a bin/javac?
24759        if test ! -x "$BOOT_JDK/bin/javac"; then
24760          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24761$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24762          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24763$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24764          BOOT_JDK_FOUND=no
24765        else
24766          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24767          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24768
24769          # Extra M4 quote needed to protect [] in grep expression.
24770          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24771          if test "x$FOUND_CORRECT_VERSION" = x; then
24772            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24774            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24775$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24776            BOOT_JDK_FOUND=no
24777          else
24778            # We're done! :-)
24779            BOOT_JDK_FOUND=yes
24780
24781  # Only process if variable expands to non-empty
24782
24783  if test "x$BOOT_JDK" != x; then
24784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24785
24786  # Input might be given as Windows format, start by converting to
24787  # unix format.
24788  path="$BOOT_JDK"
24789  new_path=`$CYGPATH -u "$path"`
24790
24791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24794  # "foo.exe" is OK but "foo" is an error.
24795  #
24796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24797  # It is also a way to make sure we got the proper file name for the real test later on.
24798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24799  if test "x$test_shortpath" = x; then
24800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24801$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24802    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24803  fi
24804
24805  # Call helper function which possibly converts this using DOS-style short mode.
24806  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24819      # Going to short mode and back again did indeed matter. Since short mode is
24820      # case insensitive, let's make it lowercase to improve readability.
24821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24822      # Now convert it back to Unix-style (cygpath)
24823      input_path=`$CYGPATH -u "$shortmode_path"`
24824      new_path="$input_path"
24825    fi
24826  fi
24827
24828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24829  if test "x$test_cygdrive_prefix" = x; then
24830    # As a simple fix, exclude /usr/bin since it's not a real path.
24831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24833      # a path prefixed by /cygdrive for fixpath to work.
24834      new_path="$CYGWIN_ROOT_PATH$input_path"
24835    fi
24836  fi
24837
24838
24839  if test "x$path" != "x$new_path"; then
24840    BOOT_JDK="$new_path"
24841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24842$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24843  fi
24844
24845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24846
24847  path="$BOOT_JDK"
24848  has_colon=`$ECHO $path | $GREP ^.:`
24849  new_path="$path"
24850  if test "x$has_colon" = x; then
24851    # Not in mixed or Windows style, start by that.
24852    new_path=`cmd //c echo $path`
24853  fi
24854
24855
24856  input_path="$new_path"
24857  # Check if we need to convert this using DOS-style short mode. If the path
24858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24859  # take no chances and rewrite it.
24860  # Note: m4 eats our [], so we need to use [ and ] instead.
24861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24862  if test "x$has_forbidden_chars" != x; then
24863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24865  fi
24866
24867
24868  windows_path="$new_path"
24869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24870    unix_path=`$CYGPATH -u "$windows_path"`
24871    new_path="$unix_path"
24872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24874    new_path="$unix_path"
24875  fi
24876
24877  if test "x$path" != "x$new_path"; then
24878    BOOT_JDK="$new_path"
24879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24881  fi
24882
24883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24885
24886    else
24887      # We're on a unix platform. Hooray! :)
24888      path="$BOOT_JDK"
24889      has_space=`$ECHO "$path" | $GREP " "`
24890      if test "x$has_space" != x; then
24891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24892$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24894      fi
24895
24896      # Use eval to expand a potential ~
24897      eval path="$path"
24898      if test ! -f "$path" && test ! -d "$path"; then
24899        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24900      fi
24901
24902      if test -d "$path"; then
24903        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24904      else
24905        dir="`$DIRNAME "$path"`"
24906        base="`$BASENAME "$path"`"
24907        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24908      fi
24909    fi
24910  fi
24911
24912            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24913$as_echo_n "checking for Boot JDK... " >&6; }
24914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24915$as_echo "$BOOT_JDK" >&6; }
24916            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24917$as_echo_n "checking Boot JDK version... " >&6; }
24918            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24919            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24920$as_echo "$BOOT_JDK_VERSION" >&6; }
24921          fi # end check jdk version
24922        fi # end check javac
24923      fi # end check java
24924    fi # end check boot jdk found
24925  fi
24926
24927  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24928    # Having specified an argument which is incorrect will produce an instant failure;
24929    # we should not go on looking
24930    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24931  fi
24932
24933  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24934
24935  if test "x$BOOT_JDK_FOUND" = xno; then
24936    # Now execute the test
24937
24938  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24939    # First check at user selected default
24940
24941  if test "x$BOOT_JDK_FOUND" = xno; then
24942    # Now execute the test
24943
24944  if test -x /usr/libexec/java_home; then
24945    BOOT_JDK=`/usr/libexec/java_home `
24946    BOOT_JDK_FOUND=maybe
24947    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24948$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24949  fi
24950
24951
24952    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24953    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24954      # Do we have a bin/java?
24955      if test ! -x "$BOOT_JDK/bin/java"; then
24956        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24958        BOOT_JDK_FOUND=no
24959      else
24960        # Do we have a bin/javac?
24961        if test ! -x "$BOOT_JDK/bin/javac"; then
24962          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24964          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24965$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24966          BOOT_JDK_FOUND=no
24967        else
24968          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24969          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24970
24971          # Extra M4 quote needed to protect [] in grep expression.
24972          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24973          if test "x$FOUND_CORRECT_VERSION" = x; then
24974            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24976            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24977$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24978            BOOT_JDK_FOUND=no
24979          else
24980            # We're done! :-)
24981            BOOT_JDK_FOUND=yes
24982
24983  # Only process if variable expands to non-empty
24984
24985  if test "x$BOOT_JDK" != x; then
24986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24987
24988  # Input might be given as Windows format, start by converting to
24989  # unix format.
24990  path="$BOOT_JDK"
24991  new_path=`$CYGPATH -u "$path"`
24992
24993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24996  # "foo.exe" is OK but "foo" is an error.
24997  #
24998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24999  # It is also a way to make sure we got the proper file name for the real test later on.
25000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25001  if test "x$test_shortpath" = x; then
25002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25003$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25004    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25005  fi
25006
25007  # Call helper function which possibly converts this using DOS-style short mode.
25008  # If so, the updated path is stored in $new_path.
25009
25010  input_path="$new_path"
25011  # Check if we need to convert this using DOS-style short mode. If the path
25012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25013  # take no chances and rewrite it.
25014  # Note: m4 eats our [], so we need to use [ and ] instead.
25015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25016  if test "x$has_forbidden_chars" != x; then
25017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25021      # Going to short mode and back again did indeed matter. Since short mode is
25022      # case insensitive, let's make it lowercase to improve readability.
25023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25024      # Now convert it back to Unix-style (cygpath)
25025      input_path=`$CYGPATH -u "$shortmode_path"`
25026      new_path="$input_path"
25027    fi
25028  fi
25029
25030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25031  if test "x$test_cygdrive_prefix" = x; then
25032    # As a simple fix, exclude /usr/bin since it's not a real path.
25033    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25035      # a path prefixed by /cygdrive for fixpath to work.
25036      new_path="$CYGWIN_ROOT_PATH$input_path"
25037    fi
25038  fi
25039
25040
25041  if test "x$path" != "x$new_path"; then
25042    BOOT_JDK="$new_path"
25043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25044$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25045  fi
25046
25047    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25048
25049  path="$BOOT_JDK"
25050  has_colon=`$ECHO $path | $GREP ^.:`
25051  new_path="$path"
25052  if test "x$has_colon" = x; then
25053    # Not in mixed or Windows style, start by that.
25054    new_path=`cmd //c echo $path`
25055  fi
25056
25057
25058  input_path="$new_path"
25059  # Check if we need to convert this using DOS-style short mode. If the path
25060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25061  # take no chances and rewrite it.
25062  # Note: m4 eats our [], so we need to use [ and ] instead.
25063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25064  if test "x$has_forbidden_chars" != x; then
25065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25067  fi
25068
25069
25070  windows_path="$new_path"
25071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25072    unix_path=`$CYGPATH -u "$windows_path"`
25073    new_path="$unix_path"
25074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25076    new_path="$unix_path"
25077  fi
25078
25079  if test "x$path" != "x$new_path"; then
25080    BOOT_JDK="$new_path"
25081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25082$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25083  fi
25084
25085  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25086  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25087
25088    else
25089      # We're on a unix platform. Hooray! :)
25090      path="$BOOT_JDK"
25091      has_space=`$ECHO "$path" | $GREP " "`
25092      if test "x$has_space" != x; then
25093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25094$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25095        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25096      fi
25097
25098      # Use eval to expand a potential ~
25099      eval path="$path"
25100      if test ! -f "$path" && test ! -d "$path"; then
25101        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25102      fi
25103
25104      if test -d "$path"; then
25105        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25106      else
25107        dir="`$DIRNAME "$path"`"
25108        base="`$BASENAME "$path"`"
25109        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25110      fi
25111    fi
25112  fi
25113
25114            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25115$as_echo_n "checking for Boot JDK... " >&6; }
25116            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25117$as_echo "$BOOT_JDK" >&6; }
25118            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25119$as_echo_n "checking Boot JDK version... " >&6; }
25120            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25122$as_echo "$BOOT_JDK_VERSION" >&6; }
25123          fi # end check jdk version
25124        fi # end check javac
25125      fi # end check java
25126    fi # end check boot jdk found
25127  fi
25128
25129    # If that did not work out (e.g. too old), try explicit versions instead
25130
25131  if test "x$BOOT_JDK_FOUND" = xno; then
25132    # Now execute the test
25133
25134  if test -x /usr/libexec/java_home; then
25135    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25136    BOOT_JDK_FOUND=maybe
25137    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25138$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25139  fi
25140
25141
25142    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25143    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25144      # Do we have a bin/java?
25145      if test ! -x "$BOOT_JDK/bin/java"; then
25146        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25148        BOOT_JDK_FOUND=no
25149      else
25150        # Do we have a bin/javac?
25151        if test ! -x "$BOOT_JDK/bin/javac"; then
25152          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25154          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25155$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25156          BOOT_JDK_FOUND=no
25157        else
25158          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25159          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25160
25161          # Extra M4 quote needed to protect [] in grep expression.
25162          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25163          if test "x$FOUND_CORRECT_VERSION" = x; then
25164            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25166            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25167$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25168            BOOT_JDK_FOUND=no
25169          else
25170            # We're done! :-)
25171            BOOT_JDK_FOUND=yes
25172
25173  # Only process if variable expands to non-empty
25174
25175  if test "x$BOOT_JDK" != x; then
25176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25177
25178  # Input might be given as Windows format, start by converting to
25179  # unix format.
25180  path="$BOOT_JDK"
25181  new_path=`$CYGPATH -u "$path"`
25182
25183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25186  # "foo.exe" is OK but "foo" is an error.
25187  #
25188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25189  # It is also a way to make sure we got the proper file name for the real test later on.
25190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25191  if test "x$test_shortpath" = x; then
25192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25193$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25194    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25195  fi
25196
25197  # Call helper function which possibly converts this using DOS-style short mode.
25198  # If so, the updated path is stored in $new_path.
25199
25200  input_path="$new_path"
25201  # Check if we need to convert this using DOS-style short mode. If the path
25202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25203  # take no chances and rewrite it.
25204  # Note: m4 eats our [], so we need to use [ and ] instead.
25205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25206  if test "x$has_forbidden_chars" != x; then
25207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25211      # Going to short mode and back again did indeed matter. Since short mode is
25212      # case insensitive, let's make it lowercase to improve readability.
25213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25214      # Now convert it back to Unix-style (cygpath)
25215      input_path=`$CYGPATH -u "$shortmode_path"`
25216      new_path="$input_path"
25217    fi
25218  fi
25219
25220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25221  if test "x$test_cygdrive_prefix" = x; then
25222    # As a simple fix, exclude /usr/bin since it's not a real path.
25223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25225      # a path prefixed by /cygdrive for fixpath to work.
25226      new_path="$CYGWIN_ROOT_PATH$input_path"
25227    fi
25228  fi
25229
25230
25231  if test "x$path" != "x$new_path"; then
25232    BOOT_JDK="$new_path"
25233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25234$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25235  fi
25236
25237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25238
25239  path="$BOOT_JDK"
25240  has_colon=`$ECHO $path | $GREP ^.:`
25241  new_path="$path"
25242  if test "x$has_colon" = x; then
25243    # Not in mixed or Windows style, start by that.
25244    new_path=`cmd //c echo $path`
25245  fi
25246
25247
25248  input_path="$new_path"
25249  # Check if we need to convert this using DOS-style short mode. If the path
25250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25251  # take no chances and rewrite it.
25252  # Note: m4 eats our [], so we need to use [ and ] instead.
25253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25254  if test "x$has_forbidden_chars" != x; then
25255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25257  fi
25258
25259
25260  windows_path="$new_path"
25261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25262    unix_path=`$CYGPATH -u "$windows_path"`
25263    new_path="$unix_path"
25264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25266    new_path="$unix_path"
25267  fi
25268
25269  if test "x$path" != "x$new_path"; then
25270    BOOT_JDK="$new_path"
25271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25273  fi
25274
25275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25277
25278    else
25279      # We're on a unix platform. Hooray! :)
25280      path="$BOOT_JDK"
25281      has_space=`$ECHO "$path" | $GREP " "`
25282      if test "x$has_space" != x; then
25283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25286      fi
25287
25288      # Use eval to expand a potential ~
25289      eval path="$path"
25290      if test ! -f "$path" && test ! -d "$path"; then
25291        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25292      fi
25293
25294      if test -d "$path"; then
25295        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25296      else
25297        dir="`$DIRNAME "$path"`"
25298        base="`$BASENAME "$path"`"
25299        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25300      fi
25301    fi
25302  fi
25303
25304            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25305$as_echo_n "checking for Boot JDK... " >&6; }
25306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25307$as_echo "$BOOT_JDK" >&6; }
25308            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25309$as_echo_n "checking Boot JDK version... " >&6; }
25310            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25312$as_echo "$BOOT_JDK_VERSION" >&6; }
25313          fi # end check jdk version
25314        fi # end check javac
25315      fi # end check java
25316    fi # end check boot jdk found
25317  fi
25318
25319
25320  if test "x$BOOT_JDK_FOUND" = xno; then
25321    # Now execute the test
25322
25323  if test -x /usr/libexec/java_home; then
25324    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25325    BOOT_JDK_FOUND=maybe
25326    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25327$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25328  fi
25329
25330
25331    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25332    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25333      # Do we have a bin/java?
25334      if test ! -x "$BOOT_JDK/bin/java"; then
25335        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25337        BOOT_JDK_FOUND=no
25338      else
25339        # Do we have a bin/javac?
25340        if test ! -x "$BOOT_JDK/bin/javac"; then
25341          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25343          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25344$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25345          BOOT_JDK_FOUND=no
25346        else
25347          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25348          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25349
25350          # Extra M4 quote needed to protect [] in grep expression.
25351          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25352          if test "x$FOUND_CORRECT_VERSION" = x; then
25353            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25355            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25356$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25357            BOOT_JDK_FOUND=no
25358          else
25359            # We're done! :-)
25360            BOOT_JDK_FOUND=yes
25361
25362  # Only process if variable expands to non-empty
25363
25364  if test "x$BOOT_JDK" != x; then
25365    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25366
25367  # Input might be given as Windows format, start by converting to
25368  # unix format.
25369  path="$BOOT_JDK"
25370  new_path=`$CYGPATH -u "$path"`
25371
25372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25375  # "foo.exe" is OK but "foo" is an error.
25376  #
25377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25378  # It is also a way to make sure we got the proper file name for the real test later on.
25379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25380  if test "x$test_shortpath" = x; then
25381    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25382$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25383    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25384  fi
25385
25386  # Call helper function which possibly converts this using DOS-style short mode.
25387  # If so, the updated path is stored in $new_path.
25388
25389  input_path="$new_path"
25390  # Check if we need to convert this using DOS-style short mode. If the path
25391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25392  # take no chances and rewrite it.
25393  # Note: m4 eats our [], so we need to use [ and ] instead.
25394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25395  if test "x$has_forbidden_chars" != x; then
25396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25400      # Going to short mode and back again did indeed matter. Since short mode is
25401      # case insensitive, let's make it lowercase to improve readability.
25402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25403      # Now convert it back to Unix-style (cygpath)
25404      input_path=`$CYGPATH -u "$shortmode_path"`
25405      new_path="$input_path"
25406    fi
25407  fi
25408
25409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25410  if test "x$test_cygdrive_prefix" = x; then
25411    # As a simple fix, exclude /usr/bin since it's not a real path.
25412    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25414      # a path prefixed by /cygdrive for fixpath to work.
25415      new_path="$CYGWIN_ROOT_PATH$input_path"
25416    fi
25417  fi
25418
25419
25420  if test "x$path" != "x$new_path"; then
25421    BOOT_JDK="$new_path"
25422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25423$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25424  fi
25425
25426    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25427
25428  path="$BOOT_JDK"
25429  has_colon=`$ECHO $path | $GREP ^.:`
25430  new_path="$path"
25431  if test "x$has_colon" = x; then
25432    # Not in mixed or Windows style, start by that.
25433    new_path=`cmd //c echo $path`
25434  fi
25435
25436
25437  input_path="$new_path"
25438  # Check if we need to convert this using DOS-style short mode. If the path
25439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25440  # take no chances and rewrite it.
25441  # Note: m4 eats our [], so we need to use [ and ] instead.
25442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25443  if test "x$has_forbidden_chars" != x; then
25444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25446  fi
25447
25448
25449  windows_path="$new_path"
25450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25451    unix_path=`$CYGPATH -u "$windows_path"`
25452    new_path="$unix_path"
25453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25455    new_path="$unix_path"
25456  fi
25457
25458  if test "x$path" != "x$new_path"; then
25459    BOOT_JDK="$new_path"
25460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25461$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25462  fi
25463
25464  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25465  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25466
25467    else
25468      # We're on a unix platform. Hooray! :)
25469      path="$BOOT_JDK"
25470      has_space=`$ECHO "$path" | $GREP " "`
25471      if test "x$has_space" != x; then
25472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25473$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25474        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25475      fi
25476
25477      # Use eval to expand a potential ~
25478      eval path="$path"
25479      if test ! -f "$path" && test ! -d "$path"; then
25480        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25481      fi
25482
25483      if test -d "$path"; then
25484        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25485      else
25486        dir="`$DIRNAME "$path"`"
25487        base="`$BASENAME "$path"`"
25488        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25489      fi
25490    fi
25491  fi
25492
25493            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25494$as_echo_n "checking for Boot JDK... " >&6; }
25495            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25496$as_echo "$BOOT_JDK" >&6; }
25497            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25498$as_echo_n "checking Boot JDK version... " >&6; }
25499            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25500            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25501$as_echo "$BOOT_JDK_VERSION" >&6; }
25502          fi # end check jdk version
25503        fi # end check javac
25504      fi # end check java
25505    fi # end check boot jdk found
25506  fi
25507
25508
25509  if test "x$BOOT_JDK_FOUND" = xno; then
25510    # Now execute the test
25511
25512  if test -x /usr/libexec/java_home; then
25513    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25514    BOOT_JDK_FOUND=maybe
25515    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25516$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25517  fi
25518
25519
25520    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25521    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25522      # Do we have a bin/java?
25523      if test ! -x "$BOOT_JDK/bin/java"; then
25524        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25526        BOOT_JDK_FOUND=no
25527      else
25528        # Do we have a bin/javac?
25529        if test ! -x "$BOOT_JDK/bin/javac"; then
25530          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25532          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25533$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25534          BOOT_JDK_FOUND=no
25535        else
25536          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25537          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25538
25539          # Extra M4 quote needed to protect [] in grep expression.
25540          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25541          if test "x$FOUND_CORRECT_VERSION" = x; then
25542            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25544            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25545$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25546            BOOT_JDK_FOUND=no
25547          else
25548            # We're done! :-)
25549            BOOT_JDK_FOUND=yes
25550
25551  # Only process if variable expands to non-empty
25552
25553  if test "x$BOOT_JDK" != x; then
25554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25555
25556  # Input might be given as Windows format, start by converting to
25557  # unix format.
25558  path="$BOOT_JDK"
25559  new_path=`$CYGPATH -u "$path"`
25560
25561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25564  # "foo.exe" is OK but "foo" is an error.
25565  #
25566  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25567  # It is also a way to make sure we got the proper file name for the real test later on.
25568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25569  if test "x$test_shortpath" = x; then
25570    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25572    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25573  fi
25574
25575  # Call helper function which possibly converts this using DOS-style short mode.
25576  # If so, the updated path is stored in $new_path.
25577
25578  input_path="$new_path"
25579  # Check if we need to convert this using DOS-style short mode. If the path
25580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25581  # take no chances and rewrite it.
25582  # Note: m4 eats our [], so we need to use [ and ] instead.
25583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25584  if test "x$has_forbidden_chars" != x; then
25585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25589      # Going to short mode and back again did indeed matter. Since short mode is
25590      # case insensitive, let's make it lowercase to improve readability.
25591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25592      # Now convert it back to Unix-style (cygpath)
25593      input_path=`$CYGPATH -u "$shortmode_path"`
25594      new_path="$input_path"
25595    fi
25596  fi
25597
25598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25599  if test "x$test_cygdrive_prefix" = x; then
25600    # As a simple fix, exclude /usr/bin since it's not a real path.
25601    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25603      # a path prefixed by /cygdrive for fixpath to work.
25604      new_path="$CYGWIN_ROOT_PATH$input_path"
25605    fi
25606  fi
25607
25608
25609  if test "x$path" != "x$new_path"; then
25610    BOOT_JDK="$new_path"
25611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25612$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25613  fi
25614
25615    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25616
25617  path="$BOOT_JDK"
25618  has_colon=`$ECHO $path | $GREP ^.:`
25619  new_path="$path"
25620  if test "x$has_colon" = x; then
25621    # Not in mixed or Windows style, start by that.
25622    new_path=`cmd //c echo $path`
25623  fi
25624
25625
25626  input_path="$new_path"
25627  # Check if we need to convert this using DOS-style short mode. If the path
25628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25629  # take no chances and rewrite it.
25630  # Note: m4 eats our [], so we need to use [ and ] instead.
25631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25632  if test "x$has_forbidden_chars" != x; then
25633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25635  fi
25636
25637
25638  windows_path="$new_path"
25639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25640    unix_path=`$CYGPATH -u "$windows_path"`
25641    new_path="$unix_path"
25642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25644    new_path="$unix_path"
25645  fi
25646
25647  if test "x$path" != "x$new_path"; then
25648    BOOT_JDK="$new_path"
25649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25651  fi
25652
25653  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25654  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25655
25656    else
25657      # We're on a unix platform. Hooray! :)
25658      path="$BOOT_JDK"
25659      has_space=`$ECHO "$path" | $GREP " "`
25660      if test "x$has_space" != x; then
25661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25662$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25663        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25664      fi
25665
25666      # Use eval to expand a potential ~
25667      eval path="$path"
25668      if test ! -f "$path" && test ! -d "$path"; then
25669        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25670      fi
25671
25672      if test -d "$path"; then
25673        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25674      else
25675        dir="`$DIRNAME "$path"`"
25676        base="`$BASENAME "$path"`"
25677        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25678      fi
25679    fi
25680  fi
25681
25682            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25683$as_echo_n "checking for Boot JDK... " >&6; }
25684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25685$as_echo "$BOOT_JDK" >&6; }
25686            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25687$as_echo_n "checking Boot JDK version... " >&6; }
25688            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25690$as_echo "$BOOT_JDK_VERSION" >&6; }
25691          fi # end check jdk version
25692        fi # end check javac
25693      fi # end check java
25694    fi # end check boot jdk found
25695  fi
25696
25697  fi
25698
25699
25700    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25701    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25702      # Do we have a bin/java?
25703      if test ! -x "$BOOT_JDK/bin/java"; then
25704        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25706        BOOT_JDK_FOUND=no
25707      else
25708        # Do we have a bin/javac?
25709        if test ! -x "$BOOT_JDK/bin/javac"; then
25710          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25712          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25713$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25714          BOOT_JDK_FOUND=no
25715        else
25716          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25717          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25718
25719          # Extra M4 quote needed to protect [] in grep expression.
25720          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25721          if test "x$FOUND_CORRECT_VERSION" = x; then
25722            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25724            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25725$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25726            BOOT_JDK_FOUND=no
25727          else
25728            # We're done! :-)
25729            BOOT_JDK_FOUND=yes
25730
25731  # Only process if variable expands to non-empty
25732
25733  if test "x$BOOT_JDK" != x; then
25734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25735
25736  # Input might be given as Windows format, start by converting to
25737  # unix format.
25738  path="$BOOT_JDK"
25739  new_path=`$CYGPATH -u "$path"`
25740
25741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25744  # "foo.exe" is OK but "foo" is an error.
25745  #
25746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25747  # It is also a way to make sure we got the proper file name for the real test later on.
25748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25749  if test "x$test_shortpath" = x; then
25750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25751$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25752    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25753  fi
25754
25755  # Call helper function which possibly converts this using DOS-style short mode.
25756  # If so, the updated path is stored in $new_path.
25757
25758  input_path="$new_path"
25759  # Check if we need to convert this using DOS-style short mode. If the path
25760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25761  # take no chances and rewrite it.
25762  # Note: m4 eats our [], so we need to use [ and ] instead.
25763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25764  if test "x$has_forbidden_chars" != x; then
25765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25769      # Going to short mode and back again did indeed matter. Since short mode is
25770      # case insensitive, let's make it lowercase to improve readability.
25771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25772      # Now convert it back to Unix-style (cygpath)
25773      input_path=`$CYGPATH -u "$shortmode_path"`
25774      new_path="$input_path"
25775    fi
25776  fi
25777
25778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25779  if test "x$test_cygdrive_prefix" = x; then
25780    # As a simple fix, exclude /usr/bin since it's not a real path.
25781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25783      # a path prefixed by /cygdrive for fixpath to work.
25784      new_path="$CYGWIN_ROOT_PATH$input_path"
25785    fi
25786  fi
25787
25788
25789  if test "x$path" != "x$new_path"; then
25790    BOOT_JDK="$new_path"
25791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25792$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25793  fi
25794
25795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25796
25797  path="$BOOT_JDK"
25798  has_colon=`$ECHO $path | $GREP ^.:`
25799  new_path="$path"
25800  if test "x$has_colon" = x; then
25801    # Not in mixed or Windows style, start by that.
25802    new_path=`cmd //c echo $path`
25803  fi
25804
25805
25806  input_path="$new_path"
25807  # Check if we need to convert this using DOS-style short mode. If the path
25808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25809  # take no chances and rewrite it.
25810  # Note: m4 eats our [], so we need to use [ and ] instead.
25811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25812  if test "x$has_forbidden_chars" != x; then
25813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25815  fi
25816
25817
25818  windows_path="$new_path"
25819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25820    unix_path=`$CYGPATH -u "$windows_path"`
25821    new_path="$unix_path"
25822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25824    new_path="$unix_path"
25825  fi
25826
25827  if test "x$path" != "x$new_path"; then
25828    BOOT_JDK="$new_path"
25829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25830$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25831  fi
25832
25833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25835
25836    else
25837      # We're on a unix platform. Hooray! :)
25838      path="$BOOT_JDK"
25839      has_space=`$ECHO "$path" | $GREP " "`
25840      if test "x$has_space" != x; then
25841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25842$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25843        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25844      fi
25845
25846      # Use eval to expand a potential ~
25847      eval path="$path"
25848      if test ! -f "$path" && test ! -d "$path"; then
25849        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25850      fi
25851
25852      if test -d "$path"; then
25853        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25854      else
25855        dir="`$DIRNAME "$path"`"
25856        base="`$BASENAME "$path"`"
25857        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25858      fi
25859    fi
25860  fi
25861
25862            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25863$as_echo_n "checking for Boot JDK... " >&6; }
25864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25865$as_echo "$BOOT_JDK" >&6; }
25866            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25867$as_echo_n "checking Boot JDK version... " >&6; }
25868            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25870$as_echo "$BOOT_JDK_VERSION" >&6; }
25871          fi # end check jdk version
25872        fi # end check javac
25873      fi # end check java
25874    fi # end check boot jdk found
25875  fi
25876
25877
25878  # Test: Is $JAVA_HOME set?
25879
25880  if test "x$BOOT_JDK_FOUND" = xno; then
25881    # Now execute the test
25882
25883  if test "x$JAVA_HOME" != x; then
25884    JAVA_HOME_PROCESSED="$JAVA_HOME"
25885
25886  # Only process if variable expands to non-empty
25887
25888  if test "x$JAVA_HOME_PROCESSED" != x; then
25889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25890
25891  # Input might be given as Windows format, start by converting to
25892  # unix format.
25893  path="$JAVA_HOME_PROCESSED"
25894  new_path=`$CYGPATH -u "$path"`
25895
25896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25899  # "foo.exe" is OK but "foo" is an error.
25900  #
25901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25902  # It is also a way to make sure we got the proper file name for the real test later on.
25903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25904  if test "x$test_shortpath" = x; then
25905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25906$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25907    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25908  fi
25909
25910  # Call helper function which possibly converts this using DOS-style short mode.
25911  # If so, the updated path is stored in $new_path.
25912
25913  input_path="$new_path"
25914  # Check if we need to convert this using DOS-style short mode. If the path
25915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25916  # take no chances and rewrite it.
25917  # Note: m4 eats our [], so we need to use [ and ] instead.
25918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25919  if test "x$has_forbidden_chars" != x; then
25920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25924      # Going to short mode and back again did indeed matter. Since short mode is
25925      # case insensitive, let's make it lowercase to improve readability.
25926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25927      # Now convert it back to Unix-style (cygpath)
25928      input_path=`$CYGPATH -u "$shortmode_path"`
25929      new_path="$input_path"
25930    fi
25931  fi
25932
25933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25934  if test "x$test_cygdrive_prefix" = x; then
25935    # As a simple fix, exclude /usr/bin since it's not a real path.
25936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25938      # a path prefixed by /cygdrive for fixpath to work.
25939      new_path="$CYGWIN_ROOT_PATH$input_path"
25940    fi
25941  fi
25942
25943
25944  if test "x$path" != "x$new_path"; then
25945    JAVA_HOME_PROCESSED="$new_path"
25946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25947$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25948  fi
25949
25950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25951
25952  path="$JAVA_HOME_PROCESSED"
25953  has_colon=`$ECHO $path | $GREP ^.:`
25954  new_path="$path"
25955  if test "x$has_colon" = x; then
25956    # Not in mixed or Windows style, start by that.
25957    new_path=`cmd //c echo $path`
25958  fi
25959
25960
25961  input_path="$new_path"
25962  # Check if we need to convert this using DOS-style short mode. If the path
25963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25964  # take no chances and rewrite it.
25965  # Note: m4 eats our [], so we need to use [ and ] instead.
25966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25967  if test "x$has_forbidden_chars" != x; then
25968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25970  fi
25971
25972
25973  windows_path="$new_path"
25974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25975    unix_path=`$CYGPATH -u "$windows_path"`
25976    new_path="$unix_path"
25977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25979    new_path="$unix_path"
25980  fi
25981
25982  if test "x$path" != "x$new_path"; then
25983    JAVA_HOME_PROCESSED="$new_path"
25984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25985$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25986  fi
25987
25988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25990
25991    else
25992      # We're on a unix platform. Hooray! :)
25993      path="$JAVA_HOME_PROCESSED"
25994      has_space=`$ECHO "$path" | $GREP " "`
25995      if test "x$has_space" != x; then
25996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25997$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25998        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25999      fi
26000
26001      # Use eval to expand a potential ~
26002      eval path="$path"
26003      if test ! -f "$path" && test ! -d "$path"; then
26004        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26005      fi
26006
26007      if test -d "$path"; then
26008        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26009      else
26010        dir="`$DIRNAME "$path"`"
26011        base="`$BASENAME "$path"`"
26012        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26013      fi
26014    fi
26015  fi
26016
26017    if test ! -d "$JAVA_HOME_PROCESSED"; then
26018      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26019$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26020    else
26021      # Aha, the user has set a JAVA_HOME
26022      # let us use that as the Boot JDK.
26023      BOOT_JDK="$JAVA_HOME_PROCESSED"
26024      BOOT_JDK_FOUND=maybe
26025      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26026$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26027    fi
26028  fi
26029
26030
26031    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26032    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26033      # Do we have a bin/java?
26034      if test ! -x "$BOOT_JDK/bin/java"; then
26035        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26037        BOOT_JDK_FOUND=no
26038      else
26039        # Do we have a bin/javac?
26040        if test ! -x "$BOOT_JDK/bin/javac"; then
26041          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26043          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26044$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26045          BOOT_JDK_FOUND=no
26046        else
26047          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26048          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26049
26050          # Extra M4 quote needed to protect [] in grep expression.
26051          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26052          if test "x$FOUND_CORRECT_VERSION" = x; then
26053            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26055            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26056$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26057            BOOT_JDK_FOUND=no
26058          else
26059            # We're done! :-)
26060            BOOT_JDK_FOUND=yes
26061
26062  # Only process if variable expands to non-empty
26063
26064  if test "x$BOOT_JDK" != x; then
26065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26066
26067  # Input might be given as Windows format, start by converting to
26068  # unix format.
26069  path="$BOOT_JDK"
26070  new_path=`$CYGPATH -u "$path"`
26071
26072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26075  # "foo.exe" is OK but "foo" is an error.
26076  #
26077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26078  # It is also a way to make sure we got the proper file name for the real test later on.
26079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26080  if test "x$test_shortpath" = x; then
26081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26083    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26084  fi
26085
26086  # Call helper function which possibly converts this using DOS-style short mode.
26087  # If so, the updated path is stored in $new_path.
26088
26089  input_path="$new_path"
26090  # Check if we need to convert this using DOS-style short mode. If the path
26091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26092  # take no chances and rewrite it.
26093  # Note: m4 eats our [], so we need to use [ and ] instead.
26094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26095  if test "x$has_forbidden_chars" != x; then
26096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26100      # Going to short mode and back again did indeed matter. Since short mode is
26101      # case insensitive, let's make it lowercase to improve readability.
26102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26103      # Now convert it back to Unix-style (cygpath)
26104      input_path=`$CYGPATH -u "$shortmode_path"`
26105      new_path="$input_path"
26106    fi
26107  fi
26108
26109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26110  if test "x$test_cygdrive_prefix" = x; then
26111    # As a simple fix, exclude /usr/bin since it's not a real path.
26112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26114      # a path prefixed by /cygdrive for fixpath to work.
26115      new_path="$CYGWIN_ROOT_PATH$input_path"
26116    fi
26117  fi
26118
26119
26120  if test "x$path" != "x$new_path"; then
26121    BOOT_JDK="$new_path"
26122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26124  fi
26125
26126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26127
26128  path="$BOOT_JDK"
26129  has_colon=`$ECHO $path | $GREP ^.:`
26130  new_path="$path"
26131  if test "x$has_colon" = x; then
26132    # Not in mixed or Windows style, start by that.
26133    new_path=`cmd //c echo $path`
26134  fi
26135
26136
26137  input_path="$new_path"
26138  # Check if we need to convert this using DOS-style short mode. If the path
26139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26140  # take no chances and rewrite it.
26141  # Note: m4 eats our [], so we need to use [ and ] instead.
26142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26143  if test "x$has_forbidden_chars" != x; then
26144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26146  fi
26147
26148
26149  windows_path="$new_path"
26150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26151    unix_path=`$CYGPATH -u "$windows_path"`
26152    new_path="$unix_path"
26153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26155    new_path="$unix_path"
26156  fi
26157
26158  if test "x$path" != "x$new_path"; then
26159    BOOT_JDK="$new_path"
26160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26162  fi
26163
26164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26166
26167    else
26168      # We're on a unix platform. Hooray! :)
26169      path="$BOOT_JDK"
26170      has_space=`$ECHO "$path" | $GREP " "`
26171      if test "x$has_space" != x; then
26172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26173$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26174        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26175      fi
26176
26177      # Use eval to expand a potential ~
26178      eval path="$path"
26179      if test ! -f "$path" && test ! -d "$path"; then
26180        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26181      fi
26182
26183      if test -d "$path"; then
26184        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26185      else
26186        dir="`$DIRNAME "$path"`"
26187        base="`$BASENAME "$path"`"
26188        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26189      fi
26190    fi
26191  fi
26192
26193            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26194$as_echo_n "checking for Boot JDK... " >&6; }
26195            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26196$as_echo "$BOOT_JDK" >&6; }
26197            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26198$as_echo_n "checking Boot JDK version... " >&6; }
26199            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26201$as_echo "$BOOT_JDK_VERSION" >&6; }
26202          fi # end check jdk version
26203        fi # end check javac
26204      fi # end check java
26205    fi # end check boot jdk found
26206  fi
26207
26208
26209  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26210
26211  if test "x$BOOT_JDK_FOUND" = xno; then
26212    # Now execute the test
26213
26214  # Extract the first word of "javac", so it can be a program name with args.
26215set dummy javac; ac_word=$2
26216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26217$as_echo_n "checking for $ac_word... " >&6; }
26218if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26219  $as_echo_n "(cached) " >&6
26220else
26221  case $JAVAC_CHECK in
26222  [\\/]* | ?:[\\/]*)
26223  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26224  ;;
26225  *)
26226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26227for as_dir in $PATH
26228do
26229  IFS=$as_save_IFS
26230  test -z "$as_dir" && as_dir=.
26231    for ac_exec_ext in '' $ac_executable_extensions; do
26232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26233    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26235    break 2
26236  fi
26237done
26238  done
26239IFS=$as_save_IFS
26240
26241  ;;
26242esac
26243fi
26244JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26245if test -n "$JAVAC_CHECK"; then
26246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26247$as_echo "$JAVAC_CHECK" >&6; }
26248else
26249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26250$as_echo "no" >&6; }
26251fi
26252
26253
26254  # Extract the first word of "java", so it can be a program name with args.
26255set dummy java; ac_word=$2
26256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26257$as_echo_n "checking for $ac_word... " >&6; }
26258if ${ac_cv_path_JAVA_CHECK+:} false; then :
26259  $as_echo_n "(cached) " >&6
26260else
26261  case $JAVA_CHECK in
26262  [\\/]* | ?:[\\/]*)
26263  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26264  ;;
26265  *)
26266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26267for as_dir in $PATH
26268do
26269  IFS=$as_save_IFS
26270  test -z "$as_dir" && as_dir=.
26271    for ac_exec_ext in '' $ac_executable_extensions; do
26272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26273    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26275    break 2
26276  fi
26277done
26278  done
26279IFS=$as_save_IFS
26280
26281  ;;
26282esac
26283fi
26284JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26285if test -n "$JAVA_CHECK"; then
26286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26287$as_echo "$JAVA_CHECK" >&6; }
26288else
26289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26290$as_echo "no" >&6; }
26291fi
26292
26293
26294  BINARY="$JAVAC_CHECK"
26295  if test "x$JAVAC_CHECK" = x; then
26296    BINARY="$JAVA_CHECK"
26297  fi
26298  if test "x$BINARY" != x; then
26299    # So there is a java(c) binary, it might be part of a JDK.
26300    # Lets find the JDK/JRE directory by following symbolic links.
26301    # Linux/GNU systems often have links from /usr/bin/java to
26302    # /etc/alternatives/java to the real JDK binary.
26303
26304  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26305    # Follow a chain of symbolic links. Use readlink
26306    # where it exists, else fall back to horribly
26307    # complicated shell code.
26308    if test "x$READLINK_TESTED" != yes; then
26309      # On MacOSX there is a readlink tool with a different
26310      # purpose than the GNU readlink tool. Check the found readlink.
26311      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26312      if test "x$ISGNU" = x; then
26313        # A readlink that we do not know how to use.
26314        # Are there other non-GNU readlinks out there?
26315        READLINK_TESTED=yes
26316        READLINK=
26317      fi
26318    fi
26319
26320    if test "x$READLINK" != x; then
26321      BINARY=`$READLINK -f $BINARY`
26322    else
26323      # Save the current directory for restoring afterwards
26324      STARTDIR=$PWD
26325      COUNTER=0
26326      sym_link_dir=`$DIRNAME $BINARY`
26327      sym_link_file=`$BASENAME $BINARY`
26328      cd $sym_link_dir
26329      # Use -P flag to resolve symlinks in directories.
26330      cd `$THEPWDCMD -P`
26331      sym_link_dir=`$THEPWDCMD -P`
26332      # Resolve file symlinks
26333      while test $COUNTER -lt 20; do
26334        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26335        if test "x$ISLINK" == x; then
26336          # This is not a symbolic link! We are done!
26337          break
26338        fi
26339        # Again resolve directory symlinks since the target of the just found
26340        # link could be in a different directory
26341        cd `$DIRNAME $ISLINK`
26342        sym_link_dir=`$THEPWDCMD -P`
26343        sym_link_file=`$BASENAME $ISLINK`
26344        let COUNTER=COUNTER+1
26345      done
26346      cd $STARTDIR
26347      BINARY=$sym_link_dir/$sym_link_file
26348    fi
26349  fi
26350
26351    BOOT_JDK=`dirname "$BINARY"`
26352    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26353    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26354      # Looks like we found ourselves an JDK
26355      BOOT_JDK_FOUND=maybe
26356      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26357$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26358    fi
26359  fi
26360
26361
26362    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26363    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26364      # Do we have a bin/java?
26365      if test ! -x "$BOOT_JDK/bin/java"; then
26366        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26368        BOOT_JDK_FOUND=no
26369      else
26370        # Do we have a bin/javac?
26371        if test ! -x "$BOOT_JDK/bin/javac"; then
26372          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26374          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26375$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26376          BOOT_JDK_FOUND=no
26377        else
26378          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26379          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26380
26381          # Extra M4 quote needed to protect [] in grep expression.
26382          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26383          if test "x$FOUND_CORRECT_VERSION" = x; then
26384            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26386            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26387$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26388            BOOT_JDK_FOUND=no
26389          else
26390            # We're done! :-)
26391            BOOT_JDK_FOUND=yes
26392
26393  # Only process if variable expands to non-empty
26394
26395  if test "x$BOOT_JDK" != x; then
26396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26397
26398  # Input might be given as Windows format, start by converting to
26399  # unix format.
26400  path="$BOOT_JDK"
26401  new_path=`$CYGPATH -u "$path"`
26402
26403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26406  # "foo.exe" is OK but "foo" is an error.
26407  #
26408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26409  # It is also a way to make sure we got the proper file name for the real test later on.
26410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26411  if test "x$test_shortpath" = x; then
26412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26413$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26414    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26415  fi
26416
26417  # Call helper function which possibly converts this using DOS-style short mode.
26418  # If so, the updated path is stored in $new_path.
26419
26420  input_path="$new_path"
26421  # Check if we need to convert this using DOS-style short mode. If the path
26422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26423  # take no chances and rewrite it.
26424  # Note: m4 eats our [], so we need to use [ and ] instead.
26425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26426  if test "x$has_forbidden_chars" != x; then
26427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26431      # Going to short mode and back again did indeed matter. Since short mode is
26432      # case insensitive, let's make it lowercase to improve readability.
26433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26434      # Now convert it back to Unix-style (cygpath)
26435      input_path=`$CYGPATH -u "$shortmode_path"`
26436      new_path="$input_path"
26437    fi
26438  fi
26439
26440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26441  if test "x$test_cygdrive_prefix" = x; then
26442    # As a simple fix, exclude /usr/bin since it's not a real path.
26443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26445      # a path prefixed by /cygdrive for fixpath to work.
26446      new_path="$CYGWIN_ROOT_PATH$input_path"
26447    fi
26448  fi
26449
26450
26451  if test "x$path" != "x$new_path"; then
26452    BOOT_JDK="$new_path"
26453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26455  fi
26456
26457    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26458
26459  path="$BOOT_JDK"
26460  has_colon=`$ECHO $path | $GREP ^.:`
26461  new_path="$path"
26462  if test "x$has_colon" = x; then
26463    # Not in mixed or Windows style, start by that.
26464    new_path=`cmd //c echo $path`
26465  fi
26466
26467
26468  input_path="$new_path"
26469  # Check if we need to convert this using DOS-style short mode. If the path
26470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26471  # take no chances and rewrite it.
26472  # Note: m4 eats our [], so we need to use [ and ] instead.
26473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26474  if test "x$has_forbidden_chars" != x; then
26475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26477  fi
26478
26479
26480  windows_path="$new_path"
26481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26482    unix_path=`$CYGPATH -u "$windows_path"`
26483    new_path="$unix_path"
26484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26486    new_path="$unix_path"
26487  fi
26488
26489  if test "x$path" != "x$new_path"; then
26490    BOOT_JDK="$new_path"
26491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26493  fi
26494
26495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26497
26498    else
26499      # We're on a unix platform. Hooray! :)
26500      path="$BOOT_JDK"
26501      has_space=`$ECHO "$path" | $GREP " "`
26502      if test "x$has_space" != x; then
26503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26504$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26505        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26506      fi
26507
26508      # Use eval to expand a potential ~
26509      eval path="$path"
26510      if test ! -f "$path" && test ! -d "$path"; then
26511        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26512      fi
26513
26514      if test -d "$path"; then
26515        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26516      else
26517        dir="`$DIRNAME "$path"`"
26518        base="`$BASENAME "$path"`"
26519        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26520      fi
26521    fi
26522  fi
26523
26524            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26525$as_echo_n "checking for Boot JDK... " >&6; }
26526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26527$as_echo "$BOOT_JDK" >&6; }
26528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26529$as_echo_n "checking Boot JDK version... " >&6; }
26530            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26532$as_echo "$BOOT_JDK_VERSION" >&6; }
26533          fi # end check jdk version
26534        fi # end check javac
26535      fi # end check java
26536    fi # end check boot jdk found
26537  fi
26538
26539
26540  # Test: Is there a JDK installed in default, well-known locations?
26541
26542  if test "x$BOOT_JDK_FOUND" = xno; then
26543    # Now execute the test
26544
26545  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26546
26547  if test "x$BOOT_JDK_FOUND" = xno; then
26548    # Now execute the test
26549
26550  if test "x$ProgramW6432" != x; then
26551    VIRTUAL_DIR="$ProgramW6432/Java"
26552
26553  windows_path="$VIRTUAL_DIR"
26554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26555    unix_path=`$CYGPATH -u "$windows_path"`
26556    VIRTUAL_DIR="$unix_path"
26557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26559    VIRTUAL_DIR="$unix_path"
26560  fi
26561
26562
26563  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26564  BOOT_JDK_SUFFIX=""
26565  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26566  if test "x$ALL_JDKS_FOUND" != x; then
26567    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26568
26569  if test "x$BOOT_JDK_FOUND" = xno; then
26570    # Now execute the test
26571
26572        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26573        if test -d "$BOOT_JDK"; then
26574          BOOT_JDK_FOUND=maybe
26575          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26576$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26577        fi
26578
26579
26580    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26581    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26582      # Do we have a bin/java?
26583      if test ! -x "$BOOT_JDK/bin/java"; then
26584        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26586        BOOT_JDK_FOUND=no
26587      else
26588        # Do we have a bin/javac?
26589        if test ! -x "$BOOT_JDK/bin/javac"; then
26590          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26592          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26593$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26594          BOOT_JDK_FOUND=no
26595        else
26596          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26597          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26598
26599          # Extra M4 quote needed to protect [] in grep expression.
26600          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26601          if test "x$FOUND_CORRECT_VERSION" = x; then
26602            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26604            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26605$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26606            BOOT_JDK_FOUND=no
26607          else
26608            # We're done! :-)
26609            BOOT_JDK_FOUND=yes
26610
26611  # Only process if variable expands to non-empty
26612
26613  if test "x$BOOT_JDK" != x; then
26614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26615
26616  # Input might be given as Windows format, start by converting to
26617  # unix format.
26618  path="$BOOT_JDK"
26619  new_path=`$CYGPATH -u "$path"`
26620
26621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26624  # "foo.exe" is OK but "foo" is an error.
26625  #
26626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26627  # It is also a way to make sure we got the proper file name for the real test later on.
26628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26629  if test "x$test_shortpath" = x; then
26630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26632    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26633  fi
26634
26635  # Call helper function which possibly converts this using DOS-style short mode.
26636  # If so, the updated path is stored in $new_path.
26637
26638  input_path="$new_path"
26639  # Check if we need to convert this using DOS-style short mode. If the path
26640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26641  # take no chances and rewrite it.
26642  # Note: m4 eats our [], so we need to use [ and ] instead.
26643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26644  if test "x$has_forbidden_chars" != x; then
26645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26649      # Going to short mode and back again did indeed matter. Since short mode is
26650      # case insensitive, let's make it lowercase to improve readability.
26651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26652      # Now convert it back to Unix-style (cygpath)
26653      input_path=`$CYGPATH -u "$shortmode_path"`
26654      new_path="$input_path"
26655    fi
26656  fi
26657
26658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26659  if test "x$test_cygdrive_prefix" = x; then
26660    # As a simple fix, exclude /usr/bin since it's not a real path.
26661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26663      # a path prefixed by /cygdrive for fixpath to work.
26664      new_path="$CYGWIN_ROOT_PATH$input_path"
26665    fi
26666  fi
26667
26668
26669  if test "x$path" != "x$new_path"; then
26670    BOOT_JDK="$new_path"
26671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26672$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26673  fi
26674
26675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26676
26677  path="$BOOT_JDK"
26678  has_colon=`$ECHO $path | $GREP ^.:`
26679  new_path="$path"
26680  if test "x$has_colon" = x; then
26681    # Not in mixed or Windows style, start by that.
26682    new_path=`cmd //c echo $path`
26683  fi
26684
26685
26686  input_path="$new_path"
26687  # Check if we need to convert this using DOS-style short mode. If the path
26688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26689  # take no chances and rewrite it.
26690  # Note: m4 eats our [], so we need to use [ and ] instead.
26691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26692  if test "x$has_forbidden_chars" != x; then
26693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26695  fi
26696
26697
26698  windows_path="$new_path"
26699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26700    unix_path=`$CYGPATH -u "$windows_path"`
26701    new_path="$unix_path"
26702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26704    new_path="$unix_path"
26705  fi
26706
26707  if test "x$path" != "x$new_path"; then
26708    BOOT_JDK="$new_path"
26709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26710$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26711  fi
26712
26713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26715
26716    else
26717      # We're on a unix platform. Hooray! :)
26718      path="$BOOT_JDK"
26719      has_space=`$ECHO "$path" | $GREP " "`
26720      if test "x$has_space" != x; then
26721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26722$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26723        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26724      fi
26725
26726      # Use eval to expand a potential ~
26727      eval path="$path"
26728      if test ! -f "$path" && test ! -d "$path"; then
26729        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26730      fi
26731
26732      if test -d "$path"; then
26733        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26734      else
26735        dir="`$DIRNAME "$path"`"
26736        base="`$BASENAME "$path"`"
26737        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26738      fi
26739    fi
26740  fi
26741
26742            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26743$as_echo_n "checking for Boot JDK... " >&6; }
26744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26745$as_echo "$BOOT_JDK" >&6; }
26746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26747$as_echo_n "checking Boot JDK version... " >&6; }
26748            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26750$as_echo "$BOOT_JDK_VERSION" >&6; }
26751          fi # end check jdk version
26752        fi # end check javac
26753      fi # end check java
26754    fi # end check boot jdk found
26755  fi
26756
26757    done
26758  fi
26759
26760  fi
26761
26762
26763    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26764    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26765      # Do we have a bin/java?
26766      if test ! -x "$BOOT_JDK/bin/java"; then
26767        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26769        BOOT_JDK_FOUND=no
26770      else
26771        # Do we have a bin/javac?
26772        if test ! -x "$BOOT_JDK/bin/javac"; then
26773          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26775          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26776$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26777          BOOT_JDK_FOUND=no
26778        else
26779          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26780          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26781
26782          # Extra M4 quote needed to protect [] in grep expression.
26783          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26784          if test "x$FOUND_CORRECT_VERSION" = x; then
26785            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26787            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26788$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26789            BOOT_JDK_FOUND=no
26790          else
26791            # We're done! :-)
26792            BOOT_JDK_FOUND=yes
26793
26794  # Only process if variable expands to non-empty
26795
26796  if test "x$BOOT_JDK" != x; then
26797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26798
26799  # Input might be given as Windows format, start by converting to
26800  # unix format.
26801  path="$BOOT_JDK"
26802  new_path=`$CYGPATH -u "$path"`
26803
26804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26807  # "foo.exe" is OK but "foo" is an error.
26808  #
26809  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26810  # It is also a way to make sure we got the proper file name for the real test later on.
26811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26812  if test "x$test_shortpath" = x; then
26813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26814$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26815    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26816  fi
26817
26818  # Call helper function which possibly converts this using DOS-style short mode.
26819  # If so, the updated path is stored in $new_path.
26820
26821  input_path="$new_path"
26822  # Check if we need to convert this using DOS-style short mode. If the path
26823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26824  # take no chances and rewrite it.
26825  # Note: m4 eats our [], so we need to use [ and ] instead.
26826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26827  if test "x$has_forbidden_chars" != x; then
26828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26832      # Going to short mode and back again did indeed matter. Since short mode is
26833      # case insensitive, let's make it lowercase to improve readability.
26834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26835      # Now convert it back to Unix-style (cygpath)
26836      input_path=`$CYGPATH -u "$shortmode_path"`
26837      new_path="$input_path"
26838    fi
26839  fi
26840
26841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26842  if test "x$test_cygdrive_prefix" = x; then
26843    # As a simple fix, exclude /usr/bin since it's not a real path.
26844    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26846      # a path prefixed by /cygdrive for fixpath to work.
26847      new_path="$CYGWIN_ROOT_PATH$input_path"
26848    fi
26849  fi
26850
26851
26852  if test "x$path" != "x$new_path"; then
26853    BOOT_JDK="$new_path"
26854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26855$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26856  fi
26857
26858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26859
26860  path="$BOOT_JDK"
26861  has_colon=`$ECHO $path | $GREP ^.:`
26862  new_path="$path"
26863  if test "x$has_colon" = x; then
26864    # Not in mixed or Windows style, start by that.
26865    new_path=`cmd //c echo $path`
26866  fi
26867
26868
26869  input_path="$new_path"
26870  # Check if we need to convert this using DOS-style short mode. If the path
26871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26872  # take no chances and rewrite it.
26873  # Note: m4 eats our [], so we need to use [ and ] instead.
26874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26875  if test "x$has_forbidden_chars" != x; then
26876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26878  fi
26879
26880
26881  windows_path="$new_path"
26882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26883    unix_path=`$CYGPATH -u "$windows_path"`
26884    new_path="$unix_path"
26885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26887    new_path="$unix_path"
26888  fi
26889
26890  if test "x$path" != "x$new_path"; then
26891    BOOT_JDK="$new_path"
26892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26894  fi
26895
26896  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26897  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26898
26899    else
26900      # We're on a unix platform. Hooray! :)
26901      path="$BOOT_JDK"
26902      has_space=`$ECHO "$path" | $GREP " "`
26903      if test "x$has_space" != x; then
26904        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26905$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26906        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26907      fi
26908
26909      # Use eval to expand a potential ~
26910      eval path="$path"
26911      if test ! -f "$path" && test ! -d "$path"; then
26912        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26913      fi
26914
26915      if test -d "$path"; then
26916        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26917      else
26918        dir="`$DIRNAME "$path"`"
26919        base="`$BASENAME "$path"`"
26920        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26921      fi
26922    fi
26923  fi
26924
26925            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26926$as_echo_n "checking for Boot JDK... " >&6; }
26927            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26928$as_echo "$BOOT_JDK" >&6; }
26929            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26930$as_echo_n "checking Boot JDK version... " >&6; }
26931            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26933$as_echo "$BOOT_JDK_VERSION" >&6; }
26934          fi # end check jdk version
26935        fi # end check javac
26936      fi # end check java
26937    fi # end check boot jdk found
26938  fi
26939
26940
26941  if test "x$BOOT_JDK_FOUND" = xno; then
26942    # Now execute the test
26943
26944  if test "x$PROGRAMW6432" != x; then
26945    VIRTUAL_DIR="$PROGRAMW6432/Java"
26946
26947  windows_path="$VIRTUAL_DIR"
26948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26949    unix_path=`$CYGPATH -u "$windows_path"`
26950    VIRTUAL_DIR="$unix_path"
26951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26953    VIRTUAL_DIR="$unix_path"
26954  fi
26955
26956
26957  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26958  BOOT_JDK_SUFFIX=""
26959  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26960  if test "x$ALL_JDKS_FOUND" != x; then
26961    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26962
26963  if test "x$BOOT_JDK_FOUND" = xno; then
26964    # Now execute the test
26965
26966        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26967        if test -d "$BOOT_JDK"; then
26968          BOOT_JDK_FOUND=maybe
26969          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26970$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26971        fi
26972
26973
26974    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26975    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26976      # Do we have a bin/java?
26977      if test ! -x "$BOOT_JDK/bin/java"; then
26978        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26980        BOOT_JDK_FOUND=no
26981      else
26982        # Do we have a bin/javac?
26983        if test ! -x "$BOOT_JDK/bin/javac"; then
26984          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26986          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26987$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26988          BOOT_JDK_FOUND=no
26989        else
26990          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26991          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26992
26993          # Extra M4 quote needed to protect [] in grep expression.
26994          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26995          if test "x$FOUND_CORRECT_VERSION" = x; then
26996            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26997$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26998            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26999$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27000            BOOT_JDK_FOUND=no
27001          else
27002            # We're done! :-)
27003            BOOT_JDK_FOUND=yes
27004
27005  # Only process if variable expands to non-empty
27006
27007  if test "x$BOOT_JDK" != x; then
27008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27009
27010  # Input might be given as Windows format, start by converting to
27011  # unix format.
27012  path="$BOOT_JDK"
27013  new_path=`$CYGPATH -u "$path"`
27014
27015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27018  # "foo.exe" is OK but "foo" is an error.
27019  #
27020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27021  # It is also a way to make sure we got the proper file name for the real test later on.
27022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27023  if test "x$test_shortpath" = x; then
27024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27025$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27026    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27027  fi
27028
27029  # Call helper function which possibly converts this using DOS-style short mode.
27030  # If so, the updated path is stored in $new_path.
27031
27032  input_path="$new_path"
27033  # Check if we need to convert this using DOS-style short mode. If the path
27034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27035  # take no chances and rewrite it.
27036  # Note: m4 eats our [], so we need to use [ and ] instead.
27037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27038  if test "x$has_forbidden_chars" != x; then
27039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27043      # Going to short mode and back again did indeed matter. Since short mode is
27044      # case insensitive, let's make it lowercase to improve readability.
27045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27046      # Now convert it back to Unix-style (cygpath)
27047      input_path=`$CYGPATH -u "$shortmode_path"`
27048      new_path="$input_path"
27049    fi
27050  fi
27051
27052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27053  if test "x$test_cygdrive_prefix" = x; then
27054    # As a simple fix, exclude /usr/bin since it's not a real path.
27055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27057      # a path prefixed by /cygdrive for fixpath to work.
27058      new_path="$CYGWIN_ROOT_PATH$input_path"
27059    fi
27060  fi
27061
27062
27063  if test "x$path" != "x$new_path"; then
27064    BOOT_JDK="$new_path"
27065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27066$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27067  fi
27068
27069    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27070
27071  path="$BOOT_JDK"
27072  has_colon=`$ECHO $path | $GREP ^.:`
27073  new_path="$path"
27074  if test "x$has_colon" = x; then
27075    # Not in mixed or Windows style, start by that.
27076    new_path=`cmd //c echo $path`
27077  fi
27078
27079
27080  input_path="$new_path"
27081  # Check if we need to convert this using DOS-style short mode. If the path
27082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27083  # take no chances and rewrite it.
27084  # Note: m4 eats our [], so we need to use [ and ] instead.
27085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27086  if test "x$has_forbidden_chars" != x; then
27087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27089  fi
27090
27091
27092  windows_path="$new_path"
27093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27094    unix_path=`$CYGPATH -u "$windows_path"`
27095    new_path="$unix_path"
27096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27098    new_path="$unix_path"
27099  fi
27100
27101  if test "x$path" != "x$new_path"; then
27102    BOOT_JDK="$new_path"
27103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27105  fi
27106
27107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27109
27110    else
27111      # We're on a unix platform. Hooray! :)
27112      path="$BOOT_JDK"
27113      has_space=`$ECHO "$path" | $GREP " "`
27114      if test "x$has_space" != x; then
27115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27116$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27117        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27118      fi
27119
27120      # Use eval to expand a potential ~
27121      eval path="$path"
27122      if test ! -f "$path" && test ! -d "$path"; then
27123        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27124      fi
27125
27126      if test -d "$path"; then
27127        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27128      else
27129        dir="`$DIRNAME "$path"`"
27130        base="`$BASENAME "$path"`"
27131        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27132      fi
27133    fi
27134  fi
27135
27136            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27137$as_echo_n "checking for Boot JDK... " >&6; }
27138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27139$as_echo "$BOOT_JDK" >&6; }
27140            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27141$as_echo_n "checking Boot JDK version... " >&6; }
27142            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27144$as_echo "$BOOT_JDK_VERSION" >&6; }
27145          fi # end check jdk version
27146        fi # end check javac
27147      fi # end check java
27148    fi # end check boot jdk found
27149  fi
27150
27151    done
27152  fi
27153
27154  fi
27155
27156
27157    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27158    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27159      # Do we have a bin/java?
27160      if test ! -x "$BOOT_JDK/bin/java"; then
27161        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27163        BOOT_JDK_FOUND=no
27164      else
27165        # Do we have a bin/javac?
27166        if test ! -x "$BOOT_JDK/bin/javac"; then
27167          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27169          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27170$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27171          BOOT_JDK_FOUND=no
27172        else
27173          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27174          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27175
27176          # Extra M4 quote needed to protect [] in grep expression.
27177          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27178          if test "x$FOUND_CORRECT_VERSION" = x; then
27179            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27181            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27182$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27183            BOOT_JDK_FOUND=no
27184          else
27185            # We're done! :-)
27186            BOOT_JDK_FOUND=yes
27187
27188  # Only process if variable expands to non-empty
27189
27190  if test "x$BOOT_JDK" != x; then
27191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27192
27193  # Input might be given as Windows format, start by converting to
27194  # unix format.
27195  path="$BOOT_JDK"
27196  new_path=`$CYGPATH -u "$path"`
27197
27198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27201  # "foo.exe" is OK but "foo" is an error.
27202  #
27203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27204  # It is also a way to make sure we got the proper file name for the real test later on.
27205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27206  if test "x$test_shortpath" = x; then
27207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27208$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27209    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27210  fi
27211
27212  # Call helper function which possibly converts this using DOS-style short mode.
27213  # If so, the updated path is stored in $new_path.
27214
27215  input_path="$new_path"
27216  # Check if we need to convert this using DOS-style short mode. If the path
27217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27218  # take no chances and rewrite it.
27219  # Note: m4 eats our [], so we need to use [ and ] instead.
27220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27221  if test "x$has_forbidden_chars" != x; then
27222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27226      # Going to short mode and back again did indeed matter. Since short mode is
27227      # case insensitive, let's make it lowercase to improve readability.
27228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27229      # Now convert it back to Unix-style (cygpath)
27230      input_path=`$CYGPATH -u "$shortmode_path"`
27231      new_path="$input_path"
27232    fi
27233  fi
27234
27235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27236  if test "x$test_cygdrive_prefix" = x; then
27237    # As a simple fix, exclude /usr/bin since it's not a real path.
27238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27240      # a path prefixed by /cygdrive for fixpath to work.
27241      new_path="$CYGWIN_ROOT_PATH$input_path"
27242    fi
27243  fi
27244
27245
27246  if test "x$path" != "x$new_path"; then
27247    BOOT_JDK="$new_path"
27248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27249$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27250  fi
27251
27252    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27253
27254  path="$BOOT_JDK"
27255  has_colon=`$ECHO $path | $GREP ^.:`
27256  new_path="$path"
27257  if test "x$has_colon" = x; then
27258    # Not in mixed or Windows style, start by that.
27259    new_path=`cmd //c echo $path`
27260  fi
27261
27262
27263  input_path="$new_path"
27264  # Check if we need to convert this using DOS-style short mode. If the path
27265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27266  # take no chances and rewrite it.
27267  # Note: m4 eats our [], so we need to use [ and ] instead.
27268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27269  if test "x$has_forbidden_chars" != x; then
27270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27272  fi
27273
27274
27275  windows_path="$new_path"
27276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27277    unix_path=`$CYGPATH -u "$windows_path"`
27278    new_path="$unix_path"
27279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27281    new_path="$unix_path"
27282  fi
27283
27284  if test "x$path" != "x$new_path"; then
27285    BOOT_JDK="$new_path"
27286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27287$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27288  fi
27289
27290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27292
27293    else
27294      # We're on a unix platform. Hooray! :)
27295      path="$BOOT_JDK"
27296      has_space=`$ECHO "$path" | $GREP " "`
27297      if test "x$has_space" != x; then
27298        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27299$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27300        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27301      fi
27302
27303      # Use eval to expand a potential ~
27304      eval path="$path"
27305      if test ! -f "$path" && test ! -d "$path"; then
27306        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27307      fi
27308
27309      if test -d "$path"; then
27310        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27311      else
27312        dir="`$DIRNAME "$path"`"
27313        base="`$BASENAME "$path"`"
27314        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27315      fi
27316    fi
27317  fi
27318
27319            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27320$as_echo_n "checking for Boot JDK... " >&6; }
27321            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27322$as_echo "$BOOT_JDK" >&6; }
27323            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27324$as_echo_n "checking Boot JDK version... " >&6; }
27325            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27326            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27327$as_echo "$BOOT_JDK_VERSION" >&6; }
27328          fi # end check jdk version
27329        fi # end check javac
27330      fi # end check java
27331    fi # end check boot jdk found
27332  fi
27333
27334
27335  if test "x$BOOT_JDK_FOUND" = xno; then
27336    # Now execute the test
27337
27338  if test "x$PROGRAMFILES" != x; then
27339    VIRTUAL_DIR="$PROGRAMFILES/Java"
27340
27341  windows_path="$VIRTUAL_DIR"
27342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27343    unix_path=`$CYGPATH -u "$windows_path"`
27344    VIRTUAL_DIR="$unix_path"
27345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27347    VIRTUAL_DIR="$unix_path"
27348  fi
27349
27350
27351  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27352  BOOT_JDK_SUFFIX=""
27353  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27354  if test "x$ALL_JDKS_FOUND" != x; then
27355    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27356
27357  if test "x$BOOT_JDK_FOUND" = xno; then
27358    # Now execute the test
27359
27360        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27361        if test -d "$BOOT_JDK"; then
27362          BOOT_JDK_FOUND=maybe
27363          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27364$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27365        fi
27366
27367
27368    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27369    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27370      # Do we have a bin/java?
27371      if test ! -x "$BOOT_JDK/bin/java"; then
27372        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27374        BOOT_JDK_FOUND=no
27375      else
27376        # Do we have a bin/javac?
27377        if test ! -x "$BOOT_JDK/bin/javac"; then
27378          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27380          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27381$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27382          BOOT_JDK_FOUND=no
27383        else
27384          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27385          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27386
27387          # Extra M4 quote needed to protect [] in grep expression.
27388          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27389          if test "x$FOUND_CORRECT_VERSION" = x; then
27390            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27392            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27393$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27394            BOOT_JDK_FOUND=no
27395          else
27396            # We're done! :-)
27397            BOOT_JDK_FOUND=yes
27398
27399  # Only process if variable expands to non-empty
27400
27401  if test "x$BOOT_JDK" != x; then
27402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27403
27404  # Input might be given as Windows format, start by converting to
27405  # unix format.
27406  path="$BOOT_JDK"
27407  new_path=`$CYGPATH -u "$path"`
27408
27409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27412  # "foo.exe" is OK but "foo" is an error.
27413  #
27414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27415  # It is also a way to make sure we got the proper file name for the real test later on.
27416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27417  if test "x$test_shortpath" = x; then
27418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27420    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27421  fi
27422
27423  # Call helper function which possibly converts this using DOS-style short mode.
27424  # If so, the updated path is stored in $new_path.
27425
27426  input_path="$new_path"
27427  # Check if we need to convert this using DOS-style short mode. If the path
27428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27429  # take no chances and rewrite it.
27430  # Note: m4 eats our [], so we need to use [ and ] instead.
27431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27432  if test "x$has_forbidden_chars" != x; then
27433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27437      # Going to short mode and back again did indeed matter. Since short mode is
27438      # case insensitive, let's make it lowercase to improve readability.
27439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27440      # Now convert it back to Unix-style (cygpath)
27441      input_path=`$CYGPATH -u "$shortmode_path"`
27442      new_path="$input_path"
27443    fi
27444  fi
27445
27446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27447  if test "x$test_cygdrive_prefix" = x; then
27448    # As a simple fix, exclude /usr/bin since it's not a real path.
27449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27451      # a path prefixed by /cygdrive for fixpath to work.
27452      new_path="$CYGWIN_ROOT_PATH$input_path"
27453    fi
27454  fi
27455
27456
27457  if test "x$path" != "x$new_path"; then
27458    BOOT_JDK="$new_path"
27459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27461  fi
27462
27463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27464
27465  path="$BOOT_JDK"
27466  has_colon=`$ECHO $path | $GREP ^.:`
27467  new_path="$path"
27468  if test "x$has_colon" = x; then
27469    # Not in mixed or Windows style, start by that.
27470    new_path=`cmd //c echo $path`
27471  fi
27472
27473
27474  input_path="$new_path"
27475  # Check if we need to convert this using DOS-style short mode. If the path
27476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27477  # take no chances and rewrite it.
27478  # Note: m4 eats our [], so we need to use [ and ] instead.
27479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27480  if test "x$has_forbidden_chars" != x; then
27481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27483  fi
27484
27485
27486  windows_path="$new_path"
27487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27488    unix_path=`$CYGPATH -u "$windows_path"`
27489    new_path="$unix_path"
27490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27492    new_path="$unix_path"
27493  fi
27494
27495  if test "x$path" != "x$new_path"; then
27496    BOOT_JDK="$new_path"
27497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27499  fi
27500
27501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27503
27504    else
27505      # We're on a unix platform. Hooray! :)
27506      path="$BOOT_JDK"
27507      has_space=`$ECHO "$path" | $GREP " "`
27508      if test "x$has_space" != x; then
27509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27510$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27511        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27512      fi
27513
27514      # Use eval to expand a potential ~
27515      eval path="$path"
27516      if test ! -f "$path" && test ! -d "$path"; then
27517        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27518      fi
27519
27520      if test -d "$path"; then
27521        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27522      else
27523        dir="`$DIRNAME "$path"`"
27524        base="`$BASENAME "$path"`"
27525        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27526      fi
27527    fi
27528  fi
27529
27530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27531$as_echo_n "checking for Boot JDK... " >&6; }
27532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27533$as_echo "$BOOT_JDK" >&6; }
27534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27535$as_echo_n "checking Boot JDK version... " >&6; }
27536            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27538$as_echo "$BOOT_JDK_VERSION" >&6; }
27539          fi # end check jdk version
27540        fi # end check javac
27541      fi # end check java
27542    fi # end check boot jdk found
27543  fi
27544
27545    done
27546  fi
27547
27548  fi
27549
27550
27551    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27552    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27553      # Do we have a bin/java?
27554      if test ! -x "$BOOT_JDK/bin/java"; then
27555        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27557        BOOT_JDK_FOUND=no
27558      else
27559        # Do we have a bin/javac?
27560        if test ! -x "$BOOT_JDK/bin/javac"; then
27561          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27563          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27564$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27565          BOOT_JDK_FOUND=no
27566        else
27567          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27568          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27569
27570          # Extra M4 quote needed to protect [] in grep expression.
27571          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27572          if test "x$FOUND_CORRECT_VERSION" = x; then
27573            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27575            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27576$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27577            BOOT_JDK_FOUND=no
27578          else
27579            # We're done! :-)
27580            BOOT_JDK_FOUND=yes
27581
27582  # Only process if variable expands to non-empty
27583
27584  if test "x$BOOT_JDK" != x; then
27585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27586
27587  # Input might be given as Windows format, start by converting to
27588  # unix format.
27589  path="$BOOT_JDK"
27590  new_path=`$CYGPATH -u "$path"`
27591
27592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27595  # "foo.exe" is OK but "foo" is an error.
27596  #
27597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27598  # It is also a way to make sure we got the proper file name for the real test later on.
27599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27600  if test "x$test_shortpath" = x; then
27601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27602$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27603    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27604  fi
27605
27606  # Call helper function which possibly converts this using DOS-style short mode.
27607  # If so, the updated path is stored in $new_path.
27608
27609  input_path="$new_path"
27610  # Check if we need to convert this using DOS-style short mode. If the path
27611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27612  # take no chances and rewrite it.
27613  # Note: m4 eats our [], so we need to use [ and ] instead.
27614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27615  if test "x$has_forbidden_chars" != x; then
27616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27620      # Going to short mode and back again did indeed matter. Since short mode is
27621      # case insensitive, let's make it lowercase to improve readability.
27622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27623      # Now convert it back to Unix-style (cygpath)
27624      input_path=`$CYGPATH -u "$shortmode_path"`
27625      new_path="$input_path"
27626    fi
27627  fi
27628
27629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27630  if test "x$test_cygdrive_prefix" = x; then
27631    # As a simple fix, exclude /usr/bin since it's not a real path.
27632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27634      # a path prefixed by /cygdrive for fixpath to work.
27635      new_path="$CYGWIN_ROOT_PATH$input_path"
27636    fi
27637  fi
27638
27639
27640  if test "x$path" != "x$new_path"; then
27641    BOOT_JDK="$new_path"
27642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27643$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27644  fi
27645
27646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27647
27648  path="$BOOT_JDK"
27649  has_colon=`$ECHO $path | $GREP ^.:`
27650  new_path="$path"
27651  if test "x$has_colon" = x; then
27652    # Not in mixed or Windows style, start by that.
27653    new_path=`cmd //c echo $path`
27654  fi
27655
27656
27657  input_path="$new_path"
27658  # Check if we need to convert this using DOS-style short mode. If the path
27659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27660  # take no chances and rewrite it.
27661  # Note: m4 eats our [], so we need to use [ and ] instead.
27662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27663  if test "x$has_forbidden_chars" != x; then
27664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27666  fi
27667
27668
27669  windows_path="$new_path"
27670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27671    unix_path=`$CYGPATH -u "$windows_path"`
27672    new_path="$unix_path"
27673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27675    new_path="$unix_path"
27676  fi
27677
27678  if test "x$path" != "x$new_path"; then
27679    BOOT_JDK="$new_path"
27680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27681$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27682  fi
27683
27684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27686
27687    else
27688      # We're on a unix platform. Hooray! :)
27689      path="$BOOT_JDK"
27690      has_space=`$ECHO "$path" | $GREP " "`
27691      if test "x$has_space" != x; then
27692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27693$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27694        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27695      fi
27696
27697      # Use eval to expand a potential ~
27698      eval path="$path"
27699      if test ! -f "$path" && test ! -d "$path"; then
27700        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27701      fi
27702
27703      if test -d "$path"; then
27704        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27705      else
27706        dir="`$DIRNAME "$path"`"
27707        base="`$BASENAME "$path"`"
27708        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27709      fi
27710    fi
27711  fi
27712
27713            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27714$as_echo_n "checking for Boot JDK... " >&6; }
27715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27716$as_echo "$BOOT_JDK" >&6; }
27717            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27718$as_echo_n "checking Boot JDK version... " >&6; }
27719            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27721$as_echo "$BOOT_JDK_VERSION" >&6; }
27722          fi # end check jdk version
27723        fi # end check javac
27724      fi # end check java
27725    fi # end check boot jdk found
27726  fi
27727
27728
27729  if test "x$BOOT_JDK_FOUND" = xno; then
27730    # Now execute the test
27731
27732  if test "x$ProgramFiles" != x; then
27733    VIRTUAL_DIR="$ProgramFiles/Java"
27734
27735  windows_path="$VIRTUAL_DIR"
27736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27737    unix_path=`$CYGPATH -u "$windows_path"`
27738    VIRTUAL_DIR="$unix_path"
27739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27741    VIRTUAL_DIR="$unix_path"
27742  fi
27743
27744
27745  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27746  BOOT_JDK_SUFFIX=""
27747  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27748  if test "x$ALL_JDKS_FOUND" != x; then
27749    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27750
27751  if test "x$BOOT_JDK_FOUND" = xno; then
27752    # Now execute the test
27753
27754        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27755        if test -d "$BOOT_JDK"; then
27756          BOOT_JDK_FOUND=maybe
27757          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27758$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27759        fi
27760
27761
27762    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27763    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27764      # Do we have a bin/java?
27765      if test ! -x "$BOOT_JDK/bin/java"; then
27766        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27768        BOOT_JDK_FOUND=no
27769      else
27770        # Do we have a bin/javac?
27771        if test ! -x "$BOOT_JDK/bin/javac"; then
27772          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27774          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27775$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27776          BOOT_JDK_FOUND=no
27777        else
27778          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27779          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27780
27781          # Extra M4 quote needed to protect [] in grep expression.
27782          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27783          if test "x$FOUND_CORRECT_VERSION" = x; then
27784            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27786            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27787$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27788            BOOT_JDK_FOUND=no
27789          else
27790            # We're done! :-)
27791            BOOT_JDK_FOUND=yes
27792
27793  # Only process if variable expands to non-empty
27794
27795  if test "x$BOOT_JDK" != x; then
27796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27797
27798  # Input might be given as Windows format, start by converting to
27799  # unix format.
27800  path="$BOOT_JDK"
27801  new_path=`$CYGPATH -u "$path"`
27802
27803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27806  # "foo.exe" is OK but "foo" is an error.
27807  #
27808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27809  # It is also a way to make sure we got the proper file name for the real test later on.
27810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27811  if test "x$test_shortpath" = x; then
27812    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27813$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27814    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27815  fi
27816
27817  # Call helper function which possibly converts this using DOS-style short mode.
27818  # If so, the updated path is stored in $new_path.
27819
27820  input_path="$new_path"
27821  # Check if we need to convert this using DOS-style short mode. If the path
27822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27823  # take no chances and rewrite it.
27824  # Note: m4 eats our [], so we need to use [ and ] instead.
27825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27826  if test "x$has_forbidden_chars" != x; then
27827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27831      # Going to short mode and back again did indeed matter. Since short mode is
27832      # case insensitive, let's make it lowercase to improve readability.
27833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27834      # Now convert it back to Unix-style (cygpath)
27835      input_path=`$CYGPATH -u "$shortmode_path"`
27836      new_path="$input_path"
27837    fi
27838  fi
27839
27840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27841  if test "x$test_cygdrive_prefix" = x; then
27842    # As a simple fix, exclude /usr/bin since it's not a real path.
27843    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27845      # a path prefixed by /cygdrive for fixpath to work.
27846      new_path="$CYGWIN_ROOT_PATH$input_path"
27847    fi
27848  fi
27849
27850
27851  if test "x$path" != "x$new_path"; then
27852    BOOT_JDK="$new_path"
27853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27854$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27855  fi
27856
27857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27858
27859  path="$BOOT_JDK"
27860  has_colon=`$ECHO $path | $GREP ^.:`
27861  new_path="$path"
27862  if test "x$has_colon" = x; then
27863    # Not in mixed or Windows style, start by that.
27864    new_path=`cmd //c echo $path`
27865  fi
27866
27867
27868  input_path="$new_path"
27869  # Check if we need to convert this using DOS-style short mode. If the path
27870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27871  # take no chances and rewrite it.
27872  # Note: m4 eats our [], so we need to use [ and ] instead.
27873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27874  if test "x$has_forbidden_chars" != x; then
27875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27877  fi
27878
27879
27880  windows_path="$new_path"
27881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27882    unix_path=`$CYGPATH -u "$windows_path"`
27883    new_path="$unix_path"
27884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27886    new_path="$unix_path"
27887  fi
27888
27889  if test "x$path" != "x$new_path"; then
27890    BOOT_JDK="$new_path"
27891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27893  fi
27894
27895  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27896  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27897
27898    else
27899      # We're on a unix platform. Hooray! :)
27900      path="$BOOT_JDK"
27901      has_space=`$ECHO "$path" | $GREP " "`
27902      if test "x$has_space" != x; then
27903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27904$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27905        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27906      fi
27907
27908      # Use eval to expand a potential ~
27909      eval path="$path"
27910      if test ! -f "$path" && test ! -d "$path"; then
27911        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27912      fi
27913
27914      if test -d "$path"; then
27915        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27916      else
27917        dir="`$DIRNAME "$path"`"
27918        base="`$BASENAME "$path"`"
27919        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27920      fi
27921    fi
27922  fi
27923
27924            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27925$as_echo_n "checking for Boot JDK... " >&6; }
27926            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27927$as_echo "$BOOT_JDK" >&6; }
27928            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27929$as_echo_n "checking Boot JDK version... " >&6; }
27930            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27932$as_echo "$BOOT_JDK_VERSION" >&6; }
27933          fi # end check jdk version
27934        fi # end check javac
27935      fi # end check java
27936    fi # end check boot jdk found
27937  fi
27938
27939    done
27940  fi
27941
27942  fi
27943
27944
27945    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27946    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27947      # Do we have a bin/java?
27948      if test ! -x "$BOOT_JDK/bin/java"; then
27949        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27951        BOOT_JDK_FOUND=no
27952      else
27953        # Do we have a bin/javac?
27954        if test ! -x "$BOOT_JDK/bin/javac"; then
27955          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27957          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27958$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27959          BOOT_JDK_FOUND=no
27960        else
27961          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27962          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27963
27964          # Extra M4 quote needed to protect [] in grep expression.
27965          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27966          if test "x$FOUND_CORRECT_VERSION" = x; then
27967            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27969            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27970$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27971            BOOT_JDK_FOUND=no
27972          else
27973            # We're done! :-)
27974            BOOT_JDK_FOUND=yes
27975
27976  # Only process if variable expands to non-empty
27977
27978  if test "x$BOOT_JDK" != x; then
27979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27980
27981  # Input might be given as Windows format, start by converting to
27982  # unix format.
27983  path="$BOOT_JDK"
27984  new_path=`$CYGPATH -u "$path"`
27985
27986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27989  # "foo.exe" is OK but "foo" is an error.
27990  #
27991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27992  # It is also a way to make sure we got the proper file name for the real test later on.
27993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27994  if test "x$test_shortpath" = x; then
27995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27997    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27998  fi
27999
28000  # Call helper function which possibly converts this using DOS-style short mode.
28001  # If so, the updated path is stored in $new_path.
28002
28003  input_path="$new_path"
28004  # Check if we need to convert this using DOS-style short mode. If the path
28005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28006  # take no chances and rewrite it.
28007  # Note: m4 eats our [], so we need to use [ and ] instead.
28008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28009  if test "x$has_forbidden_chars" != x; then
28010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28014      # Going to short mode and back again did indeed matter. Since short mode is
28015      # case insensitive, let's make it lowercase to improve readability.
28016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28017      # Now convert it back to Unix-style (cygpath)
28018      input_path=`$CYGPATH -u "$shortmode_path"`
28019      new_path="$input_path"
28020    fi
28021  fi
28022
28023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28024  if test "x$test_cygdrive_prefix" = x; then
28025    # As a simple fix, exclude /usr/bin since it's not a real path.
28026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28028      # a path prefixed by /cygdrive for fixpath to work.
28029      new_path="$CYGWIN_ROOT_PATH$input_path"
28030    fi
28031  fi
28032
28033
28034  if test "x$path" != "x$new_path"; then
28035    BOOT_JDK="$new_path"
28036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28037$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28038  fi
28039
28040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28041
28042  path="$BOOT_JDK"
28043  has_colon=`$ECHO $path | $GREP ^.:`
28044  new_path="$path"
28045  if test "x$has_colon" = x; then
28046    # Not in mixed or Windows style, start by that.
28047    new_path=`cmd //c echo $path`
28048  fi
28049
28050
28051  input_path="$new_path"
28052  # Check if we need to convert this using DOS-style short mode. If the path
28053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28054  # take no chances and rewrite it.
28055  # Note: m4 eats our [], so we need to use [ and ] instead.
28056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28057  if test "x$has_forbidden_chars" != x; then
28058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28060  fi
28061
28062
28063  windows_path="$new_path"
28064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28065    unix_path=`$CYGPATH -u "$windows_path"`
28066    new_path="$unix_path"
28067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28069    new_path="$unix_path"
28070  fi
28071
28072  if test "x$path" != "x$new_path"; then
28073    BOOT_JDK="$new_path"
28074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28076  fi
28077
28078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28080
28081    else
28082      # We're on a unix platform. Hooray! :)
28083      path="$BOOT_JDK"
28084      has_space=`$ECHO "$path" | $GREP " "`
28085      if test "x$has_space" != x; then
28086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28087$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28089      fi
28090
28091      # Use eval to expand a potential ~
28092      eval path="$path"
28093      if test ! -f "$path" && test ! -d "$path"; then
28094        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28095      fi
28096
28097      if test -d "$path"; then
28098        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28099      else
28100        dir="`$DIRNAME "$path"`"
28101        base="`$BASENAME "$path"`"
28102        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28103      fi
28104    fi
28105  fi
28106
28107            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28108$as_echo_n "checking for Boot JDK... " >&6; }
28109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28110$as_echo "$BOOT_JDK" >&6; }
28111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28112$as_echo_n "checking Boot JDK version... " >&6; }
28113            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28114            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28115$as_echo "$BOOT_JDK_VERSION" >&6; }
28116          fi # end check jdk version
28117        fi # end check javac
28118      fi # end check java
28119    fi # end check boot jdk found
28120  fi
28121
28122
28123  if test "x$BOOT_JDK_FOUND" = xno; then
28124    # Now execute the test
28125
28126  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28127  BOOT_JDK_SUFFIX=""
28128  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28129  if test "x$ALL_JDKS_FOUND" != x; then
28130    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28131
28132  if test "x$BOOT_JDK_FOUND" = xno; then
28133    # Now execute the test
28134
28135        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28136        if test -d "$BOOT_JDK"; then
28137          BOOT_JDK_FOUND=maybe
28138          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28139$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28140        fi
28141
28142
28143    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28144    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28145      # Do we have a bin/java?
28146      if test ! -x "$BOOT_JDK/bin/java"; then
28147        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28149        BOOT_JDK_FOUND=no
28150      else
28151        # Do we have a bin/javac?
28152        if test ! -x "$BOOT_JDK/bin/javac"; then
28153          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28155          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28156$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28157          BOOT_JDK_FOUND=no
28158        else
28159          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28160          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28161
28162          # Extra M4 quote needed to protect [] in grep expression.
28163          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28164          if test "x$FOUND_CORRECT_VERSION" = x; then
28165            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28167            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28168$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28169            BOOT_JDK_FOUND=no
28170          else
28171            # We're done! :-)
28172            BOOT_JDK_FOUND=yes
28173
28174  # Only process if variable expands to non-empty
28175
28176  if test "x$BOOT_JDK" != x; then
28177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28178
28179  # Input might be given as Windows format, start by converting to
28180  # unix format.
28181  path="$BOOT_JDK"
28182  new_path=`$CYGPATH -u "$path"`
28183
28184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28187  # "foo.exe" is OK but "foo" is an error.
28188  #
28189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28190  # It is also a way to make sure we got the proper file name for the real test later on.
28191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28192  if test "x$test_shortpath" = x; then
28193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28194$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28195    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28196  fi
28197
28198  # Call helper function which possibly converts this using DOS-style short mode.
28199  # If so, the updated path is stored in $new_path.
28200
28201  input_path="$new_path"
28202  # Check if we need to convert this using DOS-style short mode. If the path
28203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28204  # take no chances and rewrite it.
28205  # Note: m4 eats our [], so we need to use [ and ] instead.
28206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28207  if test "x$has_forbidden_chars" != x; then
28208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28212      # Going to short mode and back again did indeed matter. Since short mode is
28213      # case insensitive, let's make it lowercase to improve readability.
28214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28215      # Now convert it back to Unix-style (cygpath)
28216      input_path=`$CYGPATH -u "$shortmode_path"`
28217      new_path="$input_path"
28218    fi
28219  fi
28220
28221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28222  if test "x$test_cygdrive_prefix" = x; then
28223    # As a simple fix, exclude /usr/bin since it's not a real path.
28224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28226      # a path prefixed by /cygdrive for fixpath to work.
28227      new_path="$CYGWIN_ROOT_PATH$input_path"
28228    fi
28229  fi
28230
28231
28232  if test "x$path" != "x$new_path"; then
28233    BOOT_JDK="$new_path"
28234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28235$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28236  fi
28237
28238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28239
28240  path="$BOOT_JDK"
28241  has_colon=`$ECHO $path | $GREP ^.:`
28242  new_path="$path"
28243  if test "x$has_colon" = x; then
28244    # Not in mixed or Windows style, start by that.
28245    new_path=`cmd //c echo $path`
28246  fi
28247
28248
28249  input_path="$new_path"
28250  # Check if we need to convert this using DOS-style short mode. If the path
28251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28252  # take no chances and rewrite it.
28253  # Note: m4 eats our [], so we need to use [ and ] instead.
28254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28255  if test "x$has_forbidden_chars" != x; then
28256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28258  fi
28259
28260
28261  windows_path="$new_path"
28262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28263    unix_path=`$CYGPATH -u "$windows_path"`
28264    new_path="$unix_path"
28265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28267    new_path="$unix_path"
28268  fi
28269
28270  if test "x$path" != "x$new_path"; then
28271    BOOT_JDK="$new_path"
28272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28274  fi
28275
28276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28278
28279    else
28280      # We're on a unix platform. Hooray! :)
28281      path="$BOOT_JDK"
28282      has_space=`$ECHO "$path" | $GREP " "`
28283      if test "x$has_space" != x; then
28284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28285$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28287      fi
28288
28289      # Use eval to expand a potential ~
28290      eval path="$path"
28291      if test ! -f "$path" && test ! -d "$path"; then
28292        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28293      fi
28294
28295      if test -d "$path"; then
28296        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28297      else
28298        dir="`$DIRNAME "$path"`"
28299        base="`$BASENAME "$path"`"
28300        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28301      fi
28302    fi
28303  fi
28304
28305            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28306$as_echo_n "checking for Boot JDK... " >&6; }
28307            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28308$as_echo "$BOOT_JDK" >&6; }
28309            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28310$as_echo_n "checking Boot JDK version... " >&6; }
28311            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28313$as_echo "$BOOT_JDK_VERSION" >&6; }
28314          fi # end check jdk version
28315        fi # end check javac
28316      fi # end check java
28317    fi # end check boot jdk found
28318  fi
28319
28320    done
28321  fi
28322
28323
28324    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28325    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28326      # Do we have a bin/java?
28327      if test ! -x "$BOOT_JDK/bin/java"; then
28328        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28330        BOOT_JDK_FOUND=no
28331      else
28332        # Do we have a bin/javac?
28333        if test ! -x "$BOOT_JDK/bin/javac"; then
28334          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28336          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28337$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28338          BOOT_JDK_FOUND=no
28339        else
28340          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28341          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28342
28343          # Extra M4 quote needed to protect [] in grep expression.
28344          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28345          if test "x$FOUND_CORRECT_VERSION" = x; then
28346            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28348            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28349$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28350            BOOT_JDK_FOUND=no
28351          else
28352            # We're done! :-)
28353            BOOT_JDK_FOUND=yes
28354
28355  # Only process if variable expands to non-empty
28356
28357  if test "x$BOOT_JDK" != x; then
28358    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28359
28360  # Input might be given as Windows format, start by converting to
28361  # unix format.
28362  path="$BOOT_JDK"
28363  new_path=`$CYGPATH -u "$path"`
28364
28365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28368  # "foo.exe" is OK but "foo" is an error.
28369  #
28370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28371  # It is also a way to make sure we got the proper file name for the real test later on.
28372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28373  if test "x$test_shortpath" = x; then
28374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28375$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28376    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28377  fi
28378
28379  # Call helper function which possibly converts this using DOS-style short mode.
28380  # If so, the updated path is stored in $new_path.
28381
28382  input_path="$new_path"
28383  # Check if we need to convert this using DOS-style short mode. If the path
28384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28385  # take no chances and rewrite it.
28386  # Note: m4 eats our [], so we need to use [ and ] instead.
28387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28388  if test "x$has_forbidden_chars" != x; then
28389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28393      # Going to short mode and back again did indeed matter. Since short mode is
28394      # case insensitive, let's make it lowercase to improve readability.
28395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28396      # Now convert it back to Unix-style (cygpath)
28397      input_path=`$CYGPATH -u "$shortmode_path"`
28398      new_path="$input_path"
28399    fi
28400  fi
28401
28402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28403  if test "x$test_cygdrive_prefix" = x; then
28404    # As a simple fix, exclude /usr/bin since it's not a real path.
28405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28407      # a path prefixed by /cygdrive for fixpath to work.
28408      new_path="$CYGWIN_ROOT_PATH$input_path"
28409    fi
28410  fi
28411
28412
28413  if test "x$path" != "x$new_path"; then
28414    BOOT_JDK="$new_path"
28415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28417  fi
28418
28419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28420
28421  path="$BOOT_JDK"
28422  has_colon=`$ECHO $path | $GREP ^.:`
28423  new_path="$path"
28424  if test "x$has_colon" = x; then
28425    # Not in mixed or Windows style, start by that.
28426    new_path=`cmd //c echo $path`
28427  fi
28428
28429
28430  input_path="$new_path"
28431  # Check if we need to convert this using DOS-style short mode. If the path
28432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28433  # take no chances and rewrite it.
28434  # Note: m4 eats our [], so we need to use [ and ] instead.
28435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28436  if test "x$has_forbidden_chars" != x; then
28437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28439  fi
28440
28441
28442  windows_path="$new_path"
28443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28444    unix_path=`$CYGPATH -u "$windows_path"`
28445    new_path="$unix_path"
28446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28448    new_path="$unix_path"
28449  fi
28450
28451  if test "x$path" != "x$new_path"; then
28452    BOOT_JDK="$new_path"
28453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28455  fi
28456
28457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28459
28460    else
28461      # We're on a unix platform. Hooray! :)
28462      path="$BOOT_JDK"
28463      has_space=`$ECHO "$path" | $GREP " "`
28464      if test "x$has_space" != x; then
28465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28466$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28467        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28468      fi
28469
28470      # Use eval to expand a potential ~
28471      eval path="$path"
28472      if test ! -f "$path" && test ! -d "$path"; then
28473        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28474      fi
28475
28476      if test -d "$path"; then
28477        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28478      else
28479        dir="`$DIRNAME "$path"`"
28480        base="`$BASENAME "$path"`"
28481        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28482      fi
28483    fi
28484  fi
28485
28486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28487$as_echo_n "checking for Boot JDK... " >&6; }
28488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28489$as_echo "$BOOT_JDK" >&6; }
28490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28491$as_echo_n "checking Boot JDK version... " >&6; }
28492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28494$as_echo "$BOOT_JDK_VERSION" >&6; }
28495          fi # end check jdk version
28496        fi # end check javac
28497      fi # end check java
28498    fi # end check boot jdk found
28499  fi
28500
28501  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28502
28503  if test "x$BOOT_JDK_FOUND" = xno; then
28504    # Now execute the test
28505
28506  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28507  BOOT_JDK_SUFFIX="/Contents/Home"
28508  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28509  if test "x$ALL_JDKS_FOUND" != x; then
28510    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28511
28512  if test "x$BOOT_JDK_FOUND" = xno; then
28513    # Now execute the test
28514
28515        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28516        if test -d "$BOOT_JDK"; then
28517          BOOT_JDK_FOUND=maybe
28518          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28519$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28520        fi
28521
28522
28523    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28524    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28525      # Do we have a bin/java?
28526      if test ! -x "$BOOT_JDK/bin/java"; then
28527        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28529        BOOT_JDK_FOUND=no
28530      else
28531        # Do we have a bin/javac?
28532        if test ! -x "$BOOT_JDK/bin/javac"; then
28533          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28535          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28536$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28537          BOOT_JDK_FOUND=no
28538        else
28539          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28540          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28541
28542          # Extra M4 quote needed to protect [] in grep expression.
28543          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28544          if test "x$FOUND_CORRECT_VERSION" = x; then
28545            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28547            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28548$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28549            BOOT_JDK_FOUND=no
28550          else
28551            # We're done! :-)
28552            BOOT_JDK_FOUND=yes
28553
28554  # Only process if variable expands to non-empty
28555
28556  if test "x$BOOT_JDK" != x; then
28557    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28558
28559  # Input might be given as Windows format, start by converting to
28560  # unix format.
28561  path="$BOOT_JDK"
28562  new_path=`$CYGPATH -u "$path"`
28563
28564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28567  # "foo.exe" is OK but "foo" is an error.
28568  #
28569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28570  # It is also a way to make sure we got the proper file name for the real test later on.
28571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28572  if test "x$test_shortpath" = x; then
28573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28574$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28575    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28576  fi
28577
28578  # Call helper function which possibly converts this using DOS-style short mode.
28579  # If so, the updated path is stored in $new_path.
28580
28581  input_path="$new_path"
28582  # Check if we need to convert this using DOS-style short mode. If the path
28583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28584  # take no chances and rewrite it.
28585  # Note: m4 eats our [], so we need to use [ and ] instead.
28586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28587  if test "x$has_forbidden_chars" != x; then
28588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28592      # Going to short mode and back again did indeed matter. Since short mode is
28593      # case insensitive, let's make it lowercase to improve readability.
28594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28595      # Now convert it back to Unix-style (cygpath)
28596      input_path=`$CYGPATH -u "$shortmode_path"`
28597      new_path="$input_path"
28598    fi
28599  fi
28600
28601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28602  if test "x$test_cygdrive_prefix" = x; then
28603    # As a simple fix, exclude /usr/bin since it's not a real path.
28604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28606      # a path prefixed by /cygdrive for fixpath to work.
28607      new_path="$CYGWIN_ROOT_PATH$input_path"
28608    fi
28609  fi
28610
28611
28612  if test "x$path" != "x$new_path"; then
28613    BOOT_JDK="$new_path"
28614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28615$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28616  fi
28617
28618    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28619
28620  path="$BOOT_JDK"
28621  has_colon=`$ECHO $path | $GREP ^.:`
28622  new_path="$path"
28623  if test "x$has_colon" = x; then
28624    # Not in mixed or Windows style, start by that.
28625    new_path=`cmd //c echo $path`
28626  fi
28627
28628
28629  input_path="$new_path"
28630  # Check if we need to convert this using DOS-style short mode. If the path
28631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28632  # take no chances and rewrite it.
28633  # Note: m4 eats our [], so we need to use [ and ] instead.
28634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28635  if test "x$has_forbidden_chars" != x; then
28636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28638  fi
28639
28640
28641  windows_path="$new_path"
28642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28643    unix_path=`$CYGPATH -u "$windows_path"`
28644    new_path="$unix_path"
28645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28647    new_path="$unix_path"
28648  fi
28649
28650  if test "x$path" != "x$new_path"; then
28651    BOOT_JDK="$new_path"
28652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28653$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28654  fi
28655
28656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28658
28659    else
28660      # We're on a unix platform. Hooray! :)
28661      path="$BOOT_JDK"
28662      has_space=`$ECHO "$path" | $GREP " "`
28663      if test "x$has_space" != x; then
28664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28665$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28666        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28667      fi
28668
28669      # Use eval to expand a potential ~
28670      eval path="$path"
28671      if test ! -f "$path" && test ! -d "$path"; then
28672        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28673      fi
28674
28675      if test -d "$path"; then
28676        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28677      else
28678        dir="`$DIRNAME "$path"`"
28679        base="`$BASENAME "$path"`"
28680        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28681      fi
28682    fi
28683  fi
28684
28685            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28686$as_echo_n "checking for Boot JDK... " >&6; }
28687            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28688$as_echo "$BOOT_JDK" >&6; }
28689            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28690$as_echo_n "checking Boot JDK version... " >&6; }
28691            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28692            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28693$as_echo "$BOOT_JDK_VERSION" >&6; }
28694          fi # end check jdk version
28695        fi # end check javac
28696      fi # end check java
28697    fi # end check boot jdk found
28698  fi
28699
28700    done
28701  fi
28702
28703
28704    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28705    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28706      # Do we have a bin/java?
28707      if test ! -x "$BOOT_JDK/bin/java"; then
28708        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28710        BOOT_JDK_FOUND=no
28711      else
28712        # Do we have a bin/javac?
28713        if test ! -x "$BOOT_JDK/bin/javac"; then
28714          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28716          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28717$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28718          BOOT_JDK_FOUND=no
28719        else
28720          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28721          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28722
28723          # Extra M4 quote needed to protect [] in grep expression.
28724          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28725          if test "x$FOUND_CORRECT_VERSION" = x; then
28726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28728            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28729$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28730            BOOT_JDK_FOUND=no
28731          else
28732            # We're done! :-)
28733            BOOT_JDK_FOUND=yes
28734
28735  # Only process if variable expands to non-empty
28736
28737  if test "x$BOOT_JDK" != x; then
28738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28739
28740  # Input might be given as Windows format, start by converting to
28741  # unix format.
28742  path="$BOOT_JDK"
28743  new_path=`$CYGPATH -u "$path"`
28744
28745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28748  # "foo.exe" is OK but "foo" is an error.
28749  #
28750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28751  # It is also a way to make sure we got the proper file name for the real test later on.
28752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28753  if test "x$test_shortpath" = x; then
28754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28756    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28757  fi
28758
28759  # Call helper function which possibly converts this using DOS-style short mode.
28760  # If so, the updated path is stored in $new_path.
28761
28762  input_path="$new_path"
28763  # Check if we need to convert this using DOS-style short mode. If the path
28764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28765  # take no chances and rewrite it.
28766  # Note: m4 eats our [], so we need to use [ and ] instead.
28767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28768  if test "x$has_forbidden_chars" != x; then
28769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28773      # Going to short mode and back again did indeed matter. Since short mode is
28774      # case insensitive, let's make it lowercase to improve readability.
28775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28776      # Now convert it back to Unix-style (cygpath)
28777      input_path=`$CYGPATH -u "$shortmode_path"`
28778      new_path="$input_path"
28779    fi
28780  fi
28781
28782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28783  if test "x$test_cygdrive_prefix" = x; then
28784    # As a simple fix, exclude /usr/bin since it's not a real path.
28785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28787      # a path prefixed by /cygdrive for fixpath to work.
28788      new_path="$CYGWIN_ROOT_PATH$input_path"
28789    fi
28790  fi
28791
28792
28793  if test "x$path" != "x$new_path"; then
28794    BOOT_JDK="$new_path"
28795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28797  fi
28798
28799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28800
28801  path="$BOOT_JDK"
28802  has_colon=`$ECHO $path | $GREP ^.:`
28803  new_path="$path"
28804  if test "x$has_colon" = x; then
28805    # Not in mixed or Windows style, start by that.
28806    new_path=`cmd //c echo $path`
28807  fi
28808
28809
28810  input_path="$new_path"
28811  # Check if we need to convert this using DOS-style short mode. If the path
28812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28813  # take no chances and rewrite it.
28814  # Note: m4 eats our [], so we need to use [ and ] instead.
28815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28816  if test "x$has_forbidden_chars" != x; then
28817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28819  fi
28820
28821
28822  windows_path="$new_path"
28823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28824    unix_path=`$CYGPATH -u "$windows_path"`
28825    new_path="$unix_path"
28826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28828    new_path="$unix_path"
28829  fi
28830
28831  if test "x$path" != "x$new_path"; then
28832    BOOT_JDK="$new_path"
28833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28835  fi
28836
28837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28839
28840    else
28841      # We're on a unix platform. Hooray! :)
28842      path="$BOOT_JDK"
28843      has_space=`$ECHO "$path" | $GREP " "`
28844      if test "x$has_space" != x; then
28845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28847        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28848      fi
28849
28850      # Use eval to expand a potential ~
28851      eval path="$path"
28852      if test ! -f "$path" && test ! -d "$path"; then
28853        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28854      fi
28855
28856      if test -d "$path"; then
28857        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28858      else
28859        dir="`$DIRNAME "$path"`"
28860        base="`$BASENAME "$path"`"
28861        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28862      fi
28863    fi
28864  fi
28865
28866            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28867$as_echo_n "checking for Boot JDK... " >&6; }
28868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28869$as_echo "$BOOT_JDK" >&6; }
28870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28871$as_echo_n "checking Boot JDK version... " >&6; }
28872            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28874$as_echo "$BOOT_JDK_VERSION" >&6; }
28875          fi # end check jdk version
28876        fi # end check javac
28877      fi # end check java
28878    fi # end check boot jdk found
28879  fi
28880
28881
28882  if test "x$BOOT_JDK_FOUND" = xno; then
28883    # Now execute the test
28884
28885  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28886  BOOT_JDK_SUFFIX="/Contents/Home"
28887  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28888  if test "x$ALL_JDKS_FOUND" != x; then
28889    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28890
28891  if test "x$BOOT_JDK_FOUND" = xno; then
28892    # Now execute the test
28893
28894        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28895        if test -d "$BOOT_JDK"; then
28896          BOOT_JDK_FOUND=maybe
28897          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28898$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28899        fi
28900
28901
28902    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28903    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28904      # Do we have a bin/java?
28905      if test ! -x "$BOOT_JDK/bin/java"; then
28906        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28907$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28908        BOOT_JDK_FOUND=no
28909      else
28910        # Do we have a bin/javac?
28911        if test ! -x "$BOOT_JDK/bin/javac"; then
28912          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28913$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28914          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28915$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28916          BOOT_JDK_FOUND=no
28917        else
28918          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28919          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28920
28921          # Extra M4 quote needed to protect [] in grep expression.
28922          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28923          if test "x$FOUND_CORRECT_VERSION" = x; then
28924            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28926            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28927$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28928            BOOT_JDK_FOUND=no
28929          else
28930            # We're done! :-)
28931            BOOT_JDK_FOUND=yes
28932
28933  # Only process if variable expands to non-empty
28934
28935  if test "x$BOOT_JDK" != x; then
28936    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28937
28938  # Input might be given as Windows format, start by converting to
28939  # unix format.
28940  path="$BOOT_JDK"
28941  new_path=`$CYGPATH -u "$path"`
28942
28943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28946  # "foo.exe" is OK but "foo" is an error.
28947  #
28948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28949  # It is also a way to make sure we got the proper file name for the real test later on.
28950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28951  if test "x$test_shortpath" = x; then
28952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28953$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28954    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28955  fi
28956
28957  # Call helper function which possibly converts this using DOS-style short mode.
28958  # If so, the updated path is stored in $new_path.
28959
28960  input_path="$new_path"
28961  # Check if we need to convert this using DOS-style short mode. If the path
28962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28963  # take no chances and rewrite it.
28964  # Note: m4 eats our [], so we need to use [ and ] instead.
28965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28966  if test "x$has_forbidden_chars" != x; then
28967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28971      # Going to short mode and back again did indeed matter. Since short mode is
28972      # case insensitive, let's make it lowercase to improve readability.
28973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28974      # Now convert it back to Unix-style (cygpath)
28975      input_path=`$CYGPATH -u "$shortmode_path"`
28976      new_path="$input_path"
28977    fi
28978  fi
28979
28980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28981  if test "x$test_cygdrive_prefix" = x; then
28982    # As a simple fix, exclude /usr/bin since it's not a real path.
28983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28985      # a path prefixed by /cygdrive for fixpath to work.
28986      new_path="$CYGWIN_ROOT_PATH$input_path"
28987    fi
28988  fi
28989
28990
28991  if test "x$path" != "x$new_path"; then
28992    BOOT_JDK="$new_path"
28993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28995  fi
28996
28997    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28998
28999  path="$BOOT_JDK"
29000  has_colon=`$ECHO $path | $GREP ^.:`
29001  new_path="$path"
29002  if test "x$has_colon" = x; then
29003    # Not in mixed or Windows style, start by that.
29004    new_path=`cmd //c echo $path`
29005  fi
29006
29007
29008  input_path="$new_path"
29009  # Check if we need to convert this using DOS-style short mode. If the path
29010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29011  # take no chances and rewrite it.
29012  # Note: m4 eats our [], so we need to use [ and ] instead.
29013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29014  if test "x$has_forbidden_chars" != x; then
29015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29017  fi
29018
29019
29020  windows_path="$new_path"
29021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29022    unix_path=`$CYGPATH -u "$windows_path"`
29023    new_path="$unix_path"
29024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29026    new_path="$unix_path"
29027  fi
29028
29029  if test "x$path" != "x$new_path"; then
29030    BOOT_JDK="$new_path"
29031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29033  fi
29034
29035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29037
29038    else
29039      # We're on a unix platform. Hooray! :)
29040      path="$BOOT_JDK"
29041      has_space=`$ECHO "$path" | $GREP " "`
29042      if test "x$has_space" != x; then
29043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29044$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29045        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29046      fi
29047
29048      # Use eval to expand a potential ~
29049      eval path="$path"
29050      if test ! -f "$path" && test ! -d "$path"; then
29051        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29052      fi
29053
29054      if test -d "$path"; then
29055        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29056      else
29057        dir="`$DIRNAME "$path"`"
29058        base="`$BASENAME "$path"`"
29059        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29060      fi
29061    fi
29062  fi
29063
29064            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29065$as_echo_n "checking for Boot JDK... " >&6; }
29066            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29067$as_echo "$BOOT_JDK" >&6; }
29068            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29069$as_echo_n "checking Boot JDK version... " >&6; }
29070            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29072$as_echo "$BOOT_JDK_VERSION" >&6; }
29073          fi # end check jdk version
29074        fi # end check javac
29075      fi # end check java
29076    fi # end check boot jdk found
29077  fi
29078
29079    done
29080  fi
29081
29082
29083    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29084    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29085      # Do we have a bin/java?
29086      if test ! -x "$BOOT_JDK/bin/java"; then
29087        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29089        BOOT_JDK_FOUND=no
29090      else
29091        # Do we have a bin/javac?
29092        if test ! -x "$BOOT_JDK/bin/javac"; then
29093          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29095          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29096$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29097          BOOT_JDK_FOUND=no
29098        else
29099          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29100          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29101
29102          # Extra M4 quote needed to protect [] in grep expression.
29103          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29104          if test "x$FOUND_CORRECT_VERSION" = x; then
29105            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29107            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29108$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29109            BOOT_JDK_FOUND=no
29110          else
29111            # We're done! :-)
29112            BOOT_JDK_FOUND=yes
29113
29114  # Only process if variable expands to non-empty
29115
29116  if test "x$BOOT_JDK" != x; then
29117    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29118
29119  # Input might be given as Windows format, start by converting to
29120  # unix format.
29121  path="$BOOT_JDK"
29122  new_path=`$CYGPATH -u "$path"`
29123
29124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29127  # "foo.exe" is OK but "foo" is an error.
29128  #
29129  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29130  # It is also a way to make sure we got the proper file name for the real test later on.
29131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29132  if test "x$test_shortpath" = x; then
29133    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29134$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29135    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29136  fi
29137
29138  # Call helper function which possibly converts this using DOS-style short mode.
29139  # If so, the updated path is stored in $new_path.
29140
29141  input_path="$new_path"
29142  # Check if we need to convert this using DOS-style short mode. If the path
29143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29144  # take no chances and rewrite it.
29145  # Note: m4 eats our [], so we need to use [ and ] instead.
29146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29147  if test "x$has_forbidden_chars" != x; then
29148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29152      # Going to short mode and back again did indeed matter. Since short mode is
29153      # case insensitive, let's make it lowercase to improve readability.
29154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29155      # Now convert it back to Unix-style (cygpath)
29156      input_path=`$CYGPATH -u "$shortmode_path"`
29157      new_path="$input_path"
29158    fi
29159  fi
29160
29161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29162  if test "x$test_cygdrive_prefix" = x; then
29163    # As a simple fix, exclude /usr/bin since it's not a real path.
29164    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29166      # a path prefixed by /cygdrive for fixpath to work.
29167      new_path="$CYGWIN_ROOT_PATH$input_path"
29168    fi
29169  fi
29170
29171
29172  if test "x$path" != "x$new_path"; then
29173    BOOT_JDK="$new_path"
29174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29176  fi
29177
29178    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29179
29180  path="$BOOT_JDK"
29181  has_colon=`$ECHO $path | $GREP ^.:`
29182  new_path="$path"
29183  if test "x$has_colon" = x; then
29184    # Not in mixed or Windows style, start by that.
29185    new_path=`cmd //c echo $path`
29186  fi
29187
29188
29189  input_path="$new_path"
29190  # Check if we need to convert this using DOS-style short mode. If the path
29191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29192  # take no chances and rewrite it.
29193  # Note: m4 eats our [], so we need to use [ and ] instead.
29194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29195  if test "x$has_forbidden_chars" != x; then
29196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29198  fi
29199
29200
29201  windows_path="$new_path"
29202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29203    unix_path=`$CYGPATH -u "$windows_path"`
29204    new_path="$unix_path"
29205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29207    new_path="$unix_path"
29208  fi
29209
29210  if test "x$path" != "x$new_path"; then
29211    BOOT_JDK="$new_path"
29212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29213$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29214  fi
29215
29216  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29217  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29218
29219    else
29220      # We're on a unix platform. Hooray! :)
29221      path="$BOOT_JDK"
29222      has_space=`$ECHO "$path" | $GREP " "`
29223      if test "x$has_space" != x; then
29224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29226        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29227      fi
29228
29229      # Use eval to expand a potential ~
29230      eval path="$path"
29231      if test ! -f "$path" && test ! -d "$path"; then
29232        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29233      fi
29234
29235      if test -d "$path"; then
29236        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29237      else
29238        dir="`$DIRNAME "$path"`"
29239        base="`$BASENAME "$path"`"
29240        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29241      fi
29242    fi
29243  fi
29244
29245            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29246$as_echo_n "checking for Boot JDK... " >&6; }
29247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29248$as_echo "$BOOT_JDK" >&6; }
29249            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29250$as_echo_n "checking Boot JDK version... " >&6; }
29251            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29253$as_echo "$BOOT_JDK_VERSION" >&6; }
29254          fi # end check jdk version
29255        fi # end check javac
29256      fi # end check java
29257    fi # end check boot jdk found
29258  fi
29259
29260  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29261
29262  if test "x$BOOT_JDK_FOUND" = xno; then
29263    # Now execute the test
29264
29265  BOOT_JDK_PREFIX="/usr/lib/jvm"
29266  BOOT_JDK_SUFFIX=""
29267  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29268  if test "x$ALL_JDKS_FOUND" != x; then
29269    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29270
29271  if test "x$BOOT_JDK_FOUND" = xno; then
29272    # Now execute the test
29273
29274        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29275        if test -d "$BOOT_JDK"; then
29276          BOOT_JDK_FOUND=maybe
29277          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29278$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29279        fi
29280
29281
29282    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29283    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29284      # Do we have a bin/java?
29285      if test ! -x "$BOOT_JDK/bin/java"; then
29286        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29288        BOOT_JDK_FOUND=no
29289      else
29290        # Do we have a bin/javac?
29291        if test ! -x "$BOOT_JDK/bin/javac"; then
29292          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29294          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29295$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29296          BOOT_JDK_FOUND=no
29297        else
29298          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29299          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29300
29301          # Extra M4 quote needed to protect [] in grep expression.
29302          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29303          if test "x$FOUND_CORRECT_VERSION" = x; then
29304            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29306            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29307$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29308            BOOT_JDK_FOUND=no
29309          else
29310            # We're done! :-)
29311            BOOT_JDK_FOUND=yes
29312
29313  # Only process if variable expands to non-empty
29314
29315  if test "x$BOOT_JDK" != x; then
29316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29317
29318  # Input might be given as Windows format, start by converting to
29319  # unix format.
29320  path="$BOOT_JDK"
29321  new_path=`$CYGPATH -u "$path"`
29322
29323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29326  # "foo.exe" is OK but "foo" is an error.
29327  #
29328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29329  # It is also a way to make sure we got the proper file name for the real test later on.
29330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29331  if test "x$test_shortpath" = x; then
29332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29334    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29335  fi
29336
29337  # Call helper function which possibly converts this using DOS-style short mode.
29338  # If so, the updated path is stored in $new_path.
29339
29340  input_path="$new_path"
29341  # Check if we need to convert this using DOS-style short mode. If the path
29342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29343  # take no chances and rewrite it.
29344  # Note: m4 eats our [], so we need to use [ and ] instead.
29345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29346  if test "x$has_forbidden_chars" != x; then
29347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29351      # Going to short mode and back again did indeed matter. Since short mode is
29352      # case insensitive, let's make it lowercase to improve readability.
29353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29354      # Now convert it back to Unix-style (cygpath)
29355      input_path=`$CYGPATH -u "$shortmode_path"`
29356      new_path="$input_path"
29357    fi
29358  fi
29359
29360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29361  if test "x$test_cygdrive_prefix" = x; then
29362    # As a simple fix, exclude /usr/bin since it's not a real path.
29363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29365      # a path prefixed by /cygdrive for fixpath to work.
29366      new_path="$CYGWIN_ROOT_PATH$input_path"
29367    fi
29368  fi
29369
29370
29371  if test "x$path" != "x$new_path"; then
29372    BOOT_JDK="$new_path"
29373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29374$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29375  fi
29376
29377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29378
29379  path="$BOOT_JDK"
29380  has_colon=`$ECHO $path | $GREP ^.:`
29381  new_path="$path"
29382  if test "x$has_colon" = x; then
29383    # Not in mixed or Windows style, start by that.
29384    new_path=`cmd //c echo $path`
29385  fi
29386
29387
29388  input_path="$new_path"
29389  # Check if we need to convert this using DOS-style short mode. If the path
29390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29391  # take no chances and rewrite it.
29392  # Note: m4 eats our [], so we need to use [ and ] instead.
29393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29394  if test "x$has_forbidden_chars" != x; then
29395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29397  fi
29398
29399
29400  windows_path="$new_path"
29401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29402    unix_path=`$CYGPATH -u "$windows_path"`
29403    new_path="$unix_path"
29404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29406    new_path="$unix_path"
29407  fi
29408
29409  if test "x$path" != "x$new_path"; then
29410    BOOT_JDK="$new_path"
29411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29412$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29413  fi
29414
29415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29417
29418    else
29419      # We're on a unix platform. Hooray! :)
29420      path="$BOOT_JDK"
29421      has_space=`$ECHO "$path" | $GREP " "`
29422      if test "x$has_space" != x; then
29423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29424$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29426      fi
29427
29428      # Use eval to expand a potential ~
29429      eval path="$path"
29430      if test ! -f "$path" && test ! -d "$path"; then
29431        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29432      fi
29433
29434      if test -d "$path"; then
29435        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29436      else
29437        dir="`$DIRNAME "$path"`"
29438        base="`$BASENAME "$path"`"
29439        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29440      fi
29441    fi
29442  fi
29443
29444            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29445$as_echo_n "checking for Boot JDK... " >&6; }
29446            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29447$as_echo "$BOOT_JDK" >&6; }
29448            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29449$as_echo_n "checking Boot JDK version... " >&6; }
29450            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29451            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29452$as_echo "$BOOT_JDK_VERSION" >&6; }
29453          fi # end check jdk version
29454        fi # end check javac
29455      fi # end check java
29456    fi # end check boot jdk found
29457  fi
29458
29459    done
29460  fi
29461
29462
29463    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29464    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29465      # Do we have a bin/java?
29466      if test ! -x "$BOOT_JDK/bin/java"; then
29467        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29469        BOOT_JDK_FOUND=no
29470      else
29471        # Do we have a bin/javac?
29472        if test ! -x "$BOOT_JDK/bin/javac"; then
29473          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29475          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29476$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29477          BOOT_JDK_FOUND=no
29478        else
29479          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29480          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29481
29482          # Extra M4 quote needed to protect [] in grep expression.
29483          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29484          if test "x$FOUND_CORRECT_VERSION" = x; then
29485            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29487            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29488$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29489            BOOT_JDK_FOUND=no
29490          else
29491            # We're done! :-)
29492            BOOT_JDK_FOUND=yes
29493
29494  # Only process if variable expands to non-empty
29495
29496  if test "x$BOOT_JDK" != x; then
29497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29498
29499  # Input might be given as Windows format, start by converting to
29500  # unix format.
29501  path="$BOOT_JDK"
29502  new_path=`$CYGPATH -u "$path"`
29503
29504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29507  # "foo.exe" is OK but "foo" is an error.
29508  #
29509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29510  # It is also a way to make sure we got the proper file name for the real test later on.
29511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29512  if test "x$test_shortpath" = x; then
29513    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29514$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29515    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29516  fi
29517
29518  # Call helper function which possibly converts this using DOS-style short mode.
29519  # If so, the updated path is stored in $new_path.
29520
29521  input_path="$new_path"
29522  # Check if we need to convert this using DOS-style short mode. If the path
29523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29524  # take no chances and rewrite it.
29525  # Note: m4 eats our [], so we need to use [ and ] instead.
29526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29527  if test "x$has_forbidden_chars" != x; then
29528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29532      # Going to short mode and back again did indeed matter. Since short mode is
29533      # case insensitive, let's make it lowercase to improve readability.
29534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29535      # Now convert it back to Unix-style (cygpath)
29536      input_path=`$CYGPATH -u "$shortmode_path"`
29537      new_path="$input_path"
29538    fi
29539  fi
29540
29541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29542  if test "x$test_cygdrive_prefix" = x; then
29543    # As a simple fix, exclude /usr/bin since it's not a real path.
29544    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29546      # a path prefixed by /cygdrive for fixpath to work.
29547      new_path="$CYGWIN_ROOT_PATH$input_path"
29548    fi
29549  fi
29550
29551
29552  if test "x$path" != "x$new_path"; then
29553    BOOT_JDK="$new_path"
29554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29555$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29556  fi
29557
29558    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29559
29560  path="$BOOT_JDK"
29561  has_colon=`$ECHO $path | $GREP ^.:`
29562  new_path="$path"
29563  if test "x$has_colon" = x; then
29564    # Not in mixed or Windows style, start by that.
29565    new_path=`cmd //c echo $path`
29566  fi
29567
29568
29569  input_path="$new_path"
29570  # Check if we need to convert this using DOS-style short mode. If the path
29571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29572  # take no chances and rewrite it.
29573  # Note: m4 eats our [], so we need to use [ and ] instead.
29574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29575  if test "x$has_forbidden_chars" != x; then
29576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29578  fi
29579
29580
29581  windows_path="$new_path"
29582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29583    unix_path=`$CYGPATH -u "$windows_path"`
29584    new_path="$unix_path"
29585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29587    new_path="$unix_path"
29588  fi
29589
29590  if test "x$path" != "x$new_path"; then
29591    BOOT_JDK="$new_path"
29592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29594  fi
29595
29596  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29597  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29598
29599    else
29600      # We're on a unix platform. Hooray! :)
29601      path="$BOOT_JDK"
29602      has_space=`$ECHO "$path" | $GREP " "`
29603      if test "x$has_space" != x; then
29604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29605$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29606        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29607      fi
29608
29609      # Use eval to expand a potential ~
29610      eval path="$path"
29611      if test ! -f "$path" && test ! -d "$path"; then
29612        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29613      fi
29614
29615      if test -d "$path"; then
29616        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29617      else
29618        dir="`$DIRNAME "$path"`"
29619        base="`$BASENAME "$path"`"
29620        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29621      fi
29622    fi
29623  fi
29624
29625            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29626$as_echo_n "checking for Boot JDK... " >&6; }
29627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29628$as_echo "$BOOT_JDK" >&6; }
29629            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29630$as_echo_n "checking Boot JDK version... " >&6; }
29631            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29632            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29633$as_echo "$BOOT_JDK_VERSION" >&6; }
29634          fi # end check jdk version
29635        fi # end check javac
29636      fi # end check java
29637    fi # end check boot jdk found
29638  fi
29639
29640  fi
29641
29642
29643    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29644    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29645      # Do we have a bin/java?
29646      if test ! -x "$BOOT_JDK/bin/java"; then
29647        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29648$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29649        BOOT_JDK_FOUND=no
29650      else
29651        # Do we have a bin/javac?
29652        if test ! -x "$BOOT_JDK/bin/javac"; then
29653          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29655          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29656$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29657          BOOT_JDK_FOUND=no
29658        else
29659          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29660          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29661
29662          # Extra M4 quote needed to protect [] in grep expression.
29663          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29664          if test "x$FOUND_CORRECT_VERSION" = x; then
29665            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29666$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29667            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29668$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29669            BOOT_JDK_FOUND=no
29670          else
29671            # We're done! :-)
29672            BOOT_JDK_FOUND=yes
29673
29674  # Only process if variable expands to non-empty
29675
29676  if test "x$BOOT_JDK" != x; then
29677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29678
29679  # Input might be given as Windows format, start by converting to
29680  # unix format.
29681  path="$BOOT_JDK"
29682  new_path=`$CYGPATH -u "$path"`
29683
29684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29687  # "foo.exe" is OK but "foo" is an error.
29688  #
29689  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29690  # It is also a way to make sure we got the proper file name for the real test later on.
29691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29692  if test "x$test_shortpath" = x; then
29693    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29694$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29695    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29696  fi
29697
29698  # Call helper function which possibly converts this using DOS-style short mode.
29699  # If so, the updated path is stored in $new_path.
29700
29701  input_path="$new_path"
29702  # Check if we need to convert this using DOS-style short mode. If the path
29703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29704  # take no chances and rewrite it.
29705  # Note: m4 eats our [], so we need to use [ and ] instead.
29706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29707  if test "x$has_forbidden_chars" != x; then
29708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29712      # Going to short mode and back again did indeed matter. Since short mode is
29713      # case insensitive, let's make it lowercase to improve readability.
29714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29715      # Now convert it back to Unix-style (cygpath)
29716      input_path=`$CYGPATH -u "$shortmode_path"`
29717      new_path="$input_path"
29718    fi
29719  fi
29720
29721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29722  if test "x$test_cygdrive_prefix" = x; then
29723    # As a simple fix, exclude /usr/bin since it's not a real path.
29724    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29726      # a path prefixed by /cygdrive for fixpath to work.
29727      new_path="$CYGWIN_ROOT_PATH$input_path"
29728    fi
29729  fi
29730
29731
29732  if test "x$path" != "x$new_path"; then
29733    BOOT_JDK="$new_path"
29734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29735$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29736  fi
29737
29738    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29739
29740  path="$BOOT_JDK"
29741  has_colon=`$ECHO $path | $GREP ^.:`
29742  new_path="$path"
29743  if test "x$has_colon" = x; then
29744    # Not in mixed or Windows style, start by that.
29745    new_path=`cmd //c echo $path`
29746  fi
29747
29748
29749  input_path="$new_path"
29750  # Check if we need to convert this using DOS-style short mode. If the path
29751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29752  # take no chances and rewrite it.
29753  # Note: m4 eats our [], so we need to use [ and ] instead.
29754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29755  if test "x$has_forbidden_chars" != x; then
29756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29758  fi
29759
29760
29761  windows_path="$new_path"
29762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29763    unix_path=`$CYGPATH -u "$windows_path"`
29764    new_path="$unix_path"
29765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29767    new_path="$unix_path"
29768  fi
29769
29770  if test "x$path" != "x$new_path"; then
29771    BOOT_JDK="$new_path"
29772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29773$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29774  fi
29775
29776  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29777  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29778
29779    else
29780      # We're on a unix platform. Hooray! :)
29781      path="$BOOT_JDK"
29782      has_space=`$ECHO "$path" | $GREP " "`
29783      if test "x$has_space" != x; then
29784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29785$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29786        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29787      fi
29788
29789      # Use eval to expand a potential ~
29790      eval path="$path"
29791      if test ! -f "$path" && test ! -d "$path"; then
29792        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29793      fi
29794
29795      if test -d "$path"; then
29796        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29797      else
29798        dir="`$DIRNAME "$path"`"
29799        base="`$BASENAME "$path"`"
29800        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29801      fi
29802    fi
29803  fi
29804
29805            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29806$as_echo_n "checking for Boot JDK... " >&6; }
29807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29808$as_echo "$BOOT_JDK" >&6; }
29809            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29810$as_echo_n "checking Boot JDK version... " >&6; }
29811            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29813$as_echo "$BOOT_JDK_VERSION" >&6; }
29814          fi # end check jdk version
29815        fi # end check javac
29816      fi # end check java
29817    fi # end check boot jdk found
29818  fi
29819
29820
29821  # If we haven't found anything yet, we've truly lost. Give up.
29822  if test "x$BOOT_JDK_FOUND" = xno; then
29823
29824  # Print a helpful message on how to acquire the necessary build dependency.
29825  # openjdk is the help tag: freetype, cups, alsa etc
29826  MISSING_DEPENDENCY=openjdk
29827
29828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29829    cygwin_help $MISSING_DEPENDENCY
29830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29831    msys_help $MISSING_DEPENDENCY
29832  else
29833    PKGHANDLER_COMMAND=
29834
29835    case $PKGHANDLER in
29836      apt-get)
29837        apt_help     $MISSING_DEPENDENCY ;;
29838      yum)
29839        yum_help     $MISSING_DEPENDENCY ;;
29840      port)
29841        port_help    $MISSING_DEPENDENCY ;;
29842      pkgutil)
29843        pkgutil_help $MISSING_DEPENDENCY ;;
29844      pkgadd)
29845        pkgadd_help  $MISSING_DEPENDENCY ;;
29846    esac
29847
29848    if test "x$PKGHANDLER_COMMAND" != x; then
29849      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29850    fi
29851  fi
29852
29853    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29854$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29855    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29856$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29857    as_fn_error $? "Cannot continue" "$LINENO" 5
29858  fi
29859
29860
29861
29862  # Setup tools from the Boot JDK.
29863
29864  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29865
29866  # Publish this variable in the help.
29867
29868
29869  if [ -z "${JAVA+x}" ]; then
29870    # The variable is not set by user, try to locate tool using the code snippet
29871
29872      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29873$as_echo_n "checking for java in Boot JDK... " >&6; }
29874      JAVA=$BOOT_JDK/bin/java
29875      if test ! -x $JAVA; then
29876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29877$as_echo "not found" >&6; }
29878        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29879$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29880        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29881      fi
29882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29883$as_echo "ok" >&6; }
29884
29885
29886  else
29887    # The variable is set, but is it from the command line or the environment?
29888
29889    # Try to remove the string !JAVA! from our list.
29890    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29891    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29892      # If it failed, the variable was not from the command line. Ignore it,
29893      # but warn the user (except for BASH, which is always set by the calling BASH).
29894      if test "xJAVA" != xBASH; then
29895        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29896$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29897      fi
29898      # Try to locate tool using the code snippet
29899
29900      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29901$as_echo_n "checking for java in Boot JDK... " >&6; }
29902      JAVA=$BOOT_JDK/bin/java
29903      if test ! -x $JAVA; then
29904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29905$as_echo "not found" >&6; }
29906        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29907$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29908        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29909      fi
29910      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29911$as_echo "ok" >&6; }
29912
29913
29914    else
29915      # If it succeeded, then it was overridden by the user. We will use it
29916      # for the tool.
29917
29918      # First remove it from the list of overridden variables, so we can test
29919      # for unknown variables in the end.
29920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29921
29922      # Check if we try to supply an empty value
29923      if test "x$JAVA" = x; then
29924        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29925$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29927$as_echo_n "checking for JAVA... " >&6; }
29928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29929$as_echo "disabled" >&6; }
29930      else
29931        # Check if the provided tool contains a complete path.
29932        tool_specified="$JAVA"
29933        tool_basename="${tool_specified##*/}"
29934        if test "x$tool_basename" = "x$tool_specified"; then
29935          # A command without a complete path is provided, search $PATH.
29936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29937$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29938          # Extract the first word of "$tool_basename", so it can be a program name with args.
29939set dummy $tool_basename; ac_word=$2
29940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29941$as_echo_n "checking for $ac_word... " >&6; }
29942if ${ac_cv_path_JAVA+:} false; then :
29943  $as_echo_n "(cached) " >&6
29944else
29945  case $JAVA in
29946  [\\/]* | ?:[\\/]*)
29947  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29948  ;;
29949  *)
29950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29951for as_dir in $PATH
29952do
29953  IFS=$as_save_IFS
29954  test -z "$as_dir" && as_dir=.
29955    for ac_exec_ext in '' $ac_executable_extensions; do
29956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29957    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29959    break 2
29960  fi
29961done
29962  done
29963IFS=$as_save_IFS
29964
29965  ;;
29966esac
29967fi
29968JAVA=$ac_cv_path_JAVA
29969if test -n "$JAVA"; then
29970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29971$as_echo "$JAVA" >&6; }
29972else
29973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29974$as_echo "no" >&6; }
29975fi
29976
29977
29978          if test "x$JAVA" = x; then
29979            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29980          fi
29981        else
29982          # Otherwise we believe it is a complete path. Use it as it is.
29983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29984$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29985          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29986$as_echo_n "checking for JAVA... " >&6; }
29987          if test ! -x "$tool_specified"; then
29988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29989$as_echo "not found" >&6; }
29990            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29991          fi
29992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29993$as_echo "$tool_specified" >&6; }
29994        fi
29995      fi
29996    fi
29997
29998  fi
29999
30000
30001
30002  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30003
30004  # Publish this variable in the help.
30005
30006
30007  if [ -z "${JAVAC+x}" ]; then
30008    # The variable is not set by user, try to locate tool using the code snippet
30009
30010      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30011$as_echo_n "checking for javac in Boot JDK... " >&6; }
30012      JAVAC=$BOOT_JDK/bin/javac
30013      if test ! -x $JAVAC; then
30014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30015$as_echo "not found" >&6; }
30016        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30017$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30018        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30019      fi
30020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30021$as_echo "ok" >&6; }
30022
30023
30024  else
30025    # The variable is set, but is it from the command line or the environment?
30026
30027    # Try to remove the string !JAVAC! from our list.
30028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30030      # If it failed, the variable was not from the command line. Ignore it,
30031      # but warn the user (except for BASH, which is always set by the calling BASH).
30032      if test "xJAVAC" != xBASH; then
30033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30034$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30035      fi
30036      # Try to locate tool using the code snippet
30037
30038      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30039$as_echo_n "checking for javac in Boot JDK... " >&6; }
30040      JAVAC=$BOOT_JDK/bin/javac
30041      if test ! -x $JAVAC; then
30042        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30043$as_echo "not found" >&6; }
30044        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30045$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30046        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30047      fi
30048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30049$as_echo "ok" >&6; }
30050
30051
30052    else
30053      # If it succeeded, then it was overridden by the user. We will use it
30054      # for the tool.
30055
30056      # First remove it from the list of overridden variables, so we can test
30057      # for unknown variables in the end.
30058      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30059
30060      # Check if we try to supply an empty value
30061      if test "x$JAVAC" = x; then
30062        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30063$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30065$as_echo_n "checking for JAVAC... " >&6; }
30066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30067$as_echo "disabled" >&6; }
30068      else
30069        # Check if the provided tool contains a complete path.
30070        tool_specified="$JAVAC"
30071        tool_basename="${tool_specified##*/}"
30072        if test "x$tool_basename" = "x$tool_specified"; then
30073          # A command without a complete path is provided, search $PATH.
30074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30075$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30076          # Extract the first word of "$tool_basename", so it can be a program name with args.
30077set dummy $tool_basename; ac_word=$2
30078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30079$as_echo_n "checking for $ac_word... " >&6; }
30080if ${ac_cv_path_JAVAC+:} false; then :
30081  $as_echo_n "(cached) " >&6
30082else
30083  case $JAVAC in
30084  [\\/]* | ?:[\\/]*)
30085  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30086  ;;
30087  *)
30088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30089for as_dir in $PATH
30090do
30091  IFS=$as_save_IFS
30092  test -z "$as_dir" && as_dir=.
30093    for ac_exec_ext in '' $ac_executable_extensions; do
30094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30095    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30097    break 2
30098  fi
30099done
30100  done
30101IFS=$as_save_IFS
30102
30103  ;;
30104esac
30105fi
30106JAVAC=$ac_cv_path_JAVAC
30107if test -n "$JAVAC"; then
30108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30109$as_echo "$JAVAC" >&6; }
30110else
30111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30112$as_echo "no" >&6; }
30113fi
30114
30115
30116          if test "x$JAVAC" = x; then
30117            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30118          fi
30119        else
30120          # Otherwise we believe it is a complete path. Use it as it is.
30121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30122$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30123          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30124$as_echo_n "checking for JAVAC... " >&6; }
30125          if test ! -x "$tool_specified"; then
30126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30127$as_echo "not found" >&6; }
30128            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30129          fi
30130          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30131$as_echo "$tool_specified" >&6; }
30132        fi
30133      fi
30134    fi
30135
30136  fi
30137
30138
30139
30140  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30141
30142  # Publish this variable in the help.
30143
30144
30145  if [ -z "${JAVAH+x}" ]; then
30146    # The variable is not set by user, try to locate tool using the code snippet
30147
30148      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30149$as_echo_n "checking for javah in Boot JDK... " >&6; }
30150      JAVAH=$BOOT_JDK/bin/javah
30151      if test ! -x $JAVAH; then
30152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30153$as_echo "not found" >&6; }
30154        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30155$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30156        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30157      fi
30158      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30159$as_echo "ok" >&6; }
30160
30161
30162  else
30163    # The variable is set, but is it from the command line or the environment?
30164
30165    # Try to remove the string !JAVAH! from our list.
30166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30168      # If it failed, the variable was not from the command line. Ignore it,
30169      # but warn the user (except for BASH, which is always set by the calling BASH).
30170      if test "xJAVAH" != xBASH; then
30171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30172$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30173      fi
30174      # Try to locate tool using the code snippet
30175
30176      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30177$as_echo_n "checking for javah in Boot JDK... " >&6; }
30178      JAVAH=$BOOT_JDK/bin/javah
30179      if test ! -x $JAVAH; then
30180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30181$as_echo "not found" >&6; }
30182        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30183$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30184        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30185      fi
30186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30187$as_echo "ok" >&6; }
30188
30189
30190    else
30191      # If it succeeded, then it was overridden by the user. We will use it
30192      # for the tool.
30193
30194      # First remove it from the list of overridden variables, so we can test
30195      # for unknown variables in the end.
30196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30197
30198      # Check if we try to supply an empty value
30199      if test "x$JAVAH" = x; then
30200        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30201$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30203$as_echo_n "checking for JAVAH... " >&6; }
30204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30205$as_echo "disabled" >&6; }
30206      else
30207        # Check if the provided tool contains a complete path.
30208        tool_specified="$JAVAH"
30209        tool_basename="${tool_specified##*/}"
30210        if test "x$tool_basename" = "x$tool_specified"; then
30211          # A command without a complete path is provided, search $PATH.
30212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30213$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30214          # Extract the first word of "$tool_basename", so it can be a program name with args.
30215set dummy $tool_basename; ac_word=$2
30216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30217$as_echo_n "checking for $ac_word... " >&6; }
30218if ${ac_cv_path_JAVAH+:} false; then :
30219  $as_echo_n "(cached) " >&6
30220else
30221  case $JAVAH in
30222  [\\/]* | ?:[\\/]*)
30223  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30224  ;;
30225  *)
30226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30227for as_dir in $PATH
30228do
30229  IFS=$as_save_IFS
30230  test -z "$as_dir" && as_dir=.
30231    for ac_exec_ext in '' $ac_executable_extensions; do
30232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30233    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30235    break 2
30236  fi
30237done
30238  done
30239IFS=$as_save_IFS
30240
30241  ;;
30242esac
30243fi
30244JAVAH=$ac_cv_path_JAVAH
30245if test -n "$JAVAH"; then
30246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30247$as_echo "$JAVAH" >&6; }
30248else
30249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30250$as_echo "no" >&6; }
30251fi
30252
30253
30254          if test "x$JAVAH" = x; then
30255            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30256          fi
30257        else
30258          # Otherwise we believe it is a complete path. Use it as it is.
30259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30260$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30261          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30262$as_echo_n "checking for JAVAH... " >&6; }
30263          if test ! -x "$tool_specified"; then
30264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30265$as_echo "not found" >&6; }
30266            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30267          fi
30268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30269$as_echo "$tool_specified" >&6; }
30270        fi
30271      fi
30272    fi
30273
30274  fi
30275
30276
30277
30278  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30279
30280  # Publish this variable in the help.
30281
30282
30283  if [ -z "${JAR+x}" ]; then
30284    # The variable is not set by user, try to locate tool using the code snippet
30285
30286      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30287$as_echo_n "checking for jar in Boot JDK... " >&6; }
30288      JAR=$BOOT_JDK/bin/jar
30289      if test ! -x $JAR; then
30290        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30291$as_echo "not found" >&6; }
30292        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30293$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30294        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30295      fi
30296      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30297$as_echo "ok" >&6; }
30298
30299
30300  else
30301    # The variable is set, but is it from the command line or the environment?
30302
30303    # Try to remove the string !JAR! from our list.
30304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30306      # If it failed, the variable was not from the command line. Ignore it,
30307      # but warn the user (except for BASH, which is always set by the calling BASH).
30308      if test "xJAR" != xBASH; then
30309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30310$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30311      fi
30312      # Try to locate tool using the code snippet
30313
30314      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30315$as_echo_n "checking for jar in Boot JDK... " >&6; }
30316      JAR=$BOOT_JDK/bin/jar
30317      if test ! -x $JAR; then
30318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30319$as_echo "not found" >&6; }
30320        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30321$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30322        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30323      fi
30324      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30325$as_echo "ok" >&6; }
30326
30327
30328    else
30329      # If it succeeded, then it was overridden by the user. We will use it
30330      # for the tool.
30331
30332      # First remove it from the list of overridden variables, so we can test
30333      # for unknown variables in the end.
30334      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30335
30336      # Check if we try to supply an empty value
30337      if test "x$JAR" = x; then
30338        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30339$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30341$as_echo_n "checking for JAR... " >&6; }
30342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30343$as_echo "disabled" >&6; }
30344      else
30345        # Check if the provided tool contains a complete path.
30346        tool_specified="$JAR"
30347        tool_basename="${tool_specified##*/}"
30348        if test "x$tool_basename" = "x$tool_specified"; then
30349          # A command without a complete path is provided, search $PATH.
30350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30351$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30352          # Extract the first word of "$tool_basename", so it can be a program name with args.
30353set dummy $tool_basename; ac_word=$2
30354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30355$as_echo_n "checking for $ac_word... " >&6; }
30356if ${ac_cv_path_JAR+:} false; then :
30357  $as_echo_n "(cached) " >&6
30358else
30359  case $JAR in
30360  [\\/]* | ?:[\\/]*)
30361  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30362  ;;
30363  *)
30364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30365for as_dir in $PATH
30366do
30367  IFS=$as_save_IFS
30368  test -z "$as_dir" && as_dir=.
30369    for ac_exec_ext in '' $ac_executable_extensions; do
30370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30371    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30373    break 2
30374  fi
30375done
30376  done
30377IFS=$as_save_IFS
30378
30379  ;;
30380esac
30381fi
30382JAR=$ac_cv_path_JAR
30383if test -n "$JAR"; then
30384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30385$as_echo "$JAR" >&6; }
30386else
30387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30388$as_echo "no" >&6; }
30389fi
30390
30391
30392          if test "x$JAR" = x; then
30393            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30394          fi
30395        else
30396          # Otherwise we believe it is a complete path. Use it as it is.
30397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30398$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30399          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30400$as_echo_n "checking for JAR... " >&6; }
30401          if test ! -x "$tool_specified"; then
30402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30403$as_echo "not found" >&6; }
30404            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30405          fi
30406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30407$as_echo "$tool_specified" >&6; }
30408        fi
30409      fi
30410    fi
30411
30412  fi
30413
30414
30415
30416  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30417
30418  # Publish this variable in the help.
30419
30420
30421  if [ -z "${JARSIGNER+x}" ]; then
30422    # The variable is not set by user, try to locate tool using the code snippet
30423
30424      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30425$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30426      JARSIGNER=$BOOT_JDK/bin/jarsigner
30427      if test ! -x $JARSIGNER; then
30428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30429$as_echo "not found" >&6; }
30430        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30431$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30432        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30433      fi
30434      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30435$as_echo "ok" >&6; }
30436
30437
30438  else
30439    # The variable is set, but is it from the command line or the environment?
30440
30441    # Try to remove the string !JARSIGNER! from our list.
30442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30444      # If it failed, the variable was not from the command line. Ignore it,
30445      # but warn the user (except for BASH, which is always set by the calling BASH).
30446      if test "xJARSIGNER" != xBASH; then
30447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30448$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30449      fi
30450      # Try to locate tool using the code snippet
30451
30452      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30453$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30454      JARSIGNER=$BOOT_JDK/bin/jarsigner
30455      if test ! -x $JARSIGNER; then
30456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30457$as_echo "not found" >&6; }
30458        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30459$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30460        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30461      fi
30462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30463$as_echo "ok" >&6; }
30464
30465
30466    else
30467      # If it succeeded, then it was overridden by the user. We will use it
30468      # for the tool.
30469
30470      # First remove it from the list of overridden variables, so we can test
30471      # for unknown variables in the end.
30472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30473
30474      # Check if we try to supply an empty value
30475      if test "x$JARSIGNER" = x; then
30476        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30477$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30478        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30479$as_echo_n "checking for JARSIGNER... " >&6; }
30480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30481$as_echo "disabled" >&6; }
30482      else
30483        # Check if the provided tool contains a complete path.
30484        tool_specified="$JARSIGNER"
30485        tool_basename="${tool_specified##*/}"
30486        if test "x$tool_basename" = "x$tool_specified"; then
30487          # A command without a complete path is provided, search $PATH.
30488          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30489$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30490          # Extract the first word of "$tool_basename", so it can be a program name with args.
30491set dummy $tool_basename; ac_word=$2
30492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30493$as_echo_n "checking for $ac_word... " >&6; }
30494if ${ac_cv_path_JARSIGNER+:} false; then :
30495  $as_echo_n "(cached) " >&6
30496else
30497  case $JARSIGNER in
30498  [\\/]* | ?:[\\/]*)
30499  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30500  ;;
30501  *)
30502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30503for as_dir in $PATH
30504do
30505  IFS=$as_save_IFS
30506  test -z "$as_dir" && as_dir=.
30507    for ac_exec_ext in '' $ac_executable_extensions; do
30508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30509    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30511    break 2
30512  fi
30513done
30514  done
30515IFS=$as_save_IFS
30516
30517  ;;
30518esac
30519fi
30520JARSIGNER=$ac_cv_path_JARSIGNER
30521if test -n "$JARSIGNER"; then
30522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30523$as_echo "$JARSIGNER" >&6; }
30524else
30525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30526$as_echo "no" >&6; }
30527fi
30528
30529
30530          if test "x$JARSIGNER" = x; then
30531            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30532          fi
30533        else
30534          # Otherwise we believe it is a complete path. Use it as it is.
30535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30536$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30537          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30538$as_echo_n "checking for JARSIGNER... " >&6; }
30539          if test ! -x "$tool_specified"; then
30540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30541$as_echo "not found" >&6; }
30542            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30543          fi
30544          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30545$as_echo "$tool_specified" >&6; }
30546        fi
30547      fi
30548    fi
30549
30550  fi
30551
30552
30553
30554  # Finally, set some other options...
30555
30556  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30557  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30558
30559
30560
30561  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30562  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30563  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30564  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30565  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30566  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30567    dummy="$dummy --patch-module foo=bar"
30568    JVM_ARG_OK=true
30569  else
30570    $ECHO "Arg failed:" >&5
30571    $ECHO "$OUTPUT" >&5
30572    JVM_ARG_OK=false
30573  fi
30574
30575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30576$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30577  if test "x$JVM_ARG_OK" = "xtrue"; then
30578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30579$as_echo "yes" >&6; }
30580    BOOT_JDK_MODULAR="true"
30581  else
30582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30583$as_echo "no" >&6; }
30584    BOOT_JDK_MODULAR="false"
30585  fi
30586
30587
30588
30589
30590  # Check if the boot jdk is 32 or 64 bit
30591  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30592    BOOT_JDK_BITS="64"
30593  else
30594    BOOT_JDK_BITS="32"
30595  fi
30596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30597$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30599$as_echo "$BOOT_JDK_BITS" >&6; }
30600
30601
30602
30603
30604# Check whether --with-build-jdk was given.
30605if test "${with_build_jdk+set}" = set; then :
30606  withval=$with_build_jdk;
30607fi
30608
30609
30610  CREATE_BUILDJDK=false
30611  EXTERNAL_BUILDJDK=false
30612  BUILD_JDK_FOUND="no"
30613  if test "x$with_build_jdk" != "x"; then
30614
30615  if test "x$BUILD_JDK_FOUND" = xno; then
30616    # Execute the test
30617
30618       if test "x$with_build_jdk" != x; then
30619         BUILD_JDK=$with_build_jdk
30620         BUILD_JDK_FOUND=maybe
30621         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30622$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30623       fi
30624
30625    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30626    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30627      # Do we have a bin/java?
30628      if test ! -x "$BUILD_JDK/bin/java"; then
30629        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30630$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30631        BUILD_JDK_FOUND=no
30632      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30633        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30634$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30635        BUILD_JDK_FOUND=no
30636      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30637        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30638$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30639        BUILD_JDK_FOUND=no
30640      elif test ! -x "$BUILD_JDK/bin/javac"; then
30641        # Do we have a bin/javac?
30642        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30643$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30644        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30645$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30646        BUILD_JDK_FOUND=no
30647      else
30648        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30649        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30650
30651        # Extra M4 quote needed to protect [] in grep expression.
30652        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30653        if test "x$FOUND_CORRECT_VERSION" = x; then
30654          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30655$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30656          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30657$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30658          BUILD_JDK_FOUND=no
30659        else
30660          # We're done!
30661          BUILD_JDK_FOUND=yes
30662
30663  # Only process if variable expands to non-empty
30664
30665  if test "x$BUILD_JDK" != x; then
30666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30667
30668  # Input might be given as Windows format, start by converting to
30669  # unix format.
30670  path="$BUILD_JDK"
30671  new_path=`$CYGPATH -u "$path"`
30672
30673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30676  # "foo.exe" is OK but "foo" is an error.
30677  #
30678  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30679  # It is also a way to make sure we got the proper file name for the real test later on.
30680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30681  if test "x$test_shortpath" = x; then
30682    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30683$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30684    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30685  fi
30686
30687  # Call helper function which possibly converts this using DOS-style short mode.
30688  # If so, the updated path is stored in $new_path.
30689
30690  input_path="$new_path"
30691  # Check if we need to convert this using DOS-style short mode. If the path
30692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30693  # take no chances and rewrite it.
30694  # Note: m4 eats our [], so we need to use [ and ] instead.
30695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30696  if test "x$has_forbidden_chars" != x; then
30697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30701      # Going to short mode and back again did indeed matter. Since short mode is
30702      # case insensitive, let's make it lowercase to improve readability.
30703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30704      # Now convert it back to Unix-style (cygpath)
30705      input_path=`$CYGPATH -u "$shortmode_path"`
30706      new_path="$input_path"
30707    fi
30708  fi
30709
30710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30711  if test "x$test_cygdrive_prefix" = x; then
30712    # As a simple fix, exclude /usr/bin since it's not a real path.
30713    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30715      # a path prefixed by /cygdrive for fixpath to work.
30716      new_path="$CYGWIN_ROOT_PATH$input_path"
30717    fi
30718  fi
30719
30720
30721  if test "x$path" != "x$new_path"; then
30722    BUILD_JDK="$new_path"
30723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30724$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30725  fi
30726
30727    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30728
30729  path="$BUILD_JDK"
30730  has_colon=`$ECHO $path | $GREP ^.:`
30731  new_path="$path"
30732  if test "x$has_colon" = x; then
30733    # Not in mixed or Windows style, start by that.
30734    new_path=`cmd //c echo $path`
30735  fi
30736
30737
30738  input_path="$new_path"
30739  # Check if we need to convert this using DOS-style short mode. If the path
30740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30741  # take no chances and rewrite it.
30742  # Note: m4 eats our [], so we need to use [ and ] instead.
30743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30744  if test "x$has_forbidden_chars" != x; then
30745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30747  fi
30748
30749
30750  windows_path="$new_path"
30751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30752    unix_path=`$CYGPATH -u "$windows_path"`
30753    new_path="$unix_path"
30754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30756    new_path="$unix_path"
30757  fi
30758
30759  if test "x$path" != "x$new_path"; then
30760    BUILD_JDK="$new_path"
30761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30762$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30763  fi
30764
30765  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30766  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30767
30768    else
30769      # We're on a unix platform. Hooray! :)
30770      path="$BUILD_JDK"
30771      has_space=`$ECHO "$path" | $GREP " "`
30772      if test "x$has_space" != x; then
30773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30774$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30775        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30776      fi
30777
30778      # Use eval to expand a potential ~
30779      eval path="$path"
30780      if test ! -f "$path" && test ! -d "$path"; then
30781        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30782      fi
30783
30784      if test -d "$path"; then
30785        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30786      else
30787        dir="`$DIRNAME "$path"`"
30788        base="`$BASENAME "$path"`"
30789        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30790      fi
30791    fi
30792  fi
30793
30794          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30795$as_echo_n "checking for Build JDK... " >&6; }
30796          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30797$as_echo "$BUILD_JDK" >&6; }
30798          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30799$as_echo_n "checking Build JDK version... " >&6; }
30800          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30801          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30802$as_echo "$BUILD_JDK_VERSION" >&6; }
30803        fi # end check jdk version
30804      fi # end check java
30805    fi # end check build jdk found
30806  fi
30807
30808    EXTERNAL_BUILDJDK=true
30809  else
30810    if test "x$COMPILE_TYPE" = "xcross"; then
30811      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30812      BUILD_JDK_FOUND=yes
30813      CREATE_BUILDJDK=true
30814      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30815$as_echo_n "checking for Build JDK... " >&6; }
30816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30817$as_echo "yes, will build it for the host platform" >&6; }
30818    else
30819      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30820      BUILD_JDK_FOUND=yes
30821      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30822$as_echo_n "checking for Build JDK... " >&6; }
30823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30824$as_echo "yes, will use output dir" >&6; }
30825    fi
30826  fi
30827
30828  JMOD="$BUILD_JDK/bin/jmod"
30829  JLINK="$BUILD_JDK/bin/jlink"
30830
30831
30832
30833  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30835$as_echo_n "checking for Build JDK... " >&6; }
30836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30837$as_echo "no" >&6; }
30838    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30839  fi
30840
30841
30842
30843
30844
30845
30846###############################################################################
30847#
30848# Configure the sources to use. We can add or override individual directories.
30849#
30850###############################################################################
30851
30852
30853  # Where are the sources.
30854  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30855  CORBA_TOPDIR="$SRC_ROOT/corba"
30856  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30857  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30858  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30859  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30860  JDK_TOPDIR="$SRC_ROOT/jdk"
30861
30862
30863
30864
30865
30866
30867
30868
30869
30870  # This feature is no longer supported.
30871
30872
30873
30874# Check whether --with-add-source-root was given.
30875if test "${with_add_source_root+set}" = set; then :
30876  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
30877$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30878fi
30879
30880
30881
30882
30883# Check whether --with-override-source-root was given.
30884if test "${with_override_source_root+set}" = set; then :
30885  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
30886$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30887fi
30888
30889
30890
30891
30892# Check whether --with-adds-and-overrides was given.
30893if test "${with_adds_and_overrides+set}" = set; then :
30894  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
30895$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30896fi
30897
30898
30899
30900
30901# Check whether --with-override-langtools was given.
30902if test "${with_override_langtools+set}" = set; then :
30903  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30904$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30905fi
30906
30907
30908
30909
30910# Check whether --with-override-corba was given.
30911if test "${with_override_corba+set}" = set; then :
30912  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30913$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30914fi
30915
30916
30917
30918
30919# Check whether --with-override-jaxp was given.
30920if test "${with_override_jaxp+set}" = set; then :
30921  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30922$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30923fi
30924
30925
30926
30927
30928# Check whether --with-override-jaxws was given.
30929if test "${with_override_jaxws+set}" = set; then :
30930  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30931$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30932fi
30933
30934
30935
30936
30937# Check whether --with-override-hotspot was given.
30938if test "${with_override_hotspot+set}" = set; then :
30939  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30940$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30941fi
30942
30943
30944
30945
30946# Check whether --with-override-nashorn was given.
30947if test "${with_override_nashorn+set}" = set; then :
30948  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30949$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30950fi
30951
30952
30953
30954
30955# Check whether --with-override-jdk was given.
30956if test "${with_override_jdk+set}" = set; then :
30957  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30958$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30959fi
30960
30961
30962
30963
30964  BUILD_OUTPUT="$OUTPUT_ROOT"
30965
30966  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30967
30968
30969
30970# Check whether --with-import_hotspot was given.
30971if test "${with_import_hotspot+set}" = set; then :
30972  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
30973$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
30974fi
30975
30976
30977
30978
30979
30980
30981# Check whether --with-import-modules was given.
30982if test "${with_import_modules+set}" = set; then :
30983  withval=$with_import_modules;
30984fi
30985
30986
30987  if test "x$with_import_modules" != x \
30988      && test "x$with_import_modules" != "xno"; then
30989    if test -d "$with_import_modules"; then
30990      IMPORT_MODULES_TOPDIR="$with_import_modules"
30991
30992  # Only process if variable expands to non-empty
30993
30994  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30995    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30996
30997  # Input might be given as Windows format, start by converting to
30998  # unix format.
30999  path="$IMPORT_MODULES_TOPDIR"
31000  new_path=`$CYGPATH -u "$path"`
31001
31002  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31003  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31004  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31005  # "foo.exe" is OK but "foo" is an error.
31006  #
31007  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31008  # It is also a way to make sure we got the proper file name for the real test later on.
31009  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31010  if test "x$test_shortpath" = x; then
31011    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31012$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31013    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31014  fi
31015
31016  # Call helper function which possibly converts this using DOS-style short mode.
31017  # If so, the updated path is stored in $new_path.
31018
31019  input_path="$new_path"
31020  # Check if we need to convert this using DOS-style short mode. If the path
31021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31022  # take no chances and rewrite it.
31023  # Note: m4 eats our [], so we need to use [ and ] instead.
31024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31025  if test "x$has_forbidden_chars" != x; then
31026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31030      # Going to short mode and back again did indeed matter. Since short mode is
31031      # case insensitive, let's make it lowercase to improve readability.
31032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31033      # Now convert it back to Unix-style (cygpath)
31034      input_path=`$CYGPATH -u "$shortmode_path"`
31035      new_path="$input_path"
31036    fi
31037  fi
31038
31039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31040  if test "x$test_cygdrive_prefix" = x; then
31041    # As a simple fix, exclude /usr/bin since it's not a real path.
31042    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31044      # a path prefixed by /cygdrive for fixpath to work.
31045      new_path="$CYGWIN_ROOT_PATH$input_path"
31046    fi
31047  fi
31048
31049
31050  if test "x$path" != "x$new_path"; then
31051    IMPORT_MODULES_TOPDIR="$new_path"
31052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31053$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31054  fi
31055
31056    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31057
31058  path="$IMPORT_MODULES_TOPDIR"
31059  has_colon=`$ECHO $path | $GREP ^.:`
31060  new_path="$path"
31061  if test "x$has_colon" = x; then
31062    # Not in mixed or Windows style, start by that.
31063    new_path=`cmd //c echo $path`
31064  fi
31065
31066
31067  input_path="$new_path"
31068  # Check if we need to convert this using DOS-style short mode. If the path
31069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31070  # take no chances and rewrite it.
31071  # Note: m4 eats our [], so we need to use [ and ] instead.
31072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31073  if test "x$has_forbidden_chars" != x; then
31074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31076  fi
31077
31078
31079  windows_path="$new_path"
31080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31081    unix_path=`$CYGPATH -u "$windows_path"`
31082    new_path="$unix_path"
31083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31085    new_path="$unix_path"
31086  fi
31087
31088  if test "x$path" != "x$new_path"; then
31089    IMPORT_MODULES_TOPDIR="$new_path"
31090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31091$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31092  fi
31093
31094  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31095  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31096
31097    else
31098      # We're on a unix platform. Hooray! :)
31099      path="$IMPORT_MODULES_TOPDIR"
31100      has_space=`$ECHO "$path" | $GREP " "`
31101      if test "x$has_space" != x; then
31102        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31103$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31104        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31105      fi
31106
31107      # Use eval to expand a potential ~
31108      eval path="$path"
31109      if test ! -f "$path" && test ! -d "$path"; then
31110        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31111      fi
31112
31113      if test -d "$path"; then
31114        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31115      else
31116        dir="`$DIRNAME "$path"`"
31117        base="`$BASENAME "$path"`"
31118        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31119      fi
31120    fi
31121  fi
31122
31123    elif test -e "$with_import_modules"; then
31124      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31125      $RM -rf "$IMPORT_MODULES_TOPDIR"
31126      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31127      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31128        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31129      fi
31130    else
31131      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31132    fi
31133  fi
31134
31135  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31136    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31137  fi
31138  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31139    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31140  fi
31141  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31142    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31143  fi
31144  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31145    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31146  fi
31147  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31148    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31149  fi
31150  # Workaround for using different imported module-info.java in Jake due to a
31151  # change in format. Remove once new format is standard in JDK 9 and javafx
31152  # delivers just that.
31153  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31154    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31155  fi
31156  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31157    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31158  fi
31159
31160
31161
31162
31163
31164
31165
31166
31167
31168###############################################################################
31169#
31170# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31171# native code.
31172#
31173###############################################################################
31174
31175# See if we are doing a complete static build or not
31176
31177  # Check whether --enable-static-build was given.
31178if test "${enable_static_build+set}" = set; then :
31179  enableval=$enable_static_build;
31180fi
31181
31182  STATIC_BUILD=false
31183  if test "x$enable_static_build" = "xyes"; then
31184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31185$as_echo_n "checking if static build is enabled... " >&6; }
31186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31187$as_echo "yes" >&6; }
31188    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31189      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31190    fi
31191    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31192    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31193    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31194    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31195    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31196    STATIC_BUILD=true
31197  elif test "x$enable_static_build" = "xno"; then
31198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31199$as_echo_n "checking if static build is enabled... " >&6; }
31200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31201$as_echo "no" >&6; }
31202  elif test "x$enable_static_build" != "x"; then
31203    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31204  fi
31205
31206
31207
31208
31209# First determine the toolchain type (compiler family)
31210
31211
31212# Check whether --with-toolchain-type was given.
31213if test "${with_toolchain_type+set}" = set; then :
31214  withval=$with_toolchain_type;
31215fi
31216
31217
31218  # Use indirect variable referencing
31219  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31220  VALID_TOOLCHAINS=${!toolchain_var_name}
31221
31222  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31223    if test -n "$XCODEBUILD"; then
31224      # On Mac OS X, default toolchain to clang after Xcode 5
31225      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31226      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31227      if test $? -ne 0; then
31228        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31229      fi
31230      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31231          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31232          $CUT -f 1 -d .`
31233      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31234$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31235      if test $XCODE_MAJOR_VERSION -ge 5; then
31236          DEFAULT_TOOLCHAIN="clang"
31237      else
31238          DEFAULT_TOOLCHAIN="gcc"
31239      fi
31240    else
31241      # If Xcode is not installed, but the command line tools are
31242      # then we can't run xcodebuild. On these systems we should
31243      # default to clang
31244      DEFAULT_TOOLCHAIN="clang"
31245    fi
31246  else
31247    # First toolchain type in the list is the default
31248    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31249  fi
31250
31251  if test "x$with_toolchain_type" = xlist; then
31252    # List all toolchains
31253    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31254$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31255    for toolchain in $VALID_TOOLCHAINS; do
31256      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31257      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31258      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31259    done
31260
31261    exit 0
31262  elif test "x$with_toolchain_type" != x; then
31263    # User override; check that it is valid
31264    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31265      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31266$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31267      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31268$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31269      as_fn_error $? "Cannot continue." "$LINENO" 5
31270    fi
31271    TOOLCHAIN_TYPE=$with_toolchain_type
31272  else
31273    # No flag given, use default
31274    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31275  fi
31276
31277
31278  TOOLCHAIN_CC_BINARY_clang="clang"
31279  TOOLCHAIN_CC_BINARY_gcc="gcc"
31280  TOOLCHAIN_CC_BINARY_microsoft="cl"
31281  TOOLCHAIN_CC_BINARY_solstudio="cc"
31282  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31283
31284  TOOLCHAIN_CXX_BINARY_clang="clang++"
31285  TOOLCHAIN_CXX_BINARY_gcc="g++"
31286  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31287  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31288  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31289
31290  # Use indirect variable referencing
31291  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31292  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31293  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31294  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31295  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31296  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31297  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31298  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31299
31300
31301  # Define filename patterns
31302  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31303    LIBRARY_PREFIX=
31304    SHARED_LIBRARY_SUFFIX='.dll'
31305    STATIC_LIBRARY_SUFFIX='.lib'
31306    SHARED_LIBRARY='$1.dll'
31307    STATIC_LIBRARY='$1.lib'
31308    OBJ_SUFFIX='.obj'
31309    EXE_SUFFIX='.exe'
31310  else
31311    LIBRARY_PREFIX=lib
31312    SHARED_LIBRARY_SUFFIX='.so'
31313    STATIC_LIBRARY_SUFFIX='.a'
31314    SHARED_LIBRARY='lib$1.so'
31315    STATIC_LIBRARY='lib$1.a'
31316    OBJ_SUFFIX='.o'
31317    EXE_SUFFIX=''
31318    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31319      # For full static builds, we're overloading the SHARED_LIBRARY
31320      # variables in order to limit the amount of changes required.
31321      # It would be better to remove SHARED and just use LIBRARY and
31322      # LIBRARY_SUFFIX for libraries that can be built either
31323      # shared or static and use STATIC_* for libraries that are
31324      # always built statically.
31325      if test "x$STATIC_BUILD" = xtrue; then
31326        SHARED_LIBRARY='lib$1.a'
31327        SHARED_LIBRARY_SUFFIX='.a'
31328      else
31329        SHARED_LIBRARY='lib$1.dylib'
31330        SHARED_LIBRARY_SUFFIX='.dylib'
31331      fi
31332    fi
31333  fi
31334
31335
31336
31337
31338
31339
31340
31341
31342
31343
31344  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31345    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31346$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31347  else
31348    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31349$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31350  fi
31351
31352
31353# User supplied flags should be used when configure detects compilers
31354
31355  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31356    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31357$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31358  fi
31359
31360  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31361    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31362$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31363  fi
31364
31365  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31366    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31367$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31368  fi
31369
31370
31371# Check whether --with-extra-cflags was given.
31372if test "${with_extra_cflags+set}" = set; then :
31373  withval=$with_extra_cflags;
31374fi
31375
31376
31377
31378# Check whether --with-extra-cxxflags was given.
31379if test "${with_extra_cxxflags+set}" = set; then :
31380  withval=$with_extra_cxxflags;
31381fi
31382
31383
31384
31385# Check whether --with-extra-ldflags was given.
31386if test "${with_extra_ldflags+set}" = set; then :
31387  withval=$with_extra_ldflags;
31388fi
31389
31390
31391  EXTRA_CFLAGS="$with_extra_cflags"
31392  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31393  EXTRA_LDFLAGS="$with_extra_ldflags"
31394
31395  # Hotspot needs these set in their legacy form
31396  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31397  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31398  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31399
31400
31401
31402
31403
31404
31405
31406
31407
31408  # The global CFLAGS and LDLAGS variables are used by configure tests and
31409  # should include the extra parameters
31410  CFLAGS="$EXTRA_CFLAGS"
31411  CXXFLAGS="$EXTRA_CXXFLAGS"
31412  LDFLAGS="$EXTRA_LDFLAGS"
31413  CPPFLAGS=""
31414
31415# The sysroot cflags are needed for configure to be able to run the compilers
31416
31417  if test "x$SYSROOT" != "x"; then
31418    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31419      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31420        # Solaris Studio does not have a concept of sysroot. Instead we must
31421        # make sure the default include and lib dirs are appended to each
31422        # compile and link command line. Must also add -I-xbuiltin to enable
31423        # inlining of system functions and intrinsics.
31424        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31425        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31426            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31427      fi
31428    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31429      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31430      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31431    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31432      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31433      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31434    fi
31435    # Propagate the sysroot args to hotspot
31436    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31437    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31438    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31439    # The global CFLAGS and LDFLAGS variables need these for configure to function
31440    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31441    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31442    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31443    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31444  fi
31445
31446  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31447    # We also need -iframework<path>/System/Library/Frameworks
31448    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31449    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31450    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31451    # set this here so it doesn't have to be peppered throughout the forest
31452    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31453    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31454  fi
31455
31456
31457
31458
31459
31460# Then detect the actual binaries needed
31461
31462  # FIXME: Is this needed?
31463  ac_ext=cpp
31464ac_cpp='$CXXCPP $CPPFLAGS'
31465ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31466ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31467ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31468
31469
31470  # Store the CFLAGS etc passed to the configure script.
31471  ORG_CFLAGS="$CFLAGS"
31472  ORG_CXXFLAGS="$CXXFLAGS"
31473
31474  # autoconf magic only relies on PATH, so update it if tools dir is specified
31475  OLD_PATH="$PATH"
31476
31477  # On Windows, we need to detect the visual studio installation first.
31478  # This will change the PATH, but we need to keep that new PATH even
31479  # after toolchain detection is done, since the compiler (on x86) uses
31480  # it for DLL resolution in runtime.
31481  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31482      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31483
31484  # Store path to cygwin link.exe to help excluding it when searching for
31485  # VS linker. This must be done before changing the PATH when looking for VS.
31486  # Extract the first word of "link", so it can be a program name with args.
31487set dummy link; ac_word=$2
31488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31489$as_echo_n "checking for $ac_word... " >&6; }
31490if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31491  $as_echo_n "(cached) " >&6
31492else
31493  case $CYGWIN_LINK in
31494  [\\/]* | ?:[\\/]*)
31495  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31496  ;;
31497  *)
31498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31499for as_dir in $PATH
31500do
31501  IFS=$as_save_IFS
31502  test -z "$as_dir" && as_dir=.
31503    for ac_exec_ext in '' $ac_executable_extensions; do
31504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31505    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31507    break 2
31508  fi
31509done
31510  done
31511IFS=$as_save_IFS
31512
31513  ;;
31514esac
31515fi
31516CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31517if test -n "$CYGWIN_LINK"; then
31518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31519$as_echo "$CYGWIN_LINK" >&6; }
31520else
31521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31522$as_echo "no" >&6; }
31523fi
31524
31525
31526  if test "x$CYGWIN_LINK" != x; then
31527    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31528$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31529    "$CYGWIN_LINK" --version > /dev/null
31530    if test $? -eq 0 ; then
31531      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31532$as_echo "yes" >&6; }
31533    else
31534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31535$as_echo "no" >&6; }
31536      # This might be the VS linker. Don't exclude it later on.
31537      CYGWIN_LINK=""
31538    fi
31539  fi
31540
31541  # First-hand choice is to locate and run the vsvars bat file.
31542
31543
31544# Check whether --with-toolchain-version was given.
31545if test "${with_toolchain_version+set}" = set; then :
31546  withval=$with_toolchain_version;
31547fi
31548
31549
31550  if test "x$with_toolchain_version" = xlist; then
31551    # List all toolchains
31552    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31553$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31554    for version in $VALID_VS_VERSIONS; do
31555      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31556      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31557    done
31558
31559    exit 0
31560  elif test "x$DEVKIT_VS_VERSION" != x; then
31561    VS_VERSION=$DEVKIT_VS_VERSION
31562    TOOLCHAIN_VERSION=$VS_VERSION
31563    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31564    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31565    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31566    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31567    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31568    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31569
31570    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31571    # can still be exported as INCLUDE for compiler invocations without
31572    # SYSROOT_CFLAGS
31573    OLDIFS="$IFS"
31574    IFS=";"
31575    for i in $DEVKIT_VS_INCLUDE; do
31576      ipath=$i
31577
31578  unix_path="$ipath"
31579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31580    windows_path=`$CYGPATH -m "$unix_path"`
31581    ipath="$windows_path"
31582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31583    windows_path=`cmd //c echo $unix_path`
31584    ipath="$windows_path"
31585  fi
31586
31587      VS_INCLUDE="$VS_INCLUDE;$ipath"
31588    done
31589    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31590    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31591    for i in $DEVKIT_VS_LIB; do
31592      libpath=$i
31593
31594  unix_path="$libpath"
31595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31596    windows_path=`$CYGPATH -m "$unix_path"`
31597    libpath="$windows_path"
31598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31599    windows_path=`cmd //c echo $unix_path`
31600    libpath="$windows_path"
31601  fi
31602
31603      VS_LIB="$VS_LIB;$libpath"
31604    done
31605    IFS="$OLDIFS"
31606
31607    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31608$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31609
31610  elif test "x$with_toolchain_version" != x; then
31611    # User override; check that it is valid
31612    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31613      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31614$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31615      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31616$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31617      as_fn_error $? "Cannot continue." "$LINENO" 5
31618    fi
31619    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31620  else
31621    # No flag given, use default
31622    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31623  fi
31624
31625  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31626
31627  VS_VERSION="$VS_VERSION"
31628  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31629  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31630  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31631  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31632
31633  # When using --with-tools-dir, assume it points to the correct and default
31634  # version of Visual Studio or that --with-toolchain-version was also set.
31635  if test "x$with_tools_dir" != x; then
31636
31637  if test "x$VS_ENV_CMD" = x; then
31638    VS_VERSION="${VS_VERSION}"
31639    VS_BASE="$with_tools_dir/../.."
31640    METHOD="--with-tools-dir"
31641
31642    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31643      VCVARSFILE="vc/bin/vcvars32.bat"
31644    else
31645      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31646    fi
31647
31648
31649  windows_path="$VS_BASE"
31650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31651    unix_path=`$CYGPATH -u "$windows_path"`
31652    VS_BASE="$unix_path"
31653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31655    VS_BASE="$unix_path"
31656  fi
31657
31658    if test -d "$VS_BASE"; then
31659      if test -f "$VS_BASE/$VCVARSFILE"; then
31660        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31661$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31662        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31663        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31664        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31665        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31666      else
31667        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31668$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31669        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31670$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31671      fi
31672    fi
31673  fi
31674
31675
31676  if test "x$VS_ENV_CMD" = x; then
31677    VS_VERSION="${VS_VERSION}"
31678    VS_BASE="$with_tools_dir/../../.."
31679    METHOD="--with-tools-dir"
31680
31681    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31682      VCVARSFILE="vc/bin/vcvars32.bat"
31683    else
31684      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31685    fi
31686
31687
31688  windows_path="$VS_BASE"
31689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31690    unix_path=`$CYGPATH -u "$windows_path"`
31691    VS_BASE="$unix_path"
31692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31694    VS_BASE="$unix_path"
31695  fi
31696
31697    if test -d "$VS_BASE"; then
31698      if test -f "$VS_BASE/$VCVARSFILE"; then
31699        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31700$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31701        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31702        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31703        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31704        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31705      else
31706        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31707$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31708        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31709$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31710      fi
31711    fi
31712  fi
31713
31714    if test "x$VS_ENV_CMD" = x; then
31715      # Having specified an argument which is incorrect will produce an instant failure;
31716      # we should not go on looking
31717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31718$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31719      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31720$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31721      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31722$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31723      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31724    fi
31725  fi
31726
31727  VS_ENV_CMD=""
31728  VS_ENV_ARGS=""
31729
31730  if test "x$VS_COMNTOOLS" != x; then
31731
31732  if test "x$VS_ENV_CMD" = x; then
31733    VS_VERSION="${VS_VERSION}"
31734    VS_BASE="$VS_COMNTOOLS/../.."
31735    METHOD="$VS_COMNTOOLS_VAR variable"
31736
31737    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31738      VCVARSFILE="vc/bin/vcvars32.bat"
31739    else
31740      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31741    fi
31742
31743
31744  windows_path="$VS_BASE"
31745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31746    unix_path=`$CYGPATH -u "$windows_path"`
31747    VS_BASE="$unix_path"
31748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31750    VS_BASE="$unix_path"
31751  fi
31752
31753    if test -d "$VS_BASE"; then
31754      if test -f "$VS_BASE/$VCVARSFILE"; then
31755        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31756$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31757        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31758        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31759        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31760        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31761      else
31762        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31763$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31764        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31765$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31766      fi
31767    fi
31768  fi
31769
31770  fi
31771  if test "x$PROGRAMFILES" != x; then
31772
31773  if test "x$VS_ENV_CMD" = x; then
31774    VS_VERSION="${VS_VERSION}"
31775    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31776    METHOD="well-known name"
31777
31778    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31779      VCVARSFILE="vc/bin/vcvars32.bat"
31780    else
31781      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31782    fi
31783
31784
31785  windows_path="$VS_BASE"
31786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31787    unix_path=`$CYGPATH -u "$windows_path"`
31788    VS_BASE="$unix_path"
31789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31791    VS_BASE="$unix_path"
31792  fi
31793
31794    if test -d "$VS_BASE"; then
31795      if test -f "$VS_BASE/$VCVARSFILE"; then
31796        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31797$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31798        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31799        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31800        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31801        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31802      else
31803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31804$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31805        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31806$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31807      fi
31808    fi
31809  fi
31810
31811  fi
31812  # Work around the insanely named ProgramFiles(x86) env variable
31813  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31814  if test "x$PROGRAMFILES_X86" != x; then
31815
31816  if test "x$VS_ENV_CMD" = x; then
31817    VS_VERSION="${VS_VERSION}"
31818    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31819    METHOD="well-known name"
31820
31821    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31822      VCVARSFILE="vc/bin/vcvars32.bat"
31823    else
31824      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31825    fi
31826
31827
31828  windows_path="$VS_BASE"
31829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31830    unix_path=`$CYGPATH -u "$windows_path"`
31831    VS_BASE="$unix_path"
31832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31834    VS_BASE="$unix_path"
31835  fi
31836
31837    if test -d "$VS_BASE"; then
31838      if test -f "$VS_BASE/$VCVARSFILE"; then
31839        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31840$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31841        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31842        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31843        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31844        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31845      else
31846        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31847$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31848        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31849$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31850      fi
31851    fi
31852  fi
31853
31854  fi
31855
31856  if test "x$VS_ENV_CMD" = x; then
31857    VS_VERSION="${VS_VERSION}"
31858    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31859    METHOD="well-known name"
31860
31861    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31862      VCVARSFILE="vc/bin/vcvars32.bat"
31863    else
31864      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31865    fi
31866
31867
31868  windows_path="$VS_BASE"
31869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31870    unix_path=`$CYGPATH -u "$windows_path"`
31871    VS_BASE="$unix_path"
31872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31874    VS_BASE="$unix_path"
31875  fi
31876
31877    if test -d "$VS_BASE"; then
31878      if test -f "$VS_BASE/$VCVARSFILE"; then
31879        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31880$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31881        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31882        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31883        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31884        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31885      else
31886        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31887$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31888        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31889$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31890      fi
31891    fi
31892  fi
31893
31894
31895  if test "x$VS_ENV_CMD" = x; then
31896    VS_VERSION="${VS_VERSION}"
31897    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31898    METHOD="well-known name"
31899
31900    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31901      VCVARSFILE="vc/bin/vcvars32.bat"
31902    else
31903      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31904    fi
31905
31906
31907  windows_path="$VS_BASE"
31908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31909    unix_path=`$CYGPATH -u "$windows_path"`
31910    VS_BASE="$unix_path"
31911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31913    VS_BASE="$unix_path"
31914  fi
31915
31916    if test -d "$VS_BASE"; then
31917      if test -f "$VS_BASE/$VCVARSFILE"; then
31918        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31919$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31920        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31921        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31922        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31923        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31924      else
31925        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31926$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31927        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31928$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31929      fi
31930    fi
31931  fi
31932
31933
31934  if test "x$SDK_INSTALL_DIR" != x; then
31935    if test "x$ProgramW6432" != x; then
31936
31937  if test "x$VS_ENV_CMD" = x; then
31938    VS_VERSION="${VS_VERSION}"
31939    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31940    METHOD="well-known name"
31941
31942  windows_path="$WIN_SDK_BASE"
31943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31944    unix_path=`$CYGPATH -u "$windows_path"`
31945    WIN_SDK_BASE="$unix_path"
31946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31948    WIN_SDK_BASE="$unix_path"
31949  fi
31950
31951    if test -d "$WIN_SDK_BASE"; then
31952      # There have been cases of partial or broken SDK installations. A missing
31953      # lib dir is not going to work.
31954      if test ! -d "$WIN_SDK_BASE/lib"; then
31955        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31956$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31957        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31958$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31959      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31960        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31961$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31962        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31963        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31964          VS_ENV_ARGS="/x86"
31965        else
31966          VS_ENV_ARGS="/x64"
31967        fi
31968        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31969        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31970        # TODO: improve detection for other versions of SDK
31971        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31972      else
31973        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31974$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31975        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31976$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31977      fi
31978    fi
31979  fi
31980
31981    fi
31982    if test "x$PROGRAMW6432" != x; then
31983
31984  if test "x$VS_ENV_CMD" = x; then
31985    VS_VERSION="${VS_VERSION}"
31986    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31987    METHOD="well-known name"
31988
31989  windows_path="$WIN_SDK_BASE"
31990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31991    unix_path=`$CYGPATH -u "$windows_path"`
31992    WIN_SDK_BASE="$unix_path"
31993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31995    WIN_SDK_BASE="$unix_path"
31996  fi
31997
31998    if test -d "$WIN_SDK_BASE"; then
31999      # There have been cases of partial or broken SDK installations. A missing
32000      # lib dir is not going to work.
32001      if test ! -d "$WIN_SDK_BASE/lib"; then
32002        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32003$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32004        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32005$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32006      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32007        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32008$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32009        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32010        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32011          VS_ENV_ARGS="/x86"
32012        else
32013          VS_ENV_ARGS="/x64"
32014        fi
32015        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32016        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32017        # TODO: improve detection for other versions of SDK
32018        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32019      else
32020        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32021$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32022        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32023$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32024      fi
32025    fi
32026  fi
32027
32028    fi
32029    if test "x$PROGRAMFILES" != x; then
32030
32031  if test "x$VS_ENV_CMD" = x; then
32032    VS_VERSION="${VS_VERSION}"
32033    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32034    METHOD="well-known name"
32035
32036  windows_path="$WIN_SDK_BASE"
32037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32038    unix_path=`$CYGPATH -u "$windows_path"`
32039    WIN_SDK_BASE="$unix_path"
32040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32042    WIN_SDK_BASE="$unix_path"
32043  fi
32044
32045    if test -d "$WIN_SDK_BASE"; then
32046      # There have been cases of partial or broken SDK installations. A missing
32047      # lib dir is not going to work.
32048      if test ! -d "$WIN_SDK_BASE/lib"; then
32049        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32050$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32051        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32052$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32053      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32054        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32055$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32056        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32057        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32058          VS_ENV_ARGS="/x86"
32059        else
32060          VS_ENV_ARGS="/x64"
32061        fi
32062        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32063        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32064        # TODO: improve detection for other versions of SDK
32065        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32066      else
32067        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32068$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32069        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32070$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32071      fi
32072    fi
32073  fi
32074
32075    fi
32076
32077  if test "x$VS_ENV_CMD" = x; then
32078    VS_VERSION="${VS_VERSION}"
32079    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32080    METHOD="well-known name"
32081
32082  windows_path="$WIN_SDK_BASE"
32083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32084    unix_path=`$CYGPATH -u "$windows_path"`
32085    WIN_SDK_BASE="$unix_path"
32086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32088    WIN_SDK_BASE="$unix_path"
32089  fi
32090
32091    if test -d "$WIN_SDK_BASE"; then
32092      # There have been cases of partial or broken SDK installations. A missing
32093      # lib dir is not going to work.
32094      if test ! -d "$WIN_SDK_BASE/lib"; then
32095        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32096$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32097        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32098$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32099      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32100        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32101$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32102        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32103        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32104          VS_ENV_ARGS="/x86"
32105        else
32106          VS_ENV_ARGS="/x64"
32107        fi
32108        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32109        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32110        # TODO: improve detection for other versions of SDK
32111        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32112      else
32113        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32114$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32115        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32116$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32117      fi
32118    fi
32119  fi
32120
32121
32122  if test "x$VS_ENV_CMD" = x; then
32123    VS_VERSION="${VS_VERSION}"
32124    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32125    METHOD="well-known name"
32126
32127  windows_path="$WIN_SDK_BASE"
32128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32129    unix_path=`$CYGPATH -u "$windows_path"`
32130    WIN_SDK_BASE="$unix_path"
32131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32133    WIN_SDK_BASE="$unix_path"
32134  fi
32135
32136    if test -d "$WIN_SDK_BASE"; then
32137      # There have been cases of partial or broken SDK installations. A missing
32138      # lib dir is not going to work.
32139      if test ! -d "$WIN_SDK_BASE/lib"; then
32140        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32141$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32142        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32143$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32144      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32145        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32146$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32147        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32148        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32149          VS_ENV_ARGS="/x86"
32150        else
32151          VS_ENV_ARGS="/x64"
32152        fi
32153        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32154        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32155        # TODO: improve detection for other versions of SDK
32156        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32157      else
32158        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32159$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32160        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32161$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32162      fi
32163    fi
32164  fi
32165
32166  fi
32167
32168    if test "x$VS_ENV_CMD" != x; then
32169      TOOLCHAIN_VERSION=$VS_VERSION
32170      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32171      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32172      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32173      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32174      # The rest of the variables are already evaled while probing
32175      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32176$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32177      break
32178    fi
32179  done
32180
32181
32182  # If we have a devkit, skip all of the below.
32183  if test "x$DEVKIT_VS_VERSION" = x; then
32184    if test "x$VS_ENV_CMD" != x; then
32185      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32186
32187  # Only process if variable expands to non-empty
32188
32189  if test "x$VS_ENV_CMD" != x; then
32190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32191
32192  # First separate the path from the arguments. This will split at the first
32193  # space.
32194  complete="$VS_ENV_CMD"
32195  path="${complete%% *}"
32196  tmp="$complete EOL"
32197  arguments="${tmp#* }"
32198
32199  # Input might be given as Windows format, start by converting to
32200  # unix format.
32201  new_path=`$CYGPATH -u "$path"`
32202
32203  # Now try to locate executable using which
32204  new_path=`$WHICH "$new_path" 2> /dev/null`
32205  # bat and cmd files are not always considered executable in cygwin causing which
32206  # to not find them
32207  if test "x$new_path" = x \
32208      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32209      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32210    new_path=`$CYGPATH -u "$path"`
32211  fi
32212  if test "x$new_path" = x; then
32213    # Oops. Which didn't find the executable.
32214    # The splitting of arguments from the executable at a space might have been incorrect,
32215    # since paths with space are more likely in Windows. Give it another try with the whole
32216    # argument.
32217    path="$complete"
32218    arguments="EOL"
32219    new_path=`$CYGPATH -u "$path"`
32220    new_path=`$WHICH "$new_path" 2> /dev/null`
32221    # bat and cmd files are not always considered executable in cygwin causing which
32222    # to not find them
32223    if test "x$new_path" = x \
32224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32226      new_path=`$CYGPATH -u "$path"`
32227    fi
32228    if test "x$new_path" = x; then
32229      # It's still not found. Now this is an unrecoverable error.
32230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32231$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32232      has_space=`$ECHO "$complete" | $GREP " "`
32233      if test "x$has_space" != x; then
32234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32236      fi
32237      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32238    fi
32239  fi
32240
32241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32244  # "foo.exe" is OK but "foo" is an error.
32245  #
32246  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32247  # It is also a way to make sure we got the proper file name for the real test later on.
32248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32249  if test "x$test_shortpath" = x; then
32250    # Short path failed, file does not exist as specified.
32251    # Try adding .exe or .cmd
32252    if test -f "${new_path}.exe"; then
32253      input_to_shortpath="${new_path}.exe"
32254    elif test -f "${new_path}.cmd"; then
32255      input_to_shortpath="${new_path}.cmd"
32256    else
32257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32258$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32259      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32260$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32261      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32262    fi
32263  else
32264    input_to_shortpath="$new_path"
32265  fi
32266
32267  # Call helper function which possibly converts this using DOS-style short mode.
32268  # If so, the updated path is stored in $new_path.
32269  new_path="$input_to_shortpath"
32270
32271  input_path="$input_to_shortpath"
32272  # Check if we need to convert this using DOS-style short mode. If the path
32273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32274  # take no chances and rewrite it.
32275  # Note: m4 eats our [], so we need to use [ and ] instead.
32276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32277  if test "x$has_forbidden_chars" != x; then
32278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32282      # Going to short mode and back again did indeed matter. Since short mode is
32283      # case insensitive, let's make it lowercase to improve readability.
32284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32285      # Now convert it back to Unix-style (cygpath)
32286      input_path=`$CYGPATH -u "$shortmode_path"`
32287      new_path="$input_path"
32288    fi
32289  fi
32290
32291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32292  if test "x$test_cygdrive_prefix" = x; then
32293    # As a simple fix, exclude /usr/bin since it's not a real path.
32294    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32296      # a path prefixed by /cygdrive for fixpath to work.
32297      new_path="$CYGWIN_ROOT_PATH$input_path"
32298    fi
32299  fi
32300
32301  # remove trailing .exe if any
32302  new_path="${new_path/%.exe/}"
32303
32304    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32305
32306  # First separate the path from the arguments. This will split at the first
32307  # space.
32308  complete="$VS_ENV_CMD"
32309  path="${complete%% *}"
32310  tmp="$complete EOL"
32311  arguments="${tmp#* }"
32312
32313  # Input might be given as Windows format, start by converting to
32314  # unix format.
32315  new_path="$path"
32316
32317  windows_path="$new_path"
32318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32319    unix_path=`$CYGPATH -u "$windows_path"`
32320    new_path="$unix_path"
32321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32323    new_path="$unix_path"
32324  fi
32325
32326
32327  # Now try to locate executable using which
32328  new_path=`$WHICH "$new_path" 2> /dev/null`
32329
32330  if test "x$new_path" = x; then
32331    # Oops. Which didn't find the executable.
32332    # The splitting of arguments from the executable at a space might have been incorrect,
32333    # since paths with space are more likely in Windows. Give it another try with the whole
32334    # argument.
32335    path="$complete"
32336    arguments="EOL"
32337    new_path="$path"
32338
32339  windows_path="$new_path"
32340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32341    unix_path=`$CYGPATH -u "$windows_path"`
32342    new_path="$unix_path"
32343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32345    new_path="$unix_path"
32346  fi
32347
32348
32349    new_path=`$WHICH "$new_path" 2> /dev/null`
32350    # bat and cmd files are not always considered executable in MSYS causing which
32351    # to not find them
32352    if test "x$new_path" = x \
32353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32355      new_path="$path"
32356
32357  windows_path="$new_path"
32358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32359    unix_path=`$CYGPATH -u "$windows_path"`
32360    new_path="$unix_path"
32361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32363    new_path="$unix_path"
32364  fi
32365
32366    fi
32367
32368    if test "x$new_path" = x; then
32369      # It's still not found. Now this is an unrecoverable error.
32370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32371$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32372      has_space=`$ECHO "$complete" | $GREP " "`
32373      if test "x$has_space" != x; then
32374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32376      fi
32377      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32378    fi
32379  fi
32380
32381  # Now new_path has a complete unix path to the binary
32382  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32383    # Keep paths in /bin as-is, but remove trailing .exe if any
32384    new_path="${new_path/%.exe/}"
32385    # Do not save /bin paths to all_fixpath_prefixes!
32386  else
32387    # Not in mixed or Windows style, start by that.
32388    new_path=`cmd //c echo $new_path`
32389
32390  input_path="$new_path"
32391  # Check if we need to convert this using DOS-style short mode. If the path
32392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32393  # take no chances and rewrite it.
32394  # Note: m4 eats our [], so we need to use [ and ] instead.
32395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32396  if test "x$has_forbidden_chars" != x; then
32397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32399  fi
32400
32401    # Output is in $new_path
32402
32403  windows_path="$new_path"
32404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32405    unix_path=`$CYGPATH -u "$windows_path"`
32406    new_path="$unix_path"
32407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32409    new_path="$unix_path"
32410  fi
32411
32412    # remove trailing .exe if any
32413    new_path="${new_path/%.exe/}"
32414
32415    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32416    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32417  fi
32418
32419    else
32420      # We're on a unix platform. Hooray! :)
32421      # First separate the path from the arguments. This will split at the first
32422      # space.
32423      complete="$VS_ENV_CMD"
32424      path="${complete%% *}"
32425      tmp="$complete EOL"
32426      arguments="${tmp#* }"
32427
32428      # Cannot rely on the command "which" here since it doesn't always work.
32429      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32430      if test -z "$is_absolute_path"; then
32431        # Path to executable is not absolute. Find it.
32432        IFS_save="$IFS"
32433        IFS=:
32434        for p in $PATH; do
32435          if test -f "$p/$path" && test -x "$p/$path"; then
32436            new_path="$p/$path"
32437            break
32438          fi
32439        done
32440        IFS="$IFS_save"
32441      else
32442        # This is an absolute path, we can use it without further modifications.
32443        new_path="$path"
32444      fi
32445
32446      if test "x$new_path" = x; then
32447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32448$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32449        has_space=`$ECHO "$complete" | $GREP " "`
32450        if test "x$has_space" != x; then
32451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32453        fi
32454        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32455      fi
32456    fi
32457
32458    # Now join together the path and the arguments once again
32459    if test "x$arguments" != xEOL; then
32460      new_complete="$new_path ${arguments% *}"
32461    else
32462      new_complete="$new_path"
32463    fi
32464
32465    if test "x$complete" != "x$new_complete"; then
32466      VS_ENV_CMD="$new_complete"
32467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32468$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32469    fi
32470  fi
32471
32472
32473      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32474      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32475$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32476
32477      # We need to create a couple of temporary files.
32478      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32479      $MKDIR -p $VS_ENV_TMP_DIR
32480
32481      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32482      # Instead create a shell script which will set the relevant variables when run.
32483      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32484
32485  unix_path="$WINPATH_VS_ENV_CMD"
32486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32487    windows_path=`$CYGPATH -m "$unix_path"`
32488    WINPATH_VS_ENV_CMD="$windows_path"
32489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32490    windows_path=`cmd //c echo $unix_path`
32491    WINPATH_VS_ENV_CMD="$windows_path"
32492  fi
32493
32494      WINPATH_BASH="$BASH"
32495
32496  unix_path="$WINPATH_BASH"
32497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32498    windows_path=`$CYGPATH -m "$unix_path"`
32499    WINPATH_BASH="$windows_path"
32500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32501    windows_path=`cmd //c echo $unix_path`
32502    WINPATH_BASH="$windows_path"
32503  fi
32504
32505
32506      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32507      # script (executable by bash) that will setup the important variables.
32508      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32509      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32510      # This will end up something like:
32511      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32512      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32513      # These will end up something like:
32514      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32515      # The trailing space for everyone except PATH is no typo, but is needed due
32516      # to trailing \ in the Windows paths. These will be stripped later.
32517      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32518          >> $EXTRACT_VC_ENV_BAT_FILE
32519      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32520          >> $EXTRACT_VC_ENV_BAT_FILE
32521      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32522          >> $EXTRACT_VC_ENV_BAT_FILE
32523      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32524          >> $EXTRACT_VC_ENV_BAT_FILE
32525      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32526          >> $EXTRACT_VC_ENV_BAT_FILE
32527      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32528          >> $EXTRACT_VC_ENV_BAT_FILE
32529
32530      # Now execute the newly created bat file.
32531      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32532      # Change directory so we don't need to mess with Windows paths in redirects.
32533      cd $VS_ENV_TMP_DIR
32534      cmd /c extract-vs-env.bat | $CAT
32535      cd $CURDIR
32536
32537      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32538        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32539$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32540        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32541$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32542        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32543$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32544        as_fn_error $? "Cannot continue" "$LINENO" 5
32545      fi
32546
32547      # Now set all paths and other env variables. This will allow the rest of
32548      # the configure script to find and run the compiler in the proper way.
32549      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32550$as_echo "$as_me: Setting extracted environment variables" >&6;}
32551      . $VS_ENV_TMP_DIR/set-vs-env.sh
32552      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32553      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32554    else
32555      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32556      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32557$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32558    fi
32559  fi
32560
32561  # At this point, we should have correct variables in the environment, or we can't continue.
32562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32563$as_echo_n "checking for Visual Studio variables... " >&6; }
32564
32565  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32566      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32567    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32568      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32569$as_echo "present but broken" >&6; }
32570      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32571    else
32572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32573$as_echo "ok" >&6; }
32574      # Remove any trailing "\" ";" and " " from the variables.
32575      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32576      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32577      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32578      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32579      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32580      # Remove any paths containing # (typically F#) as that messes up make. This
32581      # is needed if visual studio was installed with F# support.
32582      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32583
32584
32585
32586
32587
32588      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32589      OLDIFS="$IFS"
32590      IFS=";"
32591      for i in $VS_INCLUDE; do
32592        ipath=$i
32593        # Only process non-empty elements
32594        if test "x$ipath" != x; then
32595          IFS="$OLDIFS"
32596          # Check that directory exists before calling fixup_path
32597          testpath=$ipath
32598
32599  windows_path="$testpath"
32600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32601    unix_path=`$CYGPATH -u "$windows_path"`
32602    testpath="$unix_path"
32603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32605    testpath="$unix_path"
32606  fi
32607
32608          if test -d "$testpath"; then
32609
32610  # Only process if variable expands to non-empty
32611
32612  if test "x$ipath" != x; then
32613    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32614
32615  # Input might be given as Windows format, start by converting to
32616  # unix format.
32617  path="$ipath"
32618  new_path=`$CYGPATH -u "$path"`
32619
32620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32623  # "foo.exe" is OK but "foo" is an error.
32624  #
32625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32626  # It is also a way to make sure we got the proper file name for the real test later on.
32627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32628  if test "x$test_shortpath" = x; then
32629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32630$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32631    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32632  fi
32633
32634  # Call helper function which possibly converts this using DOS-style short mode.
32635  # If so, the updated path is stored in $new_path.
32636
32637  input_path="$new_path"
32638  # Check if we need to convert this using DOS-style short mode. If the path
32639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32640  # take no chances and rewrite it.
32641  # Note: m4 eats our [], so we need to use [ and ] instead.
32642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32643  if test "x$has_forbidden_chars" != x; then
32644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32648      # Going to short mode and back again did indeed matter. Since short mode is
32649      # case insensitive, let's make it lowercase to improve readability.
32650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32651      # Now convert it back to Unix-style (cygpath)
32652      input_path=`$CYGPATH -u "$shortmode_path"`
32653      new_path="$input_path"
32654    fi
32655  fi
32656
32657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32658  if test "x$test_cygdrive_prefix" = x; then
32659    # As a simple fix, exclude /usr/bin since it's not a real path.
32660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32662      # a path prefixed by /cygdrive for fixpath to work.
32663      new_path="$CYGWIN_ROOT_PATH$input_path"
32664    fi
32665  fi
32666
32667
32668  if test "x$path" != "x$new_path"; then
32669    ipath="$new_path"
32670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32671$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32672  fi
32673
32674    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32675
32676  path="$ipath"
32677  has_colon=`$ECHO $path | $GREP ^.:`
32678  new_path="$path"
32679  if test "x$has_colon" = x; then
32680    # Not in mixed or Windows style, start by that.
32681    new_path=`cmd //c echo $path`
32682  fi
32683
32684
32685  input_path="$new_path"
32686  # Check if we need to convert this using DOS-style short mode. If the path
32687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32688  # take no chances and rewrite it.
32689  # Note: m4 eats our [], so we need to use [ and ] instead.
32690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32691  if test "x$has_forbidden_chars" != x; then
32692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32694  fi
32695
32696
32697  windows_path="$new_path"
32698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32699    unix_path=`$CYGPATH -u "$windows_path"`
32700    new_path="$unix_path"
32701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32703    new_path="$unix_path"
32704  fi
32705
32706  if test "x$path" != "x$new_path"; then
32707    ipath="$new_path"
32708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32709$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32710  fi
32711
32712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32714
32715    else
32716      # We're on a unix platform. Hooray! :)
32717      path="$ipath"
32718      has_space=`$ECHO "$path" | $GREP " "`
32719      if test "x$has_space" != x; then
32720        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32721$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32722        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32723      fi
32724
32725      # Use eval to expand a potential ~
32726      eval path="$path"
32727      if test ! -f "$path" && test ! -d "$path"; then
32728        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32729      fi
32730
32731      if test -d "$path"; then
32732        ipath="`cd "$path"; $THEPWDCMD -L`"
32733      else
32734        dir="`$DIRNAME "$path"`"
32735        base="`$BASENAME "$path"`"
32736        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32737      fi
32738    fi
32739  fi
32740
32741            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32742          fi
32743          IFS=";"
32744        fi
32745      done
32746      # Convert VS_LIB into SYSROOT_LDFLAGS
32747      for i in $VS_LIB; do
32748        libpath=$i
32749        # Only process non-empty elements
32750        if test "x$libpath" != x; then
32751          IFS="$OLDIFS"
32752          # Check that directory exists before calling fixup_path
32753          testpath=$libpath
32754
32755  windows_path="$testpath"
32756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32757    unix_path=`$CYGPATH -u "$windows_path"`
32758    testpath="$unix_path"
32759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32761    testpath="$unix_path"
32762  fi
32763
32764          if test -d "$testpath"; then
32765
32766  # Only process if variable expands to non-empty
32767
32768  if test "x$libpath" != x; then
32769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32770
32771  # Input might be given as Windows format, start by converting to
32772  # unix format.
32773  path="$libpath"
32774  new_path=`$CYGPATH -u "$path"`
32775
32776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32779  # "foo.exe" is OK but "foo" is an error.
32780  #
32781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32782  # It is also a way to make sure we got the proper file name for the real test later on.
32783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32784  if test "x$test_shortpath" = x; then
32785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32786$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32787    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32788  fi
32789
32790  # Call helper function which possibly converts this using DOS-style short mode.
32791  # If so, the updated path is stored in $new_path.
32792
32793  input_path="$new_path"
32794  # Check if we need to convert this using DOS-style short mode. If the path
32795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32796  # take no chances and rewrite it.
32797  # Note: m4 eats our [], so we need to use [ and ] instead.
32798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32799  if test "x$has_forbidden_chars" != x; then
32800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32804      # Going to short mode and back again did indeed matter. Since short mode is
32805      # case insensitive, let's make it lowercase to improve readability.
32806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32807      # Now convert it back to Unix-style (cygpath)
32808      input_path=`$CYGPATH -u "$shortmode_path"`
32809      new_path="$input_path"
32810    fi
32811  fi
32812
32813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32814  if test "x$test_cygdrive_prefix" = x; then
32815    # As a simple fix, exclude /usr/bin since it's not a real path.
32816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32818      # a path prefixed by /cygdrive for fixpath to work.
32819      new_path="$CYGWIN_ROOT_PATH$input_path"
32820    fi
32821  fi
32822
32823
32824  if test "x$path" != "x$new_path"; then
32825    libpath="$new_path"
32826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32827$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32828  fi
32829
32830    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32831
32832  path="$libpath"
32833  has_colon=`$ECHO $path | $GREP ^.:`
32834  new_path="$path"
32835  if test "x$has_colon" = x; then
32836    # Not in mixed or Windows style, start by that.
32837    new_path=`cmd //c echo $path`
32838  fi
32839
32840
32841  input_path="$new_path"
32842  # Check if we need to convert this using DOS-style short mode. If the path
32843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32844  # take no chances and rewrite it.
32845  # Note: m4 eats our [], so we need to use [ and ] instead.
32846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32847  if test "x$has_forbidden_chars" != x; then
32848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32850  fi
32851
32852
32853  windows_path="$new_path"
32854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32855    unix_path=`$CYGPATH -u "$windows_path"`
32856    new_path="$unix_path"
32857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32859    new_path="$unix_path"
32860  fi
32861
32862  if test "x$path" != "x$new_path"; then
32863    libpath="$new_path"
32864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32865$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32866  fi
32867
32868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32870
32871    else
32872      # We're on a unix platform. Hooray! :)
32873      path="$libpath"
32874      has_space=`$ECHO "$path" | $GREP " "`
32875      if test "x$has_space" != x; then
32876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32877$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32878        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32879      fi
32880
32881      # Use eval to expand a potential ~
32882      eval path="$path"
32883      if test ! -f "$path" && test ! -d "$path"; then
32884        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32885      fi
32886
32887      if test -d "$path"; then
32888        libpath="`cd "$path"; $THEPWDCMD -L`"
32889      else
32890        dir="`$DIRNAME "$path"`"
32891        base="`$BASENAME "$path"`"
32892        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32893      fi
32894    fi
32895  fi
32896
32897            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32898          fi
32899          IFS=";"
32900        fi
32901      done
32902      IFS="$OLDIFS"
32903    fi
32904  else
32905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32906$as_echo "not found" >&6; }
32907
32908    if test "x$VS_ENV_CMD" = x; then
32909      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32910$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32911      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32912$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32913    else
32914      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32915$as_echo "$as_me: Running the extraction script failed." >&6;}
32916    fi
32917    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32918$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32919    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32920$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32921    as_fn_error $? "Cannot continue" "$LINENO" 5
32922  fi
32923
32924    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32925    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32926    PATH="$VS_PATH"
32927    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32928    export INCLUDE="$VS_INCLUDE"
32929    export LIB="$VS_LIB"
32930  else
32931    if test "x$XCODE_VERSION_OUTPUT" != x; then
32932      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32933      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32934      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32935    else
32936      # Currently we do not define this for other toolchains. This might change as the need arise.
32937      TOOLCHAIN_VERSION=
32938    fi
32939  fi
32940
32941
32942  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32943  # override all other locations.
32944  if test "x$TOOLCHAIN_PATH" != x; then
32945    PATH=$TOOLCHAIN_PATH:$PATH
32946  fi
32947
32948
32949  #
32950  # Setup the compilers (CC and CXX)
32951  #
32952
32953  COMPILER_NAME=C
32954  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32955
32956  if test "x$CC" != x; then
32957    # User has supplied compiler name already, always let that override.
32958    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32959$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32960    if test "x`basename $CC`" = "x$CC"; then
32961      # A command without a complete path is provided, search $PATH.
32962
32963      for ac_prog in $CC
32964do
32965  # Extract the first word of "$ac_prog", so it can be a program name with args.
32966set dummy $ac_prog; ac_word=$2
32967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32968$as_echo_n "checking for $ac_word... " >&6; }
32969if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32970  $as_echo_n "(cached) " >&6
32971else
32972  case $POTENTIAL_CC in
32973  [\\/]* | ?:[\\/]*)
32974  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32975  ;;
32976  *)
32977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32978for as_dir in $PATH
32979do
32980  IFS=$as_save_IFS
32981  test -z "$as_dir" && as_dir=.
32982    for ac_exec_ext in '' $ac_executable_extensions; do
32983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32984    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32986    break 2
32987  fi
32988done
32989  done
32990IFS=$as_save_IFS
32991
32992  ;;
32993esac
32994fi
32995POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32996if test -n "$POTENTIAL_CC"; then
32997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32998$as_echo "$POTENTIAL_CC" >&6; }
32999else
33000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33001$as_echo "no" >&6; }
33002fi
33003
33004
33005  test -n "$POTENTIAL_CC" && break
33006done
33007
33008      if test "x$POTENTIAL_CC" != x; then
33009        CC=$POTENTIAL_CC
33010      else
33011        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33012      fi
33013    else
33014      # Otherwise it might already be a complete path
33015      if test ! -x "$CC"; then
33016        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33017      fi
33018    fi
33019  else
33020    # No user supplied value. Locate compiler ourselves.
33021
33022    # If we are cross compiling, assume cross compilation tools follows the
33023    # cross compilation standard where they are prefixed with the autoconf
33024    # standard name for the target. For example the binary
33025    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33026    # If we are not cross compiling, then the default compiler name will be
33027    # used.
33028
33029    CC=
33030    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33031    # before checking the rest of the PATH.
33032    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33033    # step, this should not be necessary.
33034    if test -n "$TOOLCHAIN_PATH"; then
33035      PATH_save="$PATH"
33036      PATH="$TOOLCHAIN_PATH"
33037      for ac_prog in $SEARCH_LIST
33038do
33039  # Extract the first word of "$ac_prog", so it can be a program name with args.
33040set dummy $ac_prog; ac_word=$2
33041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33042$as_echo_n "checking for $ac_word... " >&6; }
33043if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33044  $as_echo_n "(cached) " >&6
33045else
33046  case $TOOLCHAIN_PATH_CC in
33047  [\\/]* | ?:[\\/]*)
33048  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33049  ;;
33050  *)
33051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33052for as_dir in $PATH
33053do
33054  IFS=$as_save_IFS
33055  test -z "$as_dir" && as_dir=.
33056    for ac_exec_ext in '' $ac_executable_extensions; do
33057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33058    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33060    break 2
33061  fi
33062done
33063  done
33064IFS=$as_save_IFS
33065
33066  ;;
33067esac
33068fi
33069TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33070if test -n "$TOOLCHAIN_PATH_CC"; then
33071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33072$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33073else
33074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33075$as_echo "no" >&6; }
33076fi
33077
33078
33079  test -n "$TOOLCHAIN_PATH_CC" && break
33080done
33081
33082      CC=$TOOLCHAIN_PATH_CC
33083      PATH="$PATH_save"
33084    fi
33085
33086    # AC_PATH_PROGS can't be run multiple times with the same variable,
33087    # so create a new name for this run.
33088    if test "x$CC" = x; then
33089      for ac_prog in $SEARCH_LIST
33090do
33091  # Extract the first word of "$ac_prog", so it can be a program name with args.
33092set dummy $ac_prog; ac_word=$2
33093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33094$as_echo_n "checking for $ac_word... " >&6; }
33095if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33096  $as_echo_n "(cached) " >&6
33097else
33098  case $POTENTIAL_CC in
33099  [\\/]* | ?:[\\/]*)
33100  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33101  ;;
33102  *)
33103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33104for as_dir in $PATH
33105do
33106  IFS=$as_save_IFS
33107  test -z "$as_dir" && as_dir=.
33108    for ac_exec_ext in '' $ac_executable_extensions; do
33109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33110    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33112    break 2
33113  fi
33114done
33115  done
33116IFS=$as_save_IFS
33117
33118  ;;
33119esac
33120fi
33121POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33122if test -n "$POTENTIAL_CC"; then
33123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33124$as_echo "$POTENTIAL_CC" >&6; }
33125else
33126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33127$as_echo "no" >&6; }
33128fi
33129
33130
33131  test -n "$POTENTIAL_CC" && break
33132done
33133
33134      CC=$POTENTIAL_CC
33135    fi
33136
33137    if test "x$CC" = x; then
33138
33139  # Print a helpful message on how to acquire the necessary build dependency.
33140  # devkit is the help tag: freetype, cups, alsa etc
33141  MISSING_DEPENDENCY=devkit
33142
33143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33144    cygwin_help $MISSING_DEPENDENCY
33145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33146    msys_help $MISSING_DEPENDENCY
33147  else
33148    PKGHANDLER_COMMAND=
33149
33150    case $PKGHANDLER in
33151      apt-get)
33152        apt_help     $MISSING_DEPENDENCY ;;
33153      yum)
33154        yum_help     $MISSING_DEPENDENCY ;;
33155      port)
33156        port_help    $MISSING_DEPENDENCY ;;
33157      pkgutil)
33158        pkgutil_help $MISSING_DEPENDENCY ;;
33159      pkgadd)
33160        pkgadd_help  $MISSING_DEPENDENCY ;;
33161    esac
33162
33163    if test "x$PKGHANDLER_COMMAND" != x; then
33164      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33165    fi
33166  fi
33167
33168      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33169    fi
33170  fi
33171
33172  # Now we have a compiler binary in CC. Make sure it's okay.
33173
33174  # Only process if variable expands to non-empty
33175
33176  if test "x$CC" != x; then
33177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33178
33179  # First separate the path from the arguments. This will split at the first
33180  # space.
33181  complete="$CC"
33182  path="${complete%% *}"
33183  tmp="$complete EOL"
33184  arguments="${tmp#* }"
33185
33186  # Input might be given as Windows format, start by converting to
33187  # unix format.
33188  new_path=`$CYGPATH -u "$path"`
33189
33190  # Now try to locate executable using which
33191  new_path=`$WHICH "$new_path" 2> /dev/null`
33192  # bat and cmd files are not always considered executable in cygwin causing which
33193  # to not find them
33194  if test "x$new_path" = x \
33195      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33196      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33197    new_path=`$CYGPATH -u "$path"`
33198  fi
33199  if test "x$new_path" = x; then
33200    # Oops. Which didn't find the executable.
33201    # The splitting of arguments from the executable at a space might have been incorrect,
33202    # since paths with space are more likely in Windows. Give it another try with the whole
33203    # argument.
33204    path="$complete"
33205    arguments="EOL"
33206    new_path=`$CYGPATH -u "$path"`
33207    new_path=`$WHICH "$new_path" 2> /dev/null`
33208    # bat and cmd files are not always considered executable in cygwin causing which
33209    # to not find them
33210    if test "x$new_path" = x \
33211        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33212        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33213      new_path=`$CYGPATH -u "$path"`
33214    fi
33215    if test "x$new_path" = x; then
33216      # It's still not found. Now this is an unrecoverable error.
33217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33218$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33219      has_space=`$ECHO "$complete" | $GREP " "`
33220      if test "x$has_space" != x; then
33221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33223      fi
33224      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33225    fi
33226  fi
33227
33228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33231  # "foo.exe" is OK but "foo" is an error.
33232  #
33233  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33234  # It is also a way to make sure we got the proper file name for the real test later on.
33235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33236  if test "x$test_shortpath" = x; then
33237    # Short path failed, file does not exist as specified.
33238    # Try adding .exe or .cmd
33239    if test -f "${new_path}.exe"; then
33240      input_to_shortpath="${new_path}.exe"
33241    elif test -f "${new_path}.cmd"; then
33242      input_to_shortpath="${new_path}.cmd"
33243    else
33244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33245$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33246      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33247$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33248      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33249    fi
33250  else
33251    input_to_shortpath="$new_path"
33252  fi
33253
33254  # Call helper function which possibly converts this using DOS-style short mode.
33255  # If so, the updated path is stored in $new_path.
33256  new_path="$input_to_shortpath"
33257
33258  input_path="$input_to_shortpath"
33259  # Check if we need to convert this using DOS-style short mode. If the path
33260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33261  # take no chances and rewrite it.
33262  # Note: m4 eats our [], so we need to use [ and ] instead.
33263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33264  if test "x$has_forbidden_chars" != x; then
33265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33269      # Going to short mode and back again did indeed matter. Since short mode is
33270      # case insensitive, let's make it lowercase to improve readability.
33271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33272      # Now convert it back to Unix-style (cygpath)
33273      input_path=`$CYGPATH -u "$shortmode_path"`
33274      new_path="$input_path"
33275    fi
33276  fi
33277
33278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33279  if test "x$test_cygdrive_prefix" = x; then
33280    # As a simple fix, exclude /usr/bin since it's not a real path.
33281    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33283      # a path prefixed by /cygdrive for fixpath to work.
33284      new_path="$CYGWIN_ROOT_PATH$input_path"
33285    fi
33286  fi
33287
33288  # remove trailing .exe if any
33289  new_path="${new_path/%.exe/}"
33290
33291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33292
33293  # First separate the path from the arguments. This will split at the first
33294  # space.
33295  complete="$CC"
33296  path="${complete%% *}"
33297  tmp="$complete EOL"
33298  arguments="${tmp#* }"
33299
33300  # Input might be given as Windows format, start by converting to
33301  # unix format.
33302  new_path="$path"
33303
33304  windows_path="$new_path"
33305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33306    unix_path=`$CYGPATH -u "$windows_path"`
33307    new_path="$unix_path"
33308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33310    new_path="$unix_path"
33311  fi
33312
33313
33314  # Now try to locate executable using which
33315  new_path=`$WHICH "$new_path" 2> /dev/null`
33316
33317  if test "x$new_path" = x; then
33318    # Oops. Which didn't find the executable.
33319    # The splitting of arguments from the executable at a space might have been incorrect,
33320    # since paths with space are more likely in Windows. Give it another try with the whole
33321    # argument.
33322    path="$complete"
33323    arguments="EOL"
33324    new_path="$path"
33325
33326  windows_path="$new_path"
33327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33328    unix_path=`$CYGPATH -u "$windows_path"`
33329    new_path="$unix_path"
33330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33332    new_path="$unix_path"
33333  fi
33334
33335
33336    new_path=`$WHICH "$new_path" 2> /dev/null`
33337    # bat and cmd files are not always considered executable in MSYS causing which
33338    # to not find them
33339    if test "x$new_path" = x \
33340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33342      new_path="$path"
33343
33344  windows_path="$new_path"
33345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33346    unix_path=`$CYGPATH -u "$windows_path"`
33347    new_path="$unix_path"
33348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33350    new_path="$unix_path"
33351  fi
33352
33353    fi
33354
33355    if test "x$new_path" = x; then
33356      # It's still not found. Now this is an unrecoverable error.
33357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33358$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33359      has_space=`$ECHO "$complete" | $GREP " "`
33360      if test "x$has_space" != x; then
33361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33363      fi
33364      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33365    fi
33366  fi
33367
33368  # Now new_path has a complete unix path to the binary
33369  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33370    # Keep paths in /bin as-is, but remove trailing .exe if any
33371    new_path="${new_path/%.exe/}"
33372    # Do not save /bin paths to all_fixpath_prefixes!
33373  else
33374    # Not in mixed or Windows style, start by that.
33375    new_path=`cmd //c echo $new_path`
33376
33377  input_path="$new_path"
33378  # Check if we need to convert this using DOS-style short mode. If the path
33379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33380  # take no chances and rewrite it.
33381  # Note: m4 eats our [], so we need to use [ and ] instead.
33382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33383  if test "x$has_forbidden_chars" != x; then
33384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33386  fi
33387
33388    # Output is in $new_path
33389
33390  windows_path="$new_path"
33391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33392    unix_path=`$CYGPATH -u "$windows_path"`
33393    new_path="$unix_path"
33394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33396    new_path="$unix_path"
33397  fi
33398
33399    # remove trailing .exe if any
33400    new_path="${new_path/%.exe/}"
33401
33402    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33403    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33404  fi
33405
33406    else
33407      # We're on a unix platform. Hooray! :)
33408      # First separate the path from the arguments. This will split at the first
33409      # space.
33410      complete="$CC"
33411      path="${complete%% *}"
33412      tmp="$complete EOL"
33413      arguments="${tmp#* }"
33414
33415      # Cannot rely on the command "which" here since it doesn't always work.
33416      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33417      if test -z "$is_absolute_path"; then
33418        # Path to executable is not absolute. Find it.
33419        IFS_save="$IFS"
33420        IFS=:
33421        for p in $PATH; do
33422          if test -f "$p/$path" && test -x "$p/$path"; then
33423            new_path="$p/$path"
33424            break
33425          fi
33426        done
33427        IFS="$IFS_save"
33428      else
33429        # This is an absolute path, we can use it without further modifications.
33430        new_path="$path"
33431      fi
33432
33433      if test "x$new_path" = x; then
33434        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33435$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33436        has_space=`$ECHO "$complete" | $GREP " "`
33437        if test "x$has_space" != x; then
33438          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33439$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33440        fi
33441        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33442      fi
33443    fi
33444
33445    # Now join together the path and the arguments once again
33446    if test "x$arguments" != xEOL; then
33447      new_complete="$new_path ${arguments% *}"
33448    else
33449      new_complete="$new_path"
33450    fi
33451
33452    if test "x$complete" != "x$new_complete"; then
33453      CC="$new_complete"
33454      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33455$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33456    fi
33457  fi
33458
33459  TEST_COMPILER="$CC"
33460
33461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33462$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33463  SYMLINK_ORIGINAL="$TEST_COMPILER"
33464
33465  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33466    # Follow a chain of symbolic links. Use readlink
33467    # where it exists, else fall back to horribly
33468    # complicated shell code.
33469    if test "x$READLINK_TESTED" != yes; then
33470      # On MacOSX there is a readlink tool with a different
33471      # purpose than the GNU readlink tool. Check the found readlink.
33472      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33473      if test "x$ISGNU" = x; then
33474        # A readlink that we do not know how to use.
33475        # Are there other non-GNU readlinks out there?
33476        READLINK_TESTED=yes
33477        READLINK=
33478      fi
33479    fi
33480
33481    if test "x$READLINK" != x; then
33482      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33483    else
33484      # Save the current directory for restoring afterwards
33485      STARTDIR=$PWD
33486      COUNTER=0
33487      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33488      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33489      cd $sym_link_dir
33490      # Use -P flag to resolve symlinks in directories.
33491      cd `$THEPWDCMD -P`
33492      sym_link_dir=`$THEPWDCMD -P`
33493      # Resolve file symlinks
33494      while test $COUNTER -lt 20; do
33495        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33496        if test "x$ISLINK" == x; then
33497          # This is not a symbolic link! We are done!
33498          break
33499        fi
33500        # Again resolve directory symlinks since the target of the just found
33501        # link could be in a different directory
33502        cd `$DIRNAME $ISLINK`
33503        sym_link_dir=`$THEPWDCMD -P`
33504        sym_link_file=`$BASENAME $ISLINK`
33505        let COUNTER=COUNTER+1
33506      done
33507      cd $STARTDIR
33508      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33509    fi
33510  fi
33511
33512  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33514$as_echo "no symlink" >&6; }
33515  else
33516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33517$as_echo "$SYMLINK_ORIGINAL" >&6; }
33518
33519    # We can't handle ccache by gcc wrappers, since we need to know if we're
33520    # using ccache. Instead ccache usage must be controlled by a configure option.
33521    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33522    if test "x$COMPILER_BASENAME" = "xccache"; then
33523      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33524$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33525      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33526    fi
33527  fi
33528
33529
33530  COMPILER=$CC
33531  COMPILER_NAME=$COMPILER_NAME
33532
33533  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33534    # cc -V output typically looks like
33535    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33536    # or
33537    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33538    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33539    # Check that this is likely to be the Solaris Studio cc.
33540    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33541    if test $? -ne 0; then
33542      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33543      { $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
33544$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33545      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33546$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33547      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33548$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33549      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33550    fi
33551    # Remove usage instructions (if present), and
33552    # collapse compiler output into a single line
33553    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33554        $SED -e 's/ *[Uu]sage:.*//'`
33555    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33556        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33557  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33558    # xlc -qversion output typically looks like
33559    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33560    #     Version: 11.01.0000.0015
33561    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33562    # Check that this is likely to be the IBM XL C compiler.
33563    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33564    if test $? -ne 0; then
33565      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33566      { $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
33567$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33568      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33569$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33570      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33571$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33572      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33573    fi
33574    # Collapse compiler output into a single line
33575    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33576    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33577        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33578  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33579    # There is no specific version flag, but all output starts with a version string.
33580    # First line typically looks something like:
33581    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33582    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33583    # Check that this is likely to be Microsoft CL.EXE.
33584    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33585    if test $? -ne 0; then
33586      { $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
33587$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33588      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33589$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33590      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33591    fi
33592    # Collapse compiler output into a single line
33593    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33594    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33595        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33596  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33597    # gcc --version output typically looks like
33598    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33599    #     Copyright (C) 2013 Free Software Foundation, Inc.
33600    #     This is free software; see the source for copying conditions.  There is NO
33601    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33602    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33603    # Check that this is likely to be GCC.
33604    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33605    if test $? -ne 0; then
33606      { $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
33607$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33608      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33609$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33610      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33611    fi
33612    # Remove Copyright and legalese from version string, and
33613    # collapse into a single line
33614    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33615        $SED -e 's/ *Copyright .*//'`
33616    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33617        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33618  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33619    # clang --version output typically looks like
33620    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33621    #    clang version 3.3 (tags/RELEASE_33/final)
33622    # or
33623    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33624    #    Target: x86_64-pc-linux-gnu
33625    #    Thread model: posix
33626    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33627    # Check that this is likely to be clang
33628    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33629    if test $? -ne 0; then
33630      { $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
33631$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33632      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33633$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33634      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33635    fi
33636    # Collapse compiler output into a single line
33637    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33638    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33639        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33640  else
33641      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33642  fi
33643  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33644  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33645  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33646  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33647
33648  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33649$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33650
33651
33652  # Now that we have resolved CC ourself, let autoconf have its go at it
33653  ac_ext=c
33654ac_cpp='$CPP $CPPFLAGS'
33655ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33656ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33657ac_compiler_gnu=$ac_cv_c_compiler_gnu
33658if test -n "$ac_tool_prefix"; then
33659  for ac_prog in $CC
33660  do
33661    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33662set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33664$as_echo_n "checking for $ac_word... " >&6; }
33665if ${ac_cv_prog_CC+:} false; then :
33666  $as_echo_n "(cached) " >&6
33667else
33668  if test -n "$CC"; then
33669  ac_cv_prog_CC="$CC" # Let the user override the test.
33670else
33671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33672for as_dir in $PATH
33673do
33674  IFS=$as_save_IFS
33675  test -z "$as_dir" && as_dir=.
33676    for ac_exec_ext in '' $ac_executable_extensions; do
33677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33678    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33680    break 2
33681  fi
33682done
33683  done
33684IFS=$as_save_IFS
33685
33686fi
33687fi
33688CC=$ac_cv_prog_CC
33689if test -n "$CC"; then
33690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33691$as_echo "$CC" >&6; }
33692else
33693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33694$as_echo "no" >&6; }
33695fi
33696
33697
33698    test -n "$CC" && break
33699  done
33700fi
33701if test -z "$CC"; then
33702  ac_ct_CC=$CC
33703  for ac_prog in $CC
33704do
33705  # Extract the first word of "$ac_prog", so it can be a program name with args.
33706set dummy $ac_prog; ac_word=$2
33707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33708$as_echo_n "checking for $ac_word... " >&6; }
33709if ${ac_cv_prog_ac_ct_CC+:} false; then :
33710  $as_echo_n "(cached) " >&6
33711else
33712  if test -n "$ac_ct_CC"; then
33713  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33714else
33715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33716for as_dir in $PATH
33717do
33718  IFS=$as_save_IFS
33719  test -z "$as_dir" && as_dir=.
33720    for ac_exec_ext in '' $ac_executable_extensions; do
33721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33722    ac_cv_prog_ac_ct_CC="$ac_prog"
33723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33724    break 2
33725  fi
33726done
33727  done
33728IFS=$as_save_IFS
33729
33730fi
33731fi
33732ac_ct_CC=$ac_cv_prog_ac_ct_CC
33733if test -n "$ac_ct_CC"; then
33734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33735$as_echo "$ac_ct_CC" >&6; }
33736else
33737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33738$as_echo "no" >&6; }
33739fi
33740
33741
33742  test -n "$ac_ct_CC" && break
33743done
33744
33745  if test "x$ac_ct_CC" = x; then
33746    CC=""
33747  else
33748    case $cross_compiling:$ac_tool_warned in
33749yes:)
33750{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33751$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33752ac_tool_warned=yes ;;
33753esac
33754    CC=$ac_ct_CC
33755  fi
33756fi
33757
33758
33759test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33761as_fn_error $? "no acceptable C compiler found in \$PATH
33762See \`config.log' for more details" "$LINENO" 5; }
33763
33764# Provide some information about the compiler.
33765$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33766set X $ac_compile
33767ac_compiler=$2
33768for ac_option in --version -v -V -qversion; do
33769  { { ac_try="$ac_compiler $ac_option >&5"
33770case "(($ac_try" in
33771  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33772  *) ac_try_echo=$ac_try;;
33773esac
33774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33775$as_echo "$ac_try_echo"; } >&5
33776  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33777  ac_status=$?
33778  if test -s conftest.err; then
33779    sed '10a\
33780... rest of stderr output deleted ...
33781         10q' conftest.err >conftest.er1
33782    cat conftest.er1 >&5
33783  fi
33784  rm -f conftest.er1 conftest.err
33785  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33786  test $ac_status = 0; }
33787done
33788
33789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33790/* end confdefs.h.  */
33791
33792int
33793main ()
33794{
33795
33796  ;
33797  return 0;
33798}
33799_ACEOF
33800ac_clean_files_save=$ac_clean_files
33801ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33802# Try to create an executable without -o first, disregard a.out.
33803# It will help us diagnose broken compilers, and finding out an intuition
33804# of exeext.
33805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33806$as_echo_n "checking whether the C compiler works... " >&6; }
33807ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33808
33809# The possible output files:
33810ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33811
33812ac_rmfiles=
33813for ac_file in $ac_files
33814do
33815  case $ac_file in
33816    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33817    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33818  esac
33819done
33820rm -f $ac_rmfiles
33821
33822if { { ac_try="$ac_link_default"
33823case "(($ac_try" in
33824  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33825  *) ac_try_echo=$ac_try;;
33826esac
33827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33828$as_echo "$ac_try_echo"; } >&5
33829  (eval "$ac_link_default") 2>&5
33830  ac_status=$?
33831  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33832  test $ac_status = 0; }; then :
33833  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33834# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33835# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33836# so that the user can short-circuit this test for compilers unknown to
33837# Autoconf.
33838for ac_file in $ac_files ''
33839do
33840  test -f "$ac_file" || continue
33841  case $ac_file in
33842    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33843	;;
33844    [ab].out )
33845	# We found the default executable, but exeext='' is most
33846	# certainly right.
33847	break;;
33848    *.* )
33849	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33850	then :; else
33851	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33852	fi
33853	# We set ac_cv_exeext here because the later test for it is not
33854	# safe: cross compilers may not add the suffix if given an `-o'
33855	# argument, so we may need to know it at that point already.
33856	# Even if this section looks crufty: it has the advantage of
33857	# actually working.
33858	break;;
33859    * )
33860	break;;
33861  esac
33862done
33863test "$ac_cv_exeext" = no && ac_cv_exeext=
33864
33865else
33866  ac_file=''
33867fi
33868if test -z "$ac_file"; then :
33869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33870$as_echo "no" >&6; }
33871$as_echo "$as_me: failed program was:" >&5
33872sed 's/^/| /' conftest.$ac_ext >&5
33873
33874{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33876as_fn_error 77 "C compiler cannot create executables
33877See \`config.log' for more details" "$LINENO" 5; }
33878else
33879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33880$as_echo "yes" >&6; }
33881fi
33882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33883$as_echo_n "checking for C compiler default output file name... " >&6; }
33884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33885$as_echo "$ac_file" >&6; }
33886ac_exeext=$ac_cv_exeext
33887
33888rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33889ac_clean_files=$ac_clean_files_save
33890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33891$as_echo_n "checking for suffix of executables... " >&6; }
33892if { { ac_try="$ac_link"
33893case "(($ac_try" in
33894  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33895  *) ac_try_echo=$ac_try;;
33896esac
33897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33898$as_echo "$ac_try_echo"; } >&5
33899  (eval "$ac_link") 2>&5
33900  ac_status=$?
33901  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33902  test $ac_status = 0; }; then :
33903  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33904# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33905# work properly (i.e., refer to `conftest.exe'), while it won't with
33906# `rm'.
33907for ac_file in conftest.exe conftest conftest.*; do
33908  test -f "$ac_file" || continue
33909  case $ac_file in
33910    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33911    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33912	  break;;
33913    * ) break;;
33914  esac
33915done
33916else
33917  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33919as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33920See \`config.log' for more details" "$LINENO" 5; }
33921fi
33922rm -f conftest conftest$ac_cv_exeext
33923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33924$as_echo "$ac_cv_exeext" >&6; }
33925
33926rm -f conftest.$ac_ext
33927EXEEXT=$ac_cv_exeext
33928ac_exeext=$EXEEXT
33929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33930/* end confdefs.h.  */
33931#include <stdio.h>
33932int
33933main ()
33934{
33935FILE *f = fopen ("conftest.out", "w");
33936 return ferror (f) || fclose (f) != 0;
33937
33938  ;
33939  return 0;
33940}
33941_ACEOF
33942ac_clean_files="$ac_clean_files conftest.out"
33943# Check that the compiler produces executables we can run.  If not, either
33944# the compiler is broken, or we cross compile.
33945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33946$as_echo_n "checking whether we are cross compiling... " >&6; }
33947if test "$cross_compiling" != yes; then
33948  { { ac_try="$ac_link"
33949case "(($ac_try" in
33950  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33951  *) ac_try_echo=$ac_try;;
33952esac
33953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33954$as_echo "$ac_try_echo"; } >&5
33955  (eval "$ac_link") 2>&5
33956  ac_status=$?
33957  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33958  test $ac_status = 0; }
33959  if { ac_try='./conftest$ac_cv_exeext'
33960  { { case "(($ac_try" in
33961  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33962  *) ac_try_echo=$ac_try;;
33963esac
33964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33965$as_echo "$ac_try_echo"; } >&5
33966  (eval "$ac_try") 2>&5
33967  ac_status=$?
33968  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33969  test $ac_status = 0; }; }; then
33970    cross_compiling=no
33971  else
33972    if test "$cross_compiling" = maybe; then
33973	cross_compiling=yes
33974    else
33975	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33976$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33977as_fn_error $? "cannot run C compiled programs.
33978If you meant to cross compile, use \`--host'.
33979See \`config.log' for more details" "$LINENO" 5; }
33980    fi
33981  fi
33982fi
33983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33984$as_echo "$cross_compiling" >&6; }
33985
33986rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33987ac_clean_files=$ac_clean_files_save
33988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33989$as_echo_n "checking for suffix of object files... " >&6; }
33990if ${ac_cv_objext+:} false; then :
33991  $as_echo_n "(cached) " >&6
33992else
33993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33994/* end confdefs.h.  */
33995
33996int
33997main ()
33998{
33999
34000  ;
34001  return 0;
34002}
34003_ACEOF
34004rm -f conftest.o conftest.obj
34005if { { ac_try="$ac_compile"
34006case "(($ac_try" in
34007  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34008  *) ac_try_echo=$ac_try;;
34009esac
34010eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34011$as_echo "$ac_try_echo"; } >&5
34012  (eval "$ac_compile") 2>&5
34013  ac_status=$?
34014  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34015  test $ac_status = 0; }; then :
34016  for ac_file in conftest.o conftest.obj conftest.*; do
34017  test -f "$ac_file" || continue;
34018  case $ac_file in
34019    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34020    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34021       break;;
34022  esac
34023done
34024else
34025  $as_echo "$as_me: failed program was:" >&5
34026sed 's/^/| /' conftest.$ac_ext >&5
34027
34028{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34030as_fn_error $? "cannot compute suffix of object files: cannot compile
34031See \`config.log' for more details" "$LINENO" 5; }
34032fi
34033rm -f conftest.$ac_cv_objext conftest.$ac_ext
34034fi
34035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34036$as_echo "$ac_cv_objext" >&6; }
34037OBJEXT=$ac_cv_objext
34038ac_objext=$OBJEXT
34039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34040$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34041if ${ac_cv_c_compiler_gnu+:} false; then :
34042  $as_echo_n "(cached) " >&6
34043else
34044  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34045/* end confdefs.h.  */
34046
34047int
34048main ()
34049{
34050#ifndef __GNUC__
34051       choke me
34052#endif
34053
34054  ;
34055  return 0;
34056}
34057_ACEOF
34058if ac_fn_c_try_compile "$LINENO"; then :
34059  ac_compiler_gnu=yes
34060else
34061  ac_compiler_gnu=no
34062fi
34063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34064ac_cv_c_compiler_gnu=$ac_compiler_gnu
34065
34066fi
34067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34068$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34069if test $ac_compiler_gnu = yes; then
34070  GCC=yes
34071else
34072  GCC=
34073fi
34074ac_test_CFLAGS=${CFLAGS+set}
34075ac_save_CFLAGS=$CFLAGS
34076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34077$as_echo_n "checking whether $CC accepts -g... " >&6; }
34078if ${ac_cv_prog_cc_g+:} false; then :
34079  $as_echo_n "(cached) " >&6
34080else
34081  ac_save_c_werror_flag=$ac_c_werror_flag
34082   ac_c_werror_flag=yes
34083   ac_cv_prog_cc_g=no
34084   CFLAGS="-g"
34085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34086/* end confdefs.h.  */
34087
34088int
34089main ()
34090{
34091
34092  ;
34093  return 0;
34094}
34095_ACEOF
34096if ac_fn_c_try_compile "$LINENO"; then :
34097  ac_cv_prog_cc_g=yes
34098else
34099  CFLAGS=""
34100      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34101/* end confdefs.h.  */
34102
34103int
34104main ()
34105{
34106
34107  ;
34108  return 0;
34109}
34110_ACEOF
34111if ac_fn_c_try_compile "$LINENO"; then :
34112
34113else
34114  ac_c_werror_flag=$ac_save_c_werror_flag
34115	 CFLAGS="-g"
34116	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34117/* end confdefs.h.  */
34118
34119int
34120main ()
34121{
34122
34123  ;
34124  return 0;
34125}
34126_ACEOF
34127if ac_fn_c_try_compile "$LINENO"; then :
34128  ac_cv_prog_cc_g=yes
34129fi
34130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34131fi
34132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34133fi
34134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34135   ac_c_werror_flag=$ac_save_c_werror_flag
34136fi
34137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34138$as_echo "$ac_cv_prog_cc_g" >&6; }
34139if test "$ac_test_CFLAGS" = set; then
34140  CFLAGS=$ac_save_CFLAGS
34141elif test $ac_cv_prog_cc_g = yes; then
34142  if test "$GCC" = yes; then
34143    CFLAGS="-g -O2"
34144  else
34145    CFLAGS="-g"
34146  fi
34147else
34148  if test "$GCC" = yes; then
34149    CFLAGS="-O2"
34150  else
34151    CFLAGS=
34152  fi
34153fi
34154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34155$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34156if ${ac_cv_prog_cc_c89+:} false; then :
34157  $as_echo_n "(cached) " >&6
34158else
34159  ac_cv_prog_cc_c89=no
34160ac_save_CC=$CC
34161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34162/* end confdefs.h.  */
34163#include <stdarg.h>
34164#include <stdio.h>
34165struct stat;
34166/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34167struct buf { int x; };
34168FILE * (*rcsopen) (struct buf *, struct stat *, int);
34169static char *e (p, i)
34170     char **p;
34171     int i;
34172{
34173  return p[i];
34174}
34175static char *f (char * (*g) (char **, int), char **p, ...)
34176{
34177  char *s;
34178  va_list v;
34179  va_start (v,p);
34180  s = g (p, va_arg (v,int));
34181  va_end (v);
34182  return s;
34183}
34184
34185/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34186   function prototypes and stuff, but not '\xHH' hex character constants.
34187   These don't provoke an error unfortunately, instead are silently treated
34188   as 'x'.  The following induces an error, until -std is added to get
34189   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34190   array size at least.  It's necessary to write '\x00'==0 to get something
34191   that's true only with -std.  */
34192int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34193
34194/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34195   inside strings and character constants.  */
34196#define FOO(x) 'x'
34197int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34198
34199int test (int i, double x);
34200struct s1 {int (*f) (int a);};
34201struct s2 {int (*f) (double a);};
34202int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34203int argc;
34204char **argv;
34205int
34206main ()
34207{
34208return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34209  ;
34210  return 0;
34211}
34212_ACEOF
34213for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34214	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34215do
34216  CC="$ac_save_CC $ac_arg"
34217  if ac_fn_c_try_compile "$LINENO"; then :
34218  ac_cv_prog_cc_c89=$ac_arg
34219fi
34220rm -f core conftest.err conftest.$ac_objext
34221  test "x$ac_cv_prog_cc_c89" != "xno" && break
34222done
34223rm -f conftest.$ac_ext
34224CC=$ac_save_CC
34225
34226fi
34227# AC_CACHE_VAL
34228case "x$ac_cv_prog_cc_c89" in
34229  x)
34230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34231$as_echo "none needed" >&6; } ;;
34232  xno)
34233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34234$as_echo "unsupported" >&6; } ;;
34235  *)
34236    CC="$CC $ac_cv_prog_cc_c89"
34237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34238$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34239esac
34240if test "x$ac_cv_prog_cc_c89" != xno; then :
34241
34242fi
34243
34244ac_ext=cpp
34245ac_cpp='$CXXCPP $CPPFLAGS'
34246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34249
34250
34251
34252  COMPILER_NAME=C++
34253  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34254
34255  if test "x$CXX" != x; then
34256    # User has supplied compiler name already, always let that override.
34257    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34258$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34259    if test "x`basename $CXX`" = "x$CXX"; then
34260      # A command without a complete path is provided, search $PATH.
34261
34262      for ac_prog in $CXX
34263do
34264  # Extract the first word of "$ac_prog", so it can be a program name with args.
34265set dummy $ac_prog; ac_word=$2
34266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34267$as_echo_n "checking for $ac_word... " >&6; }
34268if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34269  $as_echo_n "(cached) " >&6
34270else
34271  case $POTENTIAL_CXX in
34272  [\\/]* | ?:[\\/]*)
34273  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34274  ;;
34275  *)
34276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34277for as_dir in $PATH
34278do
34279  IFS=$as_save_IFS
34280  test -z "$as_dir" && as_dir=.
34281    for ac_exec_ext in '' $ac_executable_extensions; do
34282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34283    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34285    break 2
34286  fi
34287done
34288  done
34289IFS=$as_save_IFS
34290
34291  ;;
34292esac
34293fi
34294POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34295if test -n "$POTENTIAL_CXX"; then
34296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34297$as_echo "$POTENTIAL_CXX" >&6; }
34298else
34299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34300$as_echo "no" >&6; }
34301fi
34302
34303
34304  test -n "$POTENTIAL_CXX" && break
34305done
34306
34307      if test "x$POTENTIAL_CXX" != x; then
34308        CXX=$POTENTIAL_CXX
34309      else
34310        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34311      fi
34312    else
34313      # Otherwise it might already be a complete path
34314      if test ! -x "$CXX"; then
34315        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34316      fi
34317    fi
34318  else
34319    # No user supplied value. Locate compiler ourselves.
34320
34321    # If we are cross compiling, assume cross compilation tools follows the
34322    # cross compilation standard where they are prefixed with the autoconf
34323    # standard name for the target. For example the binary
34324    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34325    # If we are not cross compiling, then the default compiler name will be
34326    # used.
34327
34328    CXX=
34329    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34330    # before checking the rest of the PATH.
34331    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34332    # step, this should not be necessary.
34333    if test -n "$TOOLCHAIN_PATH"; then
34334      PATH_save="$PATH"
34335      PATH="$TOOLCHAIN_PATH"
34336      for ac_prog in $SEARCH_LIST
34337do
34338  # Extract the first word of "$ac_prog", so it can be a program name with args.
34339set dummy $ac_prog; ac_word=$2
34340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34341$as_echo_n "checking for $ac_word... " >&6; }
34342if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34343  $as_echo_n "(cached) " >&6
34344else
34345  case $TOOLCHAIN_PATH_CXX in
34346  [\\/]* | ?:[\\/]*)
34347  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34348  ;;
34349  *)
34350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34351for as_dir in $PATH
34352do
34353  IFS=$as_save_IFS
34354  test -z "$as_dir" && as_dir=.
34355    for ac_exec_ext in '' $ac_executable_extensions; do
34356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34357    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34359    break 2
34360  fi
34361done
34362  done
34363IFS=$as_save_IFS
34364
34365  ;;
34366esac
34367fi
34368TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34369if test -n "$TOOLCHAIN_PATH_CXX"; then
34370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34371$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34372else
34373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34374$as_echo "no" >&6; }
34375fi
34376
34377
34378  test -n "$TOOLCHAIN_PATH_CXX" && break
34379done
34380
34381      CXX=$TOOLCHAIN_PATH_CXX
34382      PATH="$PATH_save"
34383    fi
34384
34385    # AC_PATH_PROGS can't be run multiple times with the same variable,
34386    # so create a new name for this run.
34387    if test "x$CXX" = x; then
34388      for ac_prog in $SEARCH_LIST
34389do
34390  # Extract the first word of "$ac_prog", so it can be a program name with args.
34391set dummy $ac_prog; ac_word=$2
34392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34393$as_echo_n "checking for $ac_word... " >&6; }
34394if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34395  $as_echo_n "(cached) " >&6
34396else
34397  case $POTENTIAL_CXX in
34398  [\\/]* | ?:[\\/]*)
34399  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34400  ;;
34401  *)
34402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34403for as_dir in $PATH
34404do
34405  IFS=$as_save_IFS
34406  test -z "$as_dir" && as_dir=.
34407    for ac_exec_ext in '' $ac_executable_extensions; do
34408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34409    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34411    break 2
34412  fi
34413done
34414  done
34415IFS=$as_save_IFS
34416
34417  ;;
34418esac
34419fi
34420POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34421if test -n "$POTENTIAL_CXX"; then
34422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34423$as_echo "$POTENTIAL_CXX" >&6; }
34424else
34425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34426$as_echo "no" >&6; }
34427fi
34428
34429
34430  test -n "$POTENTIAL_CXX" && break
34431done
34432
34433      CXX=$POTENTIAL_CXX
34434    fi
34435
34436    if test "x$CXX" = x; then
34437
34438  # Print a helpful message on how to acquire the necessary build dependency.
34439  # devkit is the help tag: freetype, cups, alsa etc
34440  MISSING_DEPENDENCY=devkit
34441
34442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34443    cygwin_help $MISSING_DEPENDENCY
34444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34445    msys_help $MISSING_DEPENDENCY
34446  else
34447    PKGHANDLER_COMMAND=
34448
34449    case $PKGHANDLER in
34450      apt-get)
34451        apt_help     $MISSING_DEPENDENCY ;;
34452      yum)
34453        yum_help     $MISSING_DEPENDENCY ;;
34454      port)
34455        port_help    $MISSING_DEPENDENCY ;;
34456      pkgutil)
34457        pkgutil_help $MISSING_DEPENDENCY ;;
34458      pkgadd)
34459        pkgadd_help  $MISSING_DEPENDENCY ;;
34460    esac
34461
34462    if test "x$PKGHANDLER_COMMAND" != x; then
34463      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34464    fi
34465  fi
34466
34467      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34468    fi
34469  fi
34470
34471  # Now we have a compiler binary in CXX. Make sure it's okay.
34472
34473  # Only process if variable expands to non-empty
34474
34475  if test "x$CXX" != x; then
34476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34477
34478  # First separate the path from the arguments. This will split at the first
34479  # space.
34480  complete="$CXX"
34481  path="${complete%% *}"
34482  tmp="$complete EOL"
34483  arguments="${tmp#* }"
34484
34485  # Input might be given as Windows format, start by converting to
34486  # unix format.
34487  new_path=`$CYGPATH -u "$path"`
34488
34489  # Now try to locate executable using which
34490  new_path=`$WHICH "$new_path" 2> /dev/null`
34491  # bat and cmd files are not always considered executable in cygwin causing which
34492  # to not find them
34493  if test "x$new_path" = x \
34494      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34495      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34496    new_path=`$CYGPATH -u "$path"`
34497  fi
34498  if test "x$new_path" = x; then
34499    # Oops. Which didn't find the executable.
34500    # The splitting of arguments from the executable at a space might have been incorrect,
34501    # since paths with space are more likely in Windows. Give it another try with the whole
34502    # argument.
34503    path="$complete"
34504    arguments="EOL"
34505    new_path=`$CYGPATH -u "$path"`
34506    new_path=`$WHICH "$new_path" 2> /dev/null`
34507    # bat and cmd files are not always considered executable in cygwin causing which
34508    # to not find them
34509    if test "x$new_path" = x \
34510        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34511        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34512      new_path=`$CYGPATH -u "$path"`
34513    fi
34514    if test "x$new_path" = x; then
34515      # It's still not found. Now this is an unrecoverable error.
34516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34517$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34518      has_space=`$ECHO "$complete" | $GREP " "`
34519      if test "x$has_space" != x; then
34520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34522      fi
34523      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34524    fi
34525  fi
34526
34527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34530  # "foo.exe" is OK but "foo" is an error.
34531  #
34532  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34533  # It is also a way to make sure we got the proper file name for the real test later on.
34534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34535  if test "x$test_shortpath" = x; then
34536    # Short path failed, file does not exist as specified.
34537    # Try adding .exe or .cmd
34538    if test -f "${new_path}.exe"; then
34539      input_to_shortpath="${new_path}.exe"
34540    elif test -f "${new_path}.cmd"; then
34541      input_to_shortpath="${new_path}.cmd"
34542    else
34543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34544$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34545      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34546$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34547      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34548    fi
34549  else
34550    input_to_shortpath="$new_path"
34551  fi
34552
34553  # Call helper function which possibly converts this using DOS-style short mode.
34554  # If so, the updated path is stored in $new_path.
34555  new_path="$input_to_shortpath"
34556
34557  input_path="$input_to_shortpath"
34558  # Check if we need to convert this using DOS-style short mode. If the path
34559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34560  # take no chances and rewrite it.
34561  # Note: m4 eats our [], so we need to use [ and ] instead.
34562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34563  if test "x$has_forbidden_chars" != x; then
34564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34568      # Going to short mode and back again did indeed matter. Since short mode is
34569      # case insensitive, let's make it lowercase to improve readability.
34570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34571      # Now convert it back to Unix-style (cygpath)
34572      input_path=`$CYGPATH -u "$shortmode_path"`
34573      new_path="$input_path"
34574    fi
34575  fi
34576
34577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34578  if test "x$test_cygdrive_prefix" = x; then
34579    # As a simple fix, exclude /usr/bin since it's not a real path.
34580    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34582      # a path prefixed by /cygdrive for fixpath to work.
34583      new_path="$CYGWIN_ROOT_PATH$input_path"
34584    fi
34585  fi
34586
34587  # remove trailing .exe if any
34588  new_path="${new_path/%.exe/}"
34589
34590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34591
34592  # First separate the path from the arguments. This will split at the first
34593  # space.
34594  complete="$CXX"
34595  path="${complete%% *}"
34596  tmp="$complete EOL"
34597  arguments="${tmp#* }"
34598
34599  # Input might be given as Windows format, start by converting to
34600  # unix format.
34601  new_path="$path"
34602
34603  windows_path="$new_path"
34604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34605    unix_path=`$CYGPATH -u "$windows_path"`
34606    new_path="$unix_path"
34607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34609    new_path="$unix_path"
34610  fi
34611
34612
34613  # Now try to locate executable using which
34614  new_path=`$WHICH "$new_path" 2> /dev/null`
34615
34616  if test "x$new_path" = x; then
34617    # Oops. Which didn't find the executable.
34618    # The splitting of arguments from the executable at a space might have been incorrect,
34619    # since paths with space are more likely in Windows. Give it another try with the whole
34620    # argument.
34621    path="$complete"
34622    arguments="EOL"
34623    new_path="$path"
34624
34625  windows_path="$new_path"
34626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34627    unix_path=`$CYGPATH -u "$windows_path"`
34628    new_path="$unix_path"
34629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34631    new_path="$unix_path"
34632  fi
34633
34634
34635    new_path=`$WHICH "$new_path" 2> /dev/null`
34636    # bat and cmd files are not always considered executable in MSYS causing which
34637    # to not find them
34638    if test "x$new_path" = x \
34639        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34640        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34641      new_path="$path"
34642
34643  windows_path="$new_path"
34644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34645    unix_path=`$CYGPATH -u "$windows_path"`
34646    new_path="$unix_path"
34647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34649    new_path="$unix_path"
34650  fi
34651
34652    fi
34653
34654    if test "x$new_path" = x; then
34655      # It's still not found. Now this is an unrecoverable error.
34656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34657$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34658      has_space=`$ECHO "$complete" | $GREP " "`
34659      if test "x$has_space" != x; then
34660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34662      fi
34663      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34664    fi
34665  fi
34666
34667  # Now new_path has a complete unix path to the binary
34668  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34669    # Keep paths in /bin as-is, but remove trailing .exe if any
34670    new_path="${new_path/%.exe/}"
34671    # Do not save /bin paths to all_fixpath_prefixes!
34672  else
34673    # Not in mixed or Windows style, start by that.
34674    new_path=`cmd //c echo $new_path`
34675
34676  input_path="$new_path"
34677  # Check if we need to convert this using DOS-style short mode. If the path
34678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34679  # take no chances and rewrite it.
34680  # Note: m4 eats our [], so we need to use [ and ] instead.
34681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34682  if test "x$has_forbidden_chars" != x; then
34683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34685  fi
34686
34687    # Output is in $new_path
34688
34689  windows_path="$new_path"
34690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34691    unix_path=`$CYGPATH -u "$windows_path"`
34692    new_path="$unix_path"
34693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34695    new_path="$unix_path"
34696  fi
34697
34698    # remove trailing .exe if any
34699    new_path="${new_path/%.exe/}"
34700
34701    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34702    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34703  fi
34704
34705    else
34706      # We're on a unix platform. Hooray! :)
34707      # First separate the path from the arguments. This will split at the first
34708      # space.
34709      complete="$CXX"
34710      path="${complete%% *}"
34711      tmp="$complete EOL"
34712      arguments="${tmp#* }"
34713
34714      # Cannot rely on the command "which" here since it doesn't always work.
34715      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34716      if test -z "$is_absolute_path"; then
34717        # Path to executable is not absolute. Find it.
34718        IFS_save="$IFS"
34719        IFS=:
34720        for p in $PATH; do
34721          if test -f "$p/$path" && test -x "$p/$path"; then
34722            new_path="$p/$path"
34723            break
34724          fi
34725        done
34726        IFS="$IFS_save"
34727      else
34728        # This is an absolute path, we can use it without further modifications.
34729        new_path="$path"
34730      fi
34731
34732      if test "x$new_path" = x; then
34733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34734$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34735        has_space=`$ECHO "$complete" | $GREP " "`
34736        if test "x$has_space" != x; then
34737          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34738$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34739        fi
34740        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34741      fi
34742    fi
34743
34744    # Now join together the path and the arguments once again
34745    if test "x$arguments" != xEOL; then
34746      new_complete="$new_path ${arguments% *}"
34747    else
34748      new_complete="$new_path"
34749    fi
34750
34751    if test "x$complete" != "x$new_complete"; then
34752      CXX="$new_complete"
34753      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34754$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34755    fi
34756  fi
34757
34758  TEST_COMPILER="$CXX"
34759
34760  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34761$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34762  SYMLINK_ORIGINAL="$TEST_COMPILER"
34763
34764  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34765    # Follow a chain of symbolic links. Use readlink
34766    # where it exists, else fall back to horribly
34767    # complicated shell code.
34768    if test "x$READLINK_TESTED" != yes; then
34769      # On MacOSX there is a readlink tool with a different
34770      # purpose than the GNU readlink tool. Check the found readlink.
34771      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34772      if test "x$ISGNU" = x; then
34773        # A readlink that we do not know how to use.
34774        # Are there other non-GNU readlinks out there?
34775        READLINK_TESTED=yes
34776        READLINK=
34777      fi
34778    fi
34779
34780    if test "x$READLINK" != x; then
34781      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34782    else
34783      # Save the current directory for restoring afterwards
34784      STARTDIR=$PWD
34785      COUNTER=0
34786      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34787      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34788      cd $sym_link_dir
34789      # Use -P flag to resolve symlinks in directories.
34790      cd `$THEPWDCMD -P`
34791      sym_link_dir=`$THEPWDCMD -P`
34792      # Resolve file symlinks
34793      while test $COUNTER -lt 20; do
34794        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34795        if test "x$ISLINK" == x; then
34796          # This is not a symbolic link! We are done!
34797          break
34798        fi
34799        # Again resolve directory symlinks since the target of the just found
34800        # link could be in a different directory
34801        cd `$DIRNAME $ISLINK`
34802        sym_link_dir=`$THEPWDCMD -P`
34803        sym_link_file=`$BASENAME $ISLINK`
34804        let COUNTER=COUNTER+1
34805      done
34806      cd $STARTDIR
34807      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34808    fi
34809  fi
34810
34811  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34813$as_echo "no symlink" >&6; }
34814  else
34815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34816$as_echo "$SYMLINK_ORIGINAL" >&6; }
34817
34818    # We can't handle ccache by gcc wrappers, since we need to know if we're
34819    # using ccache. Instead ccache usage must be controlled by a configure option.
34820    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34821    if test "x$COMPILER_BASENAME" = "xccache"; then
34822      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34823$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34824      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34825    fi
34826  fi
34827
34828
34829  COMPILER=$CXX
34830  COMPILER_NAME=$COMPILER_NAME
34831
34832  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34833    # cc -V output typically looks like
34834    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34835    # or
34836    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34837    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34838    # Check that this is likely to be the Solaris Studio cc.
34839    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34840    if test $? -ne 0; then
34841      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34842      { $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
34843$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34844      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34845$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34846      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34847$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34848      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34849    fi
34850    # Remove usage instructions (if present), and
34851    # collapse compiler output into a single line
34852    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34853        $SED -e 's/ *[Uu]sage:.*//'`
34854    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34855        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34856  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34857    # xlc -qversion output typically looks like
34858    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34859    #     Version: 11.01.0000.0015
34860    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34861    # Check that this is likely to be the IBM XL C compiler.
34862    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34863    if test $? -ne 0; then
34864      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34865      { $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
34866$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34867      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34868$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34869      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34870$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34871      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34872    fi
34873    # Collapse compiler output into a single line
34874    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34875    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34876        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34877  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34878    # There is no specific version flag, but all output starts with a version string.
34879    # First line typically looks something like:
34880    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34881    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34882    # Check that this is likely to be Microsoft CL.EXE.
34883    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34884    if test $? -ne 0; then
34885      { $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
34886$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34887      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34888$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34889      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34890    fi
34891    # Collapse compiler output into a single line
34892    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34893    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34894        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34895  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34896    # gcc --version output typically looks like
34897    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34898    #     Copyright (C) 2013 Free Software Foundation, Inc.
34899    #     This is free software; see the source for copying conditions.  There is NO
34900    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34901    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34902    # Check that this is likely to be GCC.
34903    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34904    if test $? -ne 0; then
34905      { $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
34906$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34907      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34908$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34909      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34910    fi
34911    # Remove Copyright and legalese from version string, and
34912    # collapse into a single line
34913    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34914        $SED -e 's/ *Copyright .*//'`
34915    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34916        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34917  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34918    # clang --version output typically looks like
34919    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34920    #    clang version 3.3 (tags/RELEASE_33/final)
34921    # or
34922    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34923    #    Target: x86_64-pc-linux-gnu
34924    #    Thread model: posix
34925    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34926    # Check that this is likely to be clang
34927    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34928    if test $? -ne 0; then
34929      { $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
34930$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34931      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34932$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34933      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34934    fi
34935    # Collapse compiler output into a single line
34936    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34937    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34938        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34939  else
34940      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34941  fi
34942  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34943  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34944  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34945  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34946
34947  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34948$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34949
34950
34951  # Now that we have resolved CXX ourself, let autoconf have its go at it
34952  ac_ext=cpp
34953ac_cpp='$CXXCPP $CPPFLAGS'
34954ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34955ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34956ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34957if test -z "$CXX"; then
34958  if test -n "$CCC"; then
34959    CXX=$CCC
34960  else
34961    if test -n "$ac_tool_prefix"; then
34962  for ac_prog in $CXX
34963  do
34964    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34965set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34967$as_echo_n "checking for $ac_word... " >&6; }
34968if ${ac_cv_prog_CXX+:} false; then :
34969  $as_echo_n "(cached) " >&6
34970else
34971  if test -n "$CXX"; then
34972  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34973else
34974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34975for as_dir in $PATH
34976do
34977  IFS=$as_save_IFS
34978  test -z "$as_dir" && as_dir=.
34979    for ac_exec_ext in '' $ac_executable_extensions; do
34980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34981    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34983    break 2
34984  fi
34985done
34986  done
34987IFS=$as_save_IFS
34988
34989fi
34990fi
34991CXX=$ac_cv_prog_CXX
34992if test -n "$CXX"; then
34993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34994$as_echo "$CXX" >&6; }
34995else
34996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34997$as_echo "no" >&6; }
34998fi
34999
35000
35001    test -n "$CXX" && break
35002  done
35003fi
35004if test -z "$CXX"; then
35005  ac_ct_CXX=$CXX
35006  for ac_prog in $CXX
35007do
35008  # Extract the first word of "$ac_prog", so it can be a program name with args.
35009set dummy $ac_prog; ac_word=$2
35010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35011$as_echo_n "checking for $ac_word... " >&6; }
35012if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35013  $as_echo_n "(cached) " >&6
35014else
35015  if test -n "$ac_ct_CXX"; then
35016  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35017else
35018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35019for as_dir in $PATH
35020do
35021  IFS=$as_save_IFS
35022  test -z "$as_dir" && as_dir=.
35023    for ac_exec_ext in '' $ac_executable_extensions; do
35024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35025    ac_cv_prog_ac_ct_CXX="$ac_prog"
35026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35027    break 2
35028  fi
35029done
35030  done
35031IFS=$as_save_IFS
35032
35033fi
35034fi
35035ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35036if test -n "$ac_ct_CXX"; then
35037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35038$as_echo "$ac_ct_CXX" >&6; }
35039else
35040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35041$as_echo "no" >&6; }
35042fi
35043
35044
35045  test -n "$ac_ct_CXX" && break
35046done
35047
35048  if test "x$ac_ct_CXX" = x; then
35049    CXX="g++"
35050  else
35051    case $cross_compiling:$ac_tool_warned in
35052yes:)
35053{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35054$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35055ac_tool_warned=yes ;;
35056esac
35057    CXX=$ac_ct_CXX
35058  fi
35059fi
35060
35061  fi
35062fi
35063# Provide some information about the compiler.
35064$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35065set X $ac_compile
35066ac_compiler=$2
35067for ac_option in --version -v -V -qversion; do
35068  { { ac_try="$ac_compiler $ac_option >&5"
35069case "(($ac_try" in
35070  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35071  *) ac_try_echo=$ac_try;;
35072esac
35073eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35074$as_echo "$ac_try_echo"; } >&5
35075  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35076  ac_status=$?
35077  if test -s conftest.err; then
35078    sed '10a\
35079... rest of stderr output deleted ...
35080         10q' conftest.err >conftest.er1
35081    cat conftest.er1 >&5
35082  fi
35083  rm -f conftest.er1 conftest.err
35084  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35085  test $ac_status = 0; }
35086done
35087
35088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35089$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35090if ${ac_cv_cxx_compiler_gnu+:} false; then :
35091  $as_echo_n "(cached) " >&6
35092else
35093  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35094/* end confdefs.h.  */
35095
35096int
35097main ()
35098{
35099#ifndef __GNUC__
35100       choke me
35101#endif
35102
35103  ;
35104  return 0;
35105}
35106_ACEOF
35107if ac_fn_cxx_try_compile "$LINENO"; then :
35108  ac_compiler_gnu=yes
35109else
35110  ac_compiler_gnu=no
35111fi
35112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35113ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35114
35115fi
35116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35117$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35118if test $ac_compiler_gnu = yes; then
35119  GXX=yes
35120else
35121  GXX=
35122fi
35123ac_test_CXXFLAGS=${CXXFLAGS+set}
35124ac_save_CXXFLAGS=$CXXFLAGS
35125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35126$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35127if ${ac_cv_prog_cxx_g+:} false; then :
35128  $as_echo_n "(cached) " >&6
35129else
35130  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35131   ac_cxx_werror_flag=yes
35132   ac_cv_prog_cxx_g=no
35133   CXXFLAGS="-g"
35134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35135/* end confdefs.h.  */
35136
35137int
35138main ()
35139{
35140
35141  ;
35142  return 0;
35143}
35144_ACEOF
35145if ac_fn_cxx_try_compile "$LINENO"; then :
35146  ac_cv_prog_cxx_g=yes
35147else
35148  CXXFLAGS=""
35149      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35150/* end confdefs.h.  */
35151
35152int
35153main ()
35154{
35155
35156  ;
35157  return 0;
35158}
35159_ACEOF
35160if ac_fn_cxx_try_compile "$LINENO"; then :
35161
35162else
35163  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35164	 CXXFLAGS="-g"
35165	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35166/* end confdefs.h.  */
35167
35168int
35169main ()
35170{
35171
35172  ;
35173  return 0;
35174}
35175_ACEOF
35176if ac_fn_cxx_try_compile "$LINENO"; then :
35177  ac_cv_prog_cxx_g=yes
35178fi
35179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35180fi
35181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35182fi
35183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35184   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35185fi
35186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35187$as_echo "$ac_cv_prog_cxx_g" >&6; }
35188if test "$ac_test_CXXFLAGS" = set; then
35189  CXXFLAGS=$ac_save_CXXFLAGS
35190elif test $ac_cv_prog_cxx_g = yes; then
35191  if test "$GXX" = yes; then
35192    CXXFLAGS="-g -O2"
35193  else
35194    CXXFLAGS="-g"
35195  fi
35196else
35197  if test "$GXX" = yes; then
35198    CXXFLAGS="-O2"
35199  else
35200    CXXFLAGS=
35201  fi
35202fi
35203ac_ext=cpp
35204ac_cpp='$CXXCPP $CPPFLAGS'
35205ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35206ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35207ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35208
35209
35210  # This is the compiler version number on the form X.Y[.Z]
35211
35212
35213
35214
35215  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35216    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35217$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35218    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35219$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35220  fi
35221
35222  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35223  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35224    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35225$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35226  fi
35227
35228  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35229    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35230$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35231  fi
35232
35233  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35234
35235
35236  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35237
35238
35239
35240
35241
35242
35243
35244
35245
35246
35247
35248
35249
35250
35251
35252
35253
35254
35255
35256
35257
35258
35259
35260
35261
35262
35263
35264
35265
35266
35267
35268
35269
35270
35271
35272
35273
35274
35275
35276
35277
35278
35279
35280
35281
35282
35283
35284
35285
35286    # Execute function body
35287
35288  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35289  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35290
35291  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35292    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35293  fi
35294
35295  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35296    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35297  fi
35298
35299  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35300  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35301
35302  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35303    :
35304
35305  else
35306    :
35307
35308          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
35309$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35310
35311
35312  fi
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327  fi
35328
35329  #
35330  # Setup the preprocessor (CPP and CXXCPP)
35331  #
35332  ac_ext=c
35333ac_cpp='$CPP $CPPFLAGS'
35334ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35335ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35336ac_compiler_gnu=$ac_cv_c_compiler_gnu
35337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35338$as_echo_n "checking how to run the C preprocessor... " >&6; }
35339# On Suns, sometimes $CPP names a directory.
35340if test -n "$CPP" && test -d "$CPP"; then
35341  CPP=
35342fi
35343if test -z "$CPP"; then
35344  if ${ac_cv_prog_CPP+:} false; then :
35345  $as_echo_n "(cached) " >&6
35346else
35347      # Double quotes because CPP needs to be expanded
35348    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35349    do
35350      ac_preproc_ok=false
35351for ac_c_preproc_warn_flag in '' yes
35352do
35353  # Use a header file that comes with gcc, so configuring glibc
35354  # with a fresh cross-compiler works.
35355  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35356  # <limits.h> exists even on freestanding compilers.
35357  # On the NeXT, cc -E runs the code through the compiler's parser,
35358  # not just through cpp. "Syntax error" is here to catch this case.
35359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35360/* end confdefs.h.  */
35361#ifdef __STDC__
35362# include <limits.h>
35363#else
35364# include <assert.h>
35365#endif
35366		     Syntax error
35367_ACEOF
35368if ac_fn_c_try_cpp "$LINENO"; then :
35369
35370else
35371  # Broken: fails on valid input.
35372continue
35373fi
35374rm -f conftest.err conftest.i conftest.$ac_ext
35375
35376  # OK, works on sane cases.  Now check whether nonexistent headers
35377  # can be detected and how.
35378  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35379/* end confdefs.h.  */
35380#include <ac_nonexistent.h>
35381_ACEOF
35382if ac_fn_c_try_cpp "$LINENO"; then :
35383  # Broken: success on invalid input.
35384continue
35385else
35386  # Passes both tests.
35387ac_preproc_ok=:
35388break
35389fi
35390rm -f conftest.err conftest.i conftest.$ac_ext
35391
35392done
35393# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35394rm -f conftest.i conftest.err conftest.$ac_ext
35395if $ac_preproc_ok; then :
35396  break
35397fi
35398
35399    done
35400    ac_cv_prog_CPP=$CPP
35401
35402fi
35403  CPP=$ac_cv_prog_CPP
35404else
35405  ac_cv_prog_CPP=$CPP
35406fi
35407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35408$as_echo "$CPP" >&6; }
35409ac_preproc_ok=false
35410for ac_c_preproc_warn_flag in '' yes
35411do
35412  # Use a header file that comes with gcc, so configuring glibc
35413  # with a fresh cross-compiler works.
35414  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35415  # <limits.h> exists even on freestanding compilers.
35416  # On the NeXT, cc -E runs the code through the compiler's parser,
35417  # not just through cpp. "Syntax error" is here to catch this case.
35418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35419/* end confdefs.h.  */
35420#ifdef __STDC__
35421# include <limits.h>
35422#else
35423# include <assert.h>
35424#endif
35425		     Syntax error
35426_ACEOF
35427if ac_fn_c_try_cpp "$LINENO"; then :
35428
35429else
35430  # Broken: fails on valid input.
35431continue
35432fi
35433rm -f conftest.err conftest.i conftest.$ac_ext
35434
35435  # OK, works on sane cases.  Now check whether nonexistent headers
35436  # can be detected and how.
35437  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35438/* end confdefs.h.  */
35439#include <ac_nonexistent.h>
35440_ACEOF
35441if ac_fn_c_try_cpp "$LINENO"; then :
35442  # Broken: success on invalid input.
35443continue
35444else
35445  # Passes both tests.
35446ac_preproc_ok=:
35447break
35448fi
35449rm -f conftest.err conftest.i conftest.$ac_ext
35450
35451done
35452# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35453rm -f conftest.i conftest.err conftest.$ac_ext
35454if $ac_preproc_ok; then :
35455
35456else
35457  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35458$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35459as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35460See \`config.log' for more details" "$LINENO" 5; }
35461fi
35462
35463ac_ext=cpp
35464ac_cpp='$CXXCPP $CPPFLAGS'
35465ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35466ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35467ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35468
35469
35470  # Only process if variable expands to non-empty
35471
35472  if test "x$CPP" != x; then
35473    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35474
35475  # First separate the path from the arguments. This will split at the first
35476  # space.
35477  complete="$CPP"
35478  path="${complete%% *}"
35479  tmp="$complete EOL"
35480  arguments="${tmp#* }"
35481
35482  # Input might be given as Windows format, start by converting to
35483  # unix format.
35484  new_path=`$CYGPATH -u "$path"`
35485
35486  # Now try to locate executable using which
35487  new_path=`$WHICH "$new_path" 2> /dev/null`
35488  # bat and cmd files are not always considered executable in cygwin causing which
35489  # to not find them
35490  if test "x$new_path" = x \
35491      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35492      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35493    new_path=`$CYGPATH -u "$path"`
35494  fi
35495  if test "x$new_path" = x; then
35496    # Oops. Which didn't find the executable.
35497    # The splitting of arguments from the executable at a space might have been incorrect,
35498    # since paths with space are more likely in Windows. Give it another try with the whole
35499    # argument.
35500    path="$complete"
35501    arguments="EOL"
35502    new_path=`$CYGPATH -u "$path"`
35503    new_path=`$WHICH "$new_path" 2> /dev/null`
35504    # bat and cmd files are not always considered executable in cygwin causing which
35505    # to not find them
35506    if test "x$new_path" = x \
35507        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35508        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35509      new_path=`$CYGPATH -u "$path"`
35510    fi
35511    if test "x$new_path" = x; then
35512      # It's still not found. Now this is an unrecoverable error.
35513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35514$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35515      has_space=`$ECHO "$complete" | $GREP " "`
35516      if test "x$has_space" != x; then
35517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35519      fi
35520      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35521    fi
35522  fi
35523
35524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35527  # "foo.exe" is OK but "foo" is an error.
35528  #
35529  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35530  # It is also a way to make sure we got the proper file name for the real test later on.
35531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35532  if test "x$test_shortpath" = x; then
35533    # Short path failed, file does not exist as specified.
35534    # Try adding .exe or .cmd
35535    if test -f "${new_path}.exe"; then
35536      input_to_shortpath="${new_path}.exe"
35537    elif test -f "${new_path}.cmd"; then
35538      input_to_shortpath="${new_path}.cmd"
35539    else
35540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35541$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35542      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35543$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35544      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35545    fi
35546  else
35547    input_to_shortpath="$new_path"
35548  fi
35549
35550  # Call helper function which possibly converts this using DOS-style short mode.
35551  # If so, the updated path is stored in $new_path.
35552  new_path="$input_to_shortpath"
35553
35554  input_path="$input_to_shortpath"
35555  # Check if we need to convert this using DOS-style short mode. If the path
35556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35557  # take no chances and rewrite it.
35558  # Note: m4 eats our [], so we need to use [ and ] instead.
35559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35560  if test "x$has_forbidden_chars" != x; then
35561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35565      # Going to short mode and back again did indeed matter. Since short mode is
35566      # case insensitive, let's make it lowercase to improve readability.
35567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35568      # Now convert it back to Unix-style (cygpath)
35569      input_path=`$CYGPATH -u "$shortmode_path"`
35570      new_path="$input_path"
35571    fi
35572  fi
35573
35574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35575  if test "x$test_cygdrive_prefix" = x; then
35576    # As a simple fix, exclude /usr/bin since it's not a real path.
35577    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35579      # a path prefixed by /cygdrive for fixpath to work.
35580      new_path="$CYGWIN_ROOT_PATH$input_path"
35581    fi
35582  fi
35583
35584  # remove trailing .exe if any
35585  new_path="${new_path/%.exe/}"
35586
35587    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35588
35589  # First separate the path from the arguments. This will split at the first
35590  # space.
35591  complete="$CPP"
35592  path="${complete%% *}"
35593  tmp="$complete EOL"
35594  arguments="${tmp#* }"
35595
35596  # Input might be given as Windows format, start by converting to
35597  # unix format.
35598  new_path="$path"
35599
35600  windows_path="$new_path"
35601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35602    unix_path=`$CYGPATH -u "$windows_path"`
35603    new_path="$unix_path"
35604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35606    new_path="$unix_path"
35607  fi
35608
35609
35610  # Now try to locate executable using which
35611  new_path=`$WHICH "$new_path" 2> /dev/null`
35612
35613  if test "x$new_path" = x; then
35614    # Oops. Which didn't find the executable.
35615    # The splitting of arguments from the executable at a space might have been incorrect,
35616    # since paths with space are more likely in Windows. Give it another try with the whole
35617    # argument.
35618    path="$complete"
35619    arguments="EOL"
35620    new_path="$path"
35621
35622  windows_path="$new_path"
35623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35624    unix_path=`$CYGPATH -u "$windows_path"`
35625    new_path="$unix_path"
35626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35628    new_path="$unix_path"
35629  fi
35630
35631
35632    new_path=`$WHICH "$new_path" 2> /dev/null`
35633    # bat and cmd files are not always considered executable in MSYS causing which
35634    # to not find them
35635    if test "x$new_path" = x \
35636        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35637        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35638      new_path="$path"
35639
35640  windows_path="$new_path"
35641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35642    unix_path=`$CYGPATH -u "$windows_path"`
35643    new_path="$unix_path"
35644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35646    new_path="$unix_path"
35647  fi
35648
35649    fi
35650
35651    if test "x$new_path" = x; then
35652      # It's still not found. Now this is an unrecoverable error.
35653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35654$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35655      has_space=`$ECHO "$complete" | $GREP " "`
35656      if test "x$has_space" != x; then
35657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35659      fi
35660      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35661    fi
35662  fi
35663
35664  # Now new_path has a complete unix path to the binary
35665  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35666    # Keep paths in /bin as-is, but remove trailing .exe if any
35667    new_path="${new_path/%.exe/}"
35668    # Do not save /bin paths to all_fixpath_prefixes!
35669  else
35670    # Not in mixed or Windows style, start by that.
35671    new_path=`cmd //c echo $new_path`
35672
35673  input_path="$new_path"
35674  # Check if we need to convert this using DOS-style short mode. If the path
35675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35676  # take no chances and rewrite it.
35677  # Note: m4 eats our [], so we need to use [ and ] instead.
35678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35679  if test "x$has_forbidden_chars" != x; then
35680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35682  fi
35683
35684    # Output is in $new_path
35685
35686  windows_path="$new_path"
35687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35688    unix_path=`$CYGPATH -u "$windows_path"`
35689    new_path="$unix_path"
35690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35692    new_path="$unix_path"
35693  fi
35694
35695    # remove trailing .exe if any
35696    new_path="${new_path/%.exe/}"
35697
35698    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35699    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35700  fi
35701
35702    else
35703      # We're on a unix platform. Hooray! :)
35704      # First separate the path from the arguments. This will split at the first
35705      # space.
35706      complete="$CPP"
35707      path="${complete%% *}"
35708      tmp="$complete EOL"
35709      arguments="${tmp#* }"
35710
35711      # Cannot rely on the command "which" here since it doesn't always work.
35712      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35713      if test -z "$is_absolute_path"; then
35714        # Path to executable is not absolute. Find it.
35715        IFS_save="$IFS"
35716        IFS=:
35717        for p in $PATH; do
35718          if test -f "$p/$path" && test -x "$p/$path"; then
35719            new_path="$p/$path"
35720            break
35721          fi
35722        done
35723        IFS="$IFS_save"
35724      else
35725        # This is an absolute path, we can use it without further modifications.
35726        new_path="$path"
35727      fi
35728
35729      if test "x$new_path" = x; then
35730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35731$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35732        has_space=`$ECHO "$complete" | $GREP " "`
35733        if test "x$has_space" != x; then
35734          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35735$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35736        fi
35737        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35738      fi
35739    fi
35740
35741    # Now join together the path and the arguments once again
35742    if test "x$arguments" != xEOL; then
35743      new_complete="$new_path ${arguments% *}"
35744    else
35745      new_complete="$new_path"
35746    fi
35747
35748    if test "x$complete" != "x$new_complete"; then
35749      CPP="$new_complete"
35750      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35751$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35752    fi
35753  fi
35754
35755  ac_ext=cpp
35756ac_cpp='$CXXCPP $CPPFLAGS'
35757ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35758ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35759ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35761$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35762if test -z "$CXXCPP"; then
35763  if ${ac_cv_prog_CXXCPP+:} false; then :
35764  $as_echo_n "(cached) " >&6
35765else
35766      # Double quotes because CXXCPP needs to be expanded
35767    for CXXCPP in "$CXX -E" "/lib/cpp"
35768    do
35769      ac_preproc_ok=false
35770for ac_cxx_preproc_warn_flag in '' yes
35771do
35772  # Use a header file that comes with gcc, so configuring glibc
35773  # with a fresh cross-compiler works.
35774  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35775  # <limits.h> exists even on freestanding compilers.
35776  # On the NeXT, cc -E runs the code through the compiler's parser,
35777  # not just through cpp. "Syntax error" is here to catch this case.
35778  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35779/* end confdefs.h.  */
35780#ifdef __STDC__
35781# include <limits.h>
35782#else
35783# include <assert.h>
35784#endif
35785		     Syntax error
35786_ACEOF
35787if ac_fn_cxx_try_cpp "$LINENO"; then :
35788
35789else
35790  # Broken: fails on valid input.
35791continue
35792fi
35793rm -f conftest.err conftest.i conftest.$ac_ext
35794
35795  # OK, works on sane cases.  Now check whether nonexistent headers
35796  # can be detected and how.
35797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35798/* end confdefs.h.  */
35799#include <ac_nonexistent.h>
35800_ACEOF
35801if ac_fn_cxx_try_cpp "$LINENO"; then :
35802  # Broken: success on invalid input.
35803continue
35804else
35805  # Passes both tests.
35806ac_preproc_ok=:
35807break
35808fi
35809rm -f conftest.err conftest.i conftest.$ac_ext
35810
35811done
35812# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35813rm -f conftest.i conftest.err conftest.$ac_ext
35814if $ac_preproc_ok; then :
35815  break
35816fi
35817
35818    done
35819    ac_cv_prog_CXXCPP=$CXXCPP
35820
35821fi
35822  CXXCPP=$ac_cv_prog_CXXCPP
35823else
35824  ac_cv_prog_CXXCPP=$CXXCPP
35825fi
35826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35827$as_echo "$CXXCPP" >&6; }
35828ac_preproc_ok=false
35829for ac_cxx_preproc_warn_flag in '' yes
35830do
35831  # Use a header file that comes with gcc, so configuring glibc
35832  # with a fresh cross-compiler works.
35833  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35834  # <limits.h> exists even on freestanding compilers.
35835  # On the NeXT, cc -E runs the code through the compiler's parser,
35836  # not just through cpp. "Syntax error" is here to catch this case.
35837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35838/* end confdefs.h.  */
35839#ifdef __STDC__
35840# include <limits.h>
35841#else
35842# include <assert.h>
35843#endif
35844		     Syntax error
35845_ACEOF
35846if ac_fn_cxx_try_cpp "$LINENO"; then :
35847
35848else
35849  # Broken: fails on valid input.
35850continue
35851fi
35852rm -f conftest.err conftest.i conftest.$ac_ext
35853
35854  # OK, works on sane cases.  Now check whether nonexistent headers
35855  # can be detected and how.
35856  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35857/* end confdefs.h.  */
35858#include <ac_nonexistent.h>
35859_ACEOF
35860if ac_fn_cxx_try_cpp "$LINENO"; then :
35861  # Broken: success on invalid input.
35862continue
35863else
35864  # Passes both tests.
35865ac_preproc_ok=:
35866break
35867fi
35868rm -f conftest.err conftest.i conftest.$ac_ext
35869
35870done
35871# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35872rm -f conftest.i conftest.err conftest.$ac_ext
35873if $ac_preproc_ok; then :
35874
35875else
35876  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35877$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35878as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35879See \`config.log' for more details" "$LINENO" 5; }
35880fi
35881
35882ac_ext=cpp
35883ac_cpp='$CXXCPP $CPPFLAGS'
35884ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35885ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35886ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35887
35888
35889  # Only process if variable expands to non-empty
35890
35891  if test "x$CXXCPP" != x; then
35892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35893
35894  # First separate the path from the arguments. This will split at the first
35895  # space.
35896  complete="$CXXCPP"
35897  path="${complete%% *}"
35898  tmp="$complete EOL"
35899  arguments="${tmp#* }"
35900
35901  # Input might be given as Windows format, start by converting to
35902  # unix format.
35903  new_path=`$CYGPATH -u "$path"`
35904
35905  # Now try to locate executable using which
35906  new_path=`$WHICH "$new_path" 2> /dev/null`
35907  # bat and cmd files are not always considered executable in cygwin causing which
35908  # to not find them
35909  if test "x$new_path" = x \
35910      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35911      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35912    new_path=`$CYGPATH -u "$path"`
35913  fi
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=`$CYGPATH -u "$path"`
35922    new_path=`$WHICH "$new_path" 2> /dev/null`
35923    # bat and cmd files are not always considered executable in cygwin causing which
35924    # to not find them
35925    if test "x$new_path" = x \
35926        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35927        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35928      new_path=`$CYGPATH -u "$path"`
35929    fi
35930    if test "x$new_path" = x; then
35931      # It's still not found. Now this is an unrecoverable error.
35932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35933$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35934      has_space=`$ECHO "$complete" | $GREP " "`
35935      if test "x$has_space" != x; then
35936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35938      fi
35939      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35940    fi
35941  fi
35942
35943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35946  # "foo.exe" is OK but "foo" is an error.
35947  #
35948  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35949  # It is also a way to make sure we got the proper file name for the real test later on.
35950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35951  if test "x$test_shortpath" = x; then
35952    # Short path failed, file does not exist as specified.
35953    # Try adding .exe or .cmd
35954    if test -f "${new_path}.exe"; then
35955      input_to_shortpath="${new_path}.exe"
35956    elif test -f "${new_path}.cmd"; then
35957      input_to_shortpath="${new_path}.cmd"
35958    else
35959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35960$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35961      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35962$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35963      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35964    fi
35965  else
35966    input_to_shortpath="$new_path"
35967  fi
35968
35969  # Call helper function which possibly converts this using DOS-style short mode.
35970  # If so, the updated path is stored in $new_path.
35971  new_path="$input_to_shortpath"
35972
35973  input_path="$input_to_shortpath"
35974  # Check if we need to convert this using DOS-style short mode. If the path
35975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35976  # take no chances and rewrite it.
35977  # Note: m4 eats our [], so we need to use [ and ] instead.
35978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35979  if test "x$has_forbidden_chars" != x; then
35980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35984      # Going to short mode and back again did indeed matter. Since short mode is
35985      # case insensitive, let's make it lowercase to improve readability.
35986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35987      # Now convert it back to Unix-style (cygpath)
35988      input_path=`$CYGPATH -u "$shortmode_path"`
35989      new_path="$input_path"
35990    fi
35991  fi
35992
35993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35994  if test "x$test_cygdrive_prefix" = x; then
35995    # As a simple fix, exclude /usr/bin since it's not a real path.
35996    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35998      # a path prefixed by /cygdrive for fixpath to work.
35999      new_path="$CYGWIN_ROOT_PATH$input_path"
36000    fi
36001  fi
36002
36003  # remove trailing .exe if any
36004  new_path="${new_path/%.exe/}"
36005
36006    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36007
36008  # First separate the path from the arguments. This will split at the first
36009  # space.
36010  complete="$CXXCPP"
36011  path="${complete%% *}"
36012  tmp="$complete EOL"
36013  arguments="${tmp#* }"
36014
36015  # Input might be given as Windows format, start by converting to
36016  # unix format.
36017  new_path="$path"
36018
36019  windows_path="$new_path"
36020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36021    unix_path=`$CYGPATH -u "$windows_path"`
36022    new_path="$unix_path"
36023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36025    new_path="$unix_path"
36026  fi
36027
36028
36029  # Now try to locate executable using which
36030  new_path=`$WHICH "$new_path" 2> /dev/null`
36031
36032  if test "x$new_path" = x; then
36033    # Oops. Which didn't find the executable.
36034    # The splitting of arguments from the executable at a space might have been incorrect,
36035    # since paths with space are more likely in Windows. Give it another try with the whole
36036    # argument.
36037    path="$complete"
36038    arguments="EOL"
36039    new_path="$path"
36040
36041  windows_path="$new_path"
36042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36043    unix_path=`$CYGPATH -u "$windows_path"`
36044    new_path="$unix_path"
36045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36047    new_path="$unix_path"
36048  fi
36049
36050
36051    new_path=`$WHICH "$new_path" 2> /dev/null`
36052    # bat and cmd files are not always considered executable in MSYS causing which
36053    # to not find them
36054    if test "x$new_path" = x \
36055        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36056        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36057      new_path="$path"
36058
36059  windows_path="$new_path"
36060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36061    unix_path=`$CYGPATH -u "$windows_path"`
36062    new_path="$unix_path"
36063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36065    new_path="$unix_path"
36066  fi
36067
36068    fi
36069
36070    if test "x$new_path" = x; then
36071      # It's still not found. Now this is an unrecoverable error.
36072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36073$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36074      has_space=`$ECHO "$complete" | $GREP " "`
36075      if test "x$has_space" != x; then
36076        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36077$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36078      fi
36079      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36080    fi
36081  fi
36082
36083  # Now new_path has a complete unix path to the binary
36084  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36085    # Keep paths in /bin as-is, but remove trailing .exe if any
36086    new_path="${new_path/%.exe/}"
36087    # Do not save /bin paths to all_fixpath_prefixes!
36088  else
36089    # Not in mixed or Windows style, start by that.
36090    new_path=`cmd //c echo $new_path`
36091
36092  input_path="$new_path"
36093  # Check if we need to convert this using DOS-style short mode. If the path
36094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36095  # take no chances and rewrite it.
36096  # Note: m4 eats our [], so we need to use [ and ] instead.
36097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36098  if test "x$has_forbidden_chars" != x; then
36099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36101  fi
36102
36103    # Output is in $new_path
36104
36105  windows_path="$new_path"
36106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36107    unix_path=`$CYGPATH -u "$windows_path"`
36108    new_path="$unix_path"
36109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36111    new_path="$unix_path"
36112  fi
36113
36114    # remove trailing .exe if any
36115    new_path="${new_path/%.exe/}"
36116
36117    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36118    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36119  fi
36120
36121    else
36122      # We're on a unix platform. Hooray! :)
36123      # First separate the path from the arguments. This will split at the first
36124      # space.
36125      complete="$CXXCPP"
36126      path="${complete%% *}"
36127      tmp="$complete EOL"
36128      arguments="${tmp#* }"
36129
36130      # Cannot rely on the command "which" here since it doesn't always work.
36131      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36132      if test -z "$is_absolute_path"; then
36133        # Path to executable is not absolute. Find it.
36134        IFS_save="$IFS"
36135        IFS=:
36136        for p in $PATH; do
36137          if test -f "$p/$path" && test -x "$p/$path"; then
36138            new_path="$p/$path"
36139            break
36140          fi
36141        done
36142        IFS="$IFS_save"
36143      else
36144        # This is an absolute path, we can use it without further modifications.
36145        new_path="$path"
36146      fi
36147
36148      if test "x$new_path" = x; then
36149        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36150$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36151        has_space=`$ECHO "$complete" | $GREP " "`
36152        if test "x$has_space" != x; then
36153          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36154$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36155        fi
36156        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36157      fi
36158    fi
36159
36160    # Now join together the path and the arguments once again
36161    if test "x$arguments" != xEOL; then
36162      new_complete="$new_path ${arguments% *}"
36163    else
36164      new_complete="$new_path"
36165    fi
36166
36167    if test "x$complete" != "x$new_complete"; then
36168      CXXCPP="$new_complete"
36169      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36170$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36171    fi
36172  fi
36173
36174
36175  #
36176  # Setup the linker (LD)
36177  #
36178  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36179    # In the Microsoft toolchain we have a separate LD command "link".
36180    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36181    # a cygwin program for something completely different.
36182    # Extract the first word of "link", so it can be a program name with args.
36183set dummy link; ac_word=$2
36184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36185$as_echo_n "checking for $ac_word... " >&6; }
36186if ${ac_cv_prog_LD+:} false; then :
36187  $as_echo_n "(cached) " >&6
36188else
36189  if test -n "$LD"; then
36190  ac_cv_prog_LD="$LD" # Let the user override the test.
36191else
36192  ac_prog_rejected=no
36193as_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    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36201       ac_prog_rejected=yes
36202       continue
36203     fi
36204    ac_cv_prog_LD="link"
36205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36206    break 2
36207  fi
36208done
36209  done
36210IFS=$as_save_IFS
36211
36212if test $ac_prog_rejected = yes; then
36213  # We found a bogon in the path, so make sure we never use it.
36214  set dummy $ac_cv_prog_LD
36215  shift
36216  if test $# != 0; then
36217    # We chose a different compiler from the bogus one.
36218    # However, it has the same basename, so the bogon will be chosen
36219    # first if we set LD to just the basename; use the full file name.
36220    shift
36221    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36222  fi
36223fi
36224fi
36225fi
36226LD=$ac_cv_prog_LD
36227if test -n "$LD"; then
36228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36229$as_echo "$LD" >&6; }
36230else
36231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36232$as_echo "no" >&6; }
36233fi
36234
36235
36236
36237  # Only process if variable expands to non-empty
36238
36239  if test "x$LD" != x; then
36240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36241
36242  # First separate the path from the arguments. This will split at the first
36243  # space.
36244  complete="$LD"
36245  path="${complete%% *}"
36246  tmp="$complete EOL"
36247  arguments="${tmp#* }"
36248
36249  # Input might be given as Windows format, start by converting to
36250  # unix format.
36251  new_path=`$CYGPATH -u "$path"`
36252
36253  # Now try to locate executable using which
36254  new_path=`$WHICH "$new_path" 2> /dev/null`
36255  # bat and cmd files are not always considered executable in cygwin causing which
36256  # to not find them
36257  if test "x$new_path" = x \
36258      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36259      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36260    new_path=`$CYGPATH -u "$path"`
36261  fi
36262  if test "x$new_path" = x; then
36263    # Oops. Which didn't find the executable.
36264    # The splitting of arguments from the executable at a space might have been incorrect,
36265    # since paths with space are more likely in Windows. Give it another try with the whole
36266    # argument.
36267    path="$complete"
36268    arguments="EOL"
36269    new_path=`$CYGPATH -u "$path"`
36270    new_path=`$WHICH "$new_path" 2> /dev/null`
36271    # bat and cmd files are not always considered executable in cygwin causing which
36272    # to not find them
36273    if test "x$new_path" = x \
36274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36276      new_path=`$CYGPATH -u "$path"`
36277    fi
36278    if test "x$new_path" = x; then
36279      # It's still not found. Now this is an unrecoverable error.
36280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36281$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36282      has_space=`$ECHO "$complete" | $GREP " "`
36283      if test "x$has_space" != x; then
36284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36286      fi
36287      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36288    fi
36289  fi
36290
36291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36294  # "foo.exe" is OK but "foo" is an error.
36295  #
36296  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36297  # It is also a way to make sure we got the proper file name for the real test later on.
36298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36299  if test "x$test_shortpath" = x; then
36300    # Short path failed, file does not exist as specified.
36301    # Try adding .exe or .cmd
36302    if test -f "${new_path}.exe"; then
36303      input_to_shortpath="${new_path}.exe"
36304    elif test -f "${new_path}.cmd"; then
36305      input_to_shortpath="${new_path}.cmd"
36306    else
36307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36308$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36311      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36312    fi
36313  else
36314    input_to_shortpath="$new_path"
36315  fi
36316
36317  # Call helper function which possibly converts this using DOS-style short mode.
36318  # If so, the updated path is stored in $new_path.
36319  new_path="$input_to_shortpath"
36320
36321  input_path="$input_to_shortpath"
36322  # Check if we need to convert this using DOS-style short mode. If the path
36323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36324  # take no chances and rewrite it.
36325  # Note: m4 eats our [], so we need to use [ and ] instead.
36326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36327  if test "x$has_forbidden_chars" != x; then
36328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36332      # Going to short mode and back again did indeed matter. Since short mode is
36333      # case insensitive, let's make it lowercase to improve readability.
36334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36335      # Now convert it back to Unix-style (cygpath)
36336      input_path=`$CYGPATH -u "$shortmode_path"`
36337      new_path="$input_path"
36338    fi
36339  fi
36340
36341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36342  if test "x$test_cygdrive_prefix" = x; then
36343    # As a simple fix, exclude /usr/bin since it's not a real path.
36344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36346      # a path prefixed by /cygdrive for fixpath to work.
36347      new_path="$CYGWIN_ROOT_PATH$input_path"
36348    fi
36349  fi
36350
36351  # remove trailing .exe if any
36352  new_path="${new_path/%.exe/}"
36353
36354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36355
36356  # First separate the path from the arguments. This will split at the first
36357  # space.
36358  complete="$LD"
36359  path="${complete%% *}"
36360  tmp="$complete EOL"
36361  arguments="${tmp#* }"
36362
36363  # Input might be given as Windows format, start by converting to
36364  # unix format.
36365  new_path="$path"
36366
36367  windows_path="$new_path"
36368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36369    unix_path=`$CYGPATH -u "$windows_path"`
36370    new_path="$unix_path"
36371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36373    new_path="$unix_path"
36374  fi
36375
36376
36377  # Now try to locate executable using which
36378  new_path=`$WHICH "$new_path" 2> /dev/null`
36379
36380  if test "x$new_path" = x; then
36381    # Oops. Which didn't find the executable.
36382    # The splitting of arguments from the executable at a space might have been incorrect,
36383    # since paths with space are more likely in Windows. Give it another try with the whole
36384    # argument.
36385    path="$complete"
36386    arguments="EOL"
36387    new_path="$path"
36388
36389  windows_path="$new_path"
36390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36391    unix_path=`$CYGPATH -u "$windows_path"`
36392    new_path="$unix_path"
36393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36395    new_path="$unix_path"
36396  fi
36397
36398
36399    new_path=`$WHICH "$new_path" 2> /dev/null`
36400    # bat and cmd files are not always considered executable in MSYS causing which
36401    # to not find them
36402    if test "x$new_path" = x \
36403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36405      new_path="$path"
36406
36407  windows_path="$new_path"
36408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36409    unix_path=`$CYGPATH -u "$windows_path"`
36410    new_path="$unix_path"
36411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36413    new_path="$unix_path"
36414  fi
36415
36416    fi
36417
36418    if test "x$new_path" = x; then
36419      # It's still not found. Now this is an unrecoverable error.
36420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36421$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36422      has_space=`$ECHO "$complete" | $GREP " "`
36423      if test "x$has_space" != x; then
36424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36426      fi
36427      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36428    fi
36429  fi
36430
36431  # Now new_path has a complete unix path to the binary
36432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36433    # Keep paths in /bin as-is, but remove trailing .exe if any
36434    new_path="${new_path/%.exe/}"
36435    # Do not save /bin paths to all_fixpath_prefixes!
36436  else
36437    # Not in mixed or Windows style, start by that.
36438    new_path=`cmd //c echo $new_path`
36439
36440  input_path="$new_path"
36441  # Check if we need to convert this using DOS-style short mode. If the path
36442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36443  # take no chances and rewrite it.
36444  # Note: m4 eats our [], so we need to use [ and ] instead.
36445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36446  if test "x$has_forbidden_chars" != x; then
36447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36449  fi
36450
36451    # Output is in $new_path
36452
36453  windows_path="$new_path"
36454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36455    unix_path=`$CYGPATH -u "$windows_path"`
36456    new_path="$unix_path"
36457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36459    new_path="$unix_path"
36460  fi
36461
36462    # remove trailing .exe if any
36463    new_path="${new_path/%.exe/}"
36464
36465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36467  fi
36468
36469    else
36470      # We're on a unix platform. Hooray! :)
36471      # First separate the path from the arguments. This will split at the first
36472      # space.
36473      complete="$LD"
36474      path="${complete%% *}"
36475      tmp="$complete EOL"
36476      arguments="${tmp#* }"
36477
36478      # Cannot rely on the command "which" here since it doesn't always work.
36479      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36480      if test -z "$is_absolute_path"; then
36481        # Path to executable is not absolute. Find it.
36482        IFS_save="$IFS"
36483        IFS=:
36484        for p in $PATH; do
36485          if test -f "$p/$path" && test -x "$p/$path"; then
36486            new_path="$p/$path"
36487            break
36488          fi
36489        done
36490        IFS="$IFS_save"
36491      else
36492        # This is an absolute path, we can use it without further modifications.
36493        new_path="$path"
36494      fi
36495
36496      if test "x$new_path" = x; then
36497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36498$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36499        has_space=`$ECHO "$complete" | $GREP " "`
36500        if test "x$has_space" != x; then
36501          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36503        fi
36504        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36505      fi
36506    fi
36507
36508    # Now join together the path and the arguments once again
36509    if test "x$arguments" != xEOL; then
36510      new_complete="$new_path ${arguments% *}"
36511    else
36512      new_complete="$new_path"
36513    fi
36514
36515    if test "x$complete" != "x$new_complete"; then
36516      LD="$new_complete"
36517      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36518$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36519    fi
36520  fi
36521
36522    # Verify that we indeed succeeded with this trick.
36523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36524$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36525    "$LD" --version > /dev/null
36526    if test $? -eq 0 ; then
36527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36528$as_echo "no" >&6; }
36529      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36530    else
36531      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36532$as_echo "yes" >&6; }
36533    fi
36534    LDCXX="$LD"
36535  else
36536    # All other toolchains use the compiler to link.
36537    LD="$CC"
36538    LDCXX="$CXX"
36539  fi
36540
36541  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36542
36543
36544  #
36545  # Setup the assembler (AS)
36546  #
36547  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36548
36549
36550  # Publish this variable in the help.
36551
36552
36553  if [ -z "${AS+x}" ]; then
36554    # The variable is not set by user, try to locate tool using the code snippet
36555    for ac_prog in as
36556do
36557  # Extract the first word of "$ac_prog", so it can be a program name with args.
36558set dummy $ac_prog; ac_word=$2
36559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36560$as_echo_n "checking for $ac_word... " >&6; }
36561if ${ac_cv_path_AS+:} false; then :
36562  $as_echo_n "(cached) " >&6
36563else
36564  case $AS in
36565  [\\/]* | ?:[\\/]*)
36566  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36567  ;;
36568  *)
36569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36570for as_dir in $PATH
36571do
36572  IFS=$as_save_IFS
36573  test -z "$as_dir" && as_dir=.
36574    for ac_exec_ext in '' $ac_executable_extensions; do
36575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36576    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36578    break 2
36579  fi
36580done
36581  done
36582IFS=$as_save_IFS
36583
36584  ;;
36585esac
36586fi
36587AS=$ac_cv_path_AS
36588if test -n "$AS"; then
36589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36590$as_echo "$AS" >&6; }
36591else
36592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36593$as_echo "no" >&6; }
36594fi
36595
36596
36597  test -n "$AS" && break
36598done
36599
36600  else
36601    # The variable is set, but is it from the command line or the environment?
36602
36603    # Try to remove the string !AS! from our list.
36604    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36605    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36606      # If it failed, the variable was not from the command line. Ignore it,
36607      # but warn the user (except for BASH, which is always set by the calling BASH).
36608      if test "xAS" != xBASH; then
36609        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36610$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36611      fi
36612      # Try to locate tool using the code snippet
36613      for ac_prog in as
36614do
36615  # Extract the first word of "$ac_prog", so it can be a program name with args.
36616set dummy $ac_prog; ac_word=$2
36617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36618$as_echo_n "checking for $ac_word... " >&6; }
36619if ${ac_cv_path_AS+:} false; then :
36620  $as_echo_n "(cached) " >&6
36621else
36622  case $AS in
36623  [\\/]* | ?:[\\/]*)
36624  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36625  ;;
36626  *)
36627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36628for as_dir in $PATH
36629do
36630  IFS=$as_save_IFS
36631  test -z "$as_dir" && as_dir=.
36632    for ac_exec_ext in '' $ac_executable_extensions; do
36633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36634    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36636    break 2
36637  fi
36638done
36639  done
36640IFS=$as_save_IFS
36641
36642  ;;
36643esac
36644fi
36645AS=$ac_cv_path_AS
36646if test -n "$AS"; then
36647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36648$as_echo "$AS" >&6; }
36649else
36650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36651$as_echo "no" >&6; }
36652fi
36653
36654
36655  test -n "$AS" && break
36656done
36657
36658    else
36659      # If it succeeded, then it was overridden by the user. We will use it
36660      # for the tool.
36661
36662      # First remove it from the list of overridden variables, so we can test
36663      # for unknown variables in the end.
36664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36665
36666      # Check if we try to supply an empty value
36667      if test "x$AS" = x; then
36668        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36669$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36671$as_echo_n "checking for AS... " >&6; }
36672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36673$as_echo "disabled" >&6; }
36674      else
36675        # Check if the provided tool contains a complete path.
36676        tool_specified="$AS"
36677        tool_basename="${tool_specified##*/}"
36678        if test "x$tool_basename" = "x$tool_specified"; then
36679          # A command without a complete path is provided, search $PATH.
36680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36681$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36682          # Extract the first word of "$tool_basename", so it can be a program name with args.
36683set dummy $tool_basename; ac_word=$2
36684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36685$as_echo_n "checking for $ac_word... " >&6; }
36686if ${ac_cv_path_AS+:} false; then :
36687  $as_echo_n "(cached) " >&6
36688else
36689  case $AS in
36690  [\\/]* | ?:[\\/]*)
36691  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36692  ;;
36693  *)
36694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36695for as_dir in $PATH
36696do
36697  IFS=$as_save_IFS
36698  test -z "$as_dir" && as_dir=.
36699    for ac_exec_ext in '' $ac_executable_extensions; do
36700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36701    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36703    break 2
36704  fi
36705done
36706  done
36707IFS=$as_save_IFS
36708
36709  ;;
36710esac
36711fi
36712AS=$ac_cv_path_AS
36713if test -n "$AS"; then
36714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36715$as_echo "$AS" >&6; }
36716else
36717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36718$as_echo "no" >&6; }
36719fi
36720
36721
36722          if test "x$AS" = x; then
36723            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36724          fi
36725        else
36726          # Otherwise we believe it is a complete path. Use it as it is.
36727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36728$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36729          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36730$as_echo_n "checking for AS... " >&6; }
36731          if test ! -x "$tool_specified"; then
36732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36733$as_echo "not found" >&6; }
36734            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36735          fi
36736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36737$as_echo "$tool_specified" >&6; }
36738        fi
36739      fi
36740    fi
36741
36742  fi
36743
36744
36745
36746  # Only process if variable expands to non-empty
36747
36748  if test "x$AS" != x; then
36749    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36750
36751  # First separate the path from the arguments. This will split at the first
36752  # space.
36753  complete="$AS"
36754  path="${complete%% *}"
36755  tmp="$complete EOL"
36756  arguments="${tmp#* }"
36757
36758  # Input might be given as Windows format, start by converting to
36759  # unix format.
36760  new_path=`$CYGPATH -u "$path"`
36761
36762  # Now try to locate executable using which
36763  new_path=`$WHICH "$new_path" 2> /dev/null`
36764  # bat and cmd files are not always considered executable in cygwin causing which
36765  # to not find them
36766  if test "x$new_path" = x \
36767      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36768      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36769    new_path=`$CYGPATH -u "$path"`
36770  fi
36771  if test "x$new_path" = x; then
36772    # Oops. Which didn't find the executable.
36773    # The splitting of arguments from the executable at a space might have been incorrect,
36774    # since paths with space are more likely in Windows. Give it another try with the whole
36775    # argument.
36776    path="$complete"
36777    arguments="EOL"
36778    new_path=`$CYGPATH -u "$path"`
36779    new_path=`$WHICH "$new_path" 2> /dev/null`
36780    # bat and cmd files are not always considered executable in cygwin causing which
36781    # to not find them
36782    if test "x$new_path" = x \
36783        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36784        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36785      new_path=`$CYGPATH -u "$path"`
36786    fi
36787    if test "x$new_path" = x; then
36788      # It's still not found. Now this is an unrecoverable error.
36789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36790$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36791      has_space=`$ECHO "$complete" | $GREP " "`
36792      if test "x$has_space" != x; then
36793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36795      fi
36796      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36797    fi
36798  fi
36799
36800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36803  # "foo.exe" is OK but "foo" is an error.
36804  #
36805  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36806  # It is also a way to make sure we got the proper file name for the real test later on.
36807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36808  if test "x$test_shortpath" = x; then
36809    # Short path failed, file does not exist as specified.
36810    # Try adding .exe or .cmd
36811    if test -f "${new_path}.exe"; then
36812      input_to_shortpath="${new_path}.exe"
36813    elif test -f "${new_path}.cmd"; then
36814      input_to_shortpath="${new_path}.cmd"
36815    else
36816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36817$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36818      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36819$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36820      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36821    fi
36822  else
36823    input_to_shortpath="$new_path"
36824  fi
36825
36826  # Call helper function which possibly converts this using DOS-style short mode.
36827  # If so, the updated path is stored in $new_path.
36828  new_path="$input_to_shortpath"
36829
36830  input_path="$input_to_shortpath"
36831  # Check if we need to convert this using DOS-style short mode. If the path
36832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36833  # take no chances and rewrite it.
36834  # Note: m4 eats our [], so we need to use [ and ] instead.
36835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36836  if test "x$has_forbidden_chars" != x; then
36837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36841      # Going to short mode and back again did indeed matter. Since short mode is
36842      # case insensitive, let's make it lowercase to improve readability.
36843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36844      # Now convert it back to Unix-style (cygpath)
36845      input_path=`$CYGPATH -u "$shortmode_path"`
36846      new_path="$input_path"
36847    fi
36848  fi
36849
36850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36851  if test "x$test_cygdrive_prefix" = x; then
36852    # As a simple fix, exclude /usr/bin since it's not a real path.
36853    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36855      # a path prefixed by /cygdrive for fixpath to work.
36856      new_path="$CYGWIN_ROOT_PATH$input_path"
36857    fi
36858  fi
36859
36860  # remove trailing .exe if any
36861  new_path="${new_path/%.exe/}"
36862
36863    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36864
36865  # First separate the path from the arguments. This will split at the first
36866  # space.
36867  complete="$AS"
36868  path="${complete%% *}"
36869  tmp="$complete EOL"
36870  arguments="${tmp#* }"
36871
36872  # Input might be given as Windows format, start by converting to
36873  # unix format.
36874  new_path="$path"
36875
36876  windows_path="$new_path"
36877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36878    unix_path=`$CYGPATH -u "$windows_path"`
36879    new_path="$unix_path"
36880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36882    new_path="$unix_path"
36883  fi
36884
36885
36886  # Now try to locate executable using which
36887  new_path=`$WHICH "$new_path" 2> /dev/null`
36888
36889  if test "x$new_path" = x; then
36890    # Oops. Which didn't find the executable.
36891    # The splitting of arguments from the executable at a space might have been incorrect,
36892    # since paths with space are more likely in Windows. Give it another try with the whole
36893    # argument.
36894    path="$complete"
36895    arguments="EOL"
36896    new_path="$path"
36897
36898  windows_path="$new_path"
36899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36900    unix_path=`$CYGPATH -u "$windows_path"`
36901    new_path="$unix_path"
36902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36904    new_path="$unix_path"
36905  fi
36906
36907
36908    new_path=`$WHICH "$new_path" 2> /dev/null`
36909    # bat and cmd files are not always considered executable in MSYS causing which
36910    # to not find them
36911    if test "x$new_path" = x \
36912        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36913        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36914      new_path="$path"
36915
36916  windows_path="$new_path"
36917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36918    unix_path=`$CYGPATH -u "$windows_path"`
36919    new_path="$unix_path"
36920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36922    new_path="$unix_path"
36923  fi
36924
36925    fi
36926
36927    if test "x$new_path" = x; then
36928      # It's still not found. Now this is an unrecoverable error.
36929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36930$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36931      has_space=`$ECHO "$complete" | $GREP " "`
36932      if test "x$has_space" != x; then
36933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36935      fi
36936      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36937    fi
36938  fi
36939
36940  # Now new_path has a complete unix path to the binary
36941  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36942    # Keep paths in /bin as-is, but remove trailing .exe if any
36943    new_path="${new_path/%.exe/}"
36944    # Do not save /bin paths to all_fixpath_prefixes!
36945  else
36946    # Not in mixed or Windows style, start by that.
36947    new_path=`cmd //c echo $new_path`
36948
36949  input_path="$new_path"
36950  # Check if we need to convert this using DOS-style short mode. If the path
36951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36952  # take no chances and rewrite it.
36953  # Note: m4 eats our [], so we need to use [ and ] instead.
36954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36955  if test "x$has_forbidden_chars" != x; then
36956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36958  fi
36959
36960    # Output is in $new_path
36961
36962  windows_path="$new_path"
36963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36964    unix_path=`$CYGPATH -u "$windows_path"`
36965    new_path="$unix_path"
36966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36968    new_path="$unix_path"
36969  fi
36970
36971    # remove trailing .exe if any
36972    new_path="${new_path/%.exe/}"
36973
36974    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36975    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36976  fi
36977
36978    else
36979      # We're on a unix platform. Hooray! :)
36980      # First separate the path from the arguments. This will split at the first
36981      # space.
36982      complete="$AS"
36983      path="${complete%% *}"
36984      tmp="$complete EOL"
36985      arguments="${tmp#* }"
36986
36987      # Cannot rely on the command "which" here since it doesn't always work.
36988      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36989      if test -z "$is_absolute_path"; then
36990        # Path to executable is not absolute. Find it.
36991        IFS_save="$IFS"
36992        IFS=:
36993        for p in $PATH; do
36994          if test -f "$p/$path" && test -x "$p/$path"; then
36995            new_path="$p/$path"
36996            break
36997          fi
36998        done
36999        IFS="$IFS_save"
37000      else
37001        # This is an absolute path, we can use it without further modifications.
37002        new_path="$path"
37003      fi
37004
37005      if test "x$new_path" = x; then
37006        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37007$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37008        has_space=`$ECHO "$complete" | $GREP " "`
37009        if test "x$has_space" != x; then
37010          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37011$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37012        fi
37013        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37014      fi
37015    fi
37016
37017    # Now join together the path and the arguments once again
37018    if test "x$arguments" != xEOL; then
37019      new_complete="$new_path ${arguments% *}"
37020    else
37021      new_complete="$new_path"
37022    fi
37023
37024    if test "x$complete" != "x$new_complete"; then
37025      AS="$new_complete"
37026      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37027$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37028    fi
37029  fi
37030
37031    if test "x$AS" = x; then
37032      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37033    fi
37034  else
37035    # FIXME: is this correct for microsoft?
37036    AS="$CC -c"
37037  fi
37038
37039
37040  #
37041  # Setup the archiver (AR)
37042  #
37043  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37044    # The corresponding ar tool is lib.exe (used to create static libraries)
37045    # Extract the first word of "lib", so it can be a program name with args.
37046set dummy lib; ac_word=$2
37047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37048$as_echo_n "checking for $ac_word... " >&6; }
37049if ${ac_cv_prog_AR+:} false; then :
37050  $as_echo_n "(cached) " >&6
37051else
37052  if test -n "$AR"; then
37053  ac_cv_prog_AR="$AR" # Let the user override the test.
37054else
37055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37056for as_dir in $PATH
37057do
37058  IFS=$as_save_IFS
37059  test -z "$as_dir" && as_dir=.
37060    for ac_exec_ext in '' $ac_executable_extensions; do
37061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37062    ac_cv_prog_AR="lib"
37063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37064    break 2
37065  fi
37066done
37067  done
37068IFS=$as_save_IFS
37069
37070fi
37071fi
37072AR=$ac_cv_prog_AR
37073if test -n "$AR"; then
37074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37075$as_echo "$AR" >&6; }
37076else
37077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37078$as_echo "no" >&6; }
37079fi
37080
37081
37082  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37083
37084
37085  # Publish this variable in the help.
37086
37087
37088  if [ -z "${AR+x}" ]; then
37089    # The variable is not set by user, try to locate tool using the code snippet
37090    if test -n "$ac_tool_prefix"; then
37091  for ac_prog in ar gcc-ar
37092  do
37093    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37094set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37096$as_echo_n "checking for $ac_word... " >&6; }
37097if ${ac_cv_prog_AR+:} false; then :
37098  $as_echo_n "(cached) " >&6
37099else
37100  if test -n "$AR"; then
37101  ac_cv_prog_AR="$AR" # Let the user override the test.
37102else
37103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37104for as_dir in $PATH
37105do
37106  IFS=$as_save_IFS
37107  test -z "$as_dir" && as_dir=.
37108    for ac_exec_ext in '' $ac_executable_extensions; do
37109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37110    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37112    break 2
37113  fi
37114done
37115  done
37116IFS=$as_save_IFS
37117
37118fi
37119fi
37120AR=$ac_cv_prog_AR
37121if test -n "$AR"; then
37122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37123$as_echo "$AR" >&6; }
37124else
37125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37126$as_echo "no" >&6; }
37127fi
37128
37129
37130    test -n "$AR" && break
37131  done
37132fi
37133if test -z "$AR"; then
37134  ac_ct_AR=$AR
37135  for ac_prog in ar gcc-ar
37136do
37137  # Extract the first word of "$ac_prog", so it can be a program name with args.
37138set dummy $ac_prog; ac_word=$2
37139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37140$as_echo_n "checking for $ac_word... " >&6; }
37141if ${ac_cv_prog_ac_ct_AR+:} false; then :
37142  $as_echo_n "(cached) " >&6
37143else
37144  if test -n "$ac_ct_AR"; then
37145  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37146else
37147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37148for as_dir in $PATH
37149do
37150  IFS=$as_save_IFS
37151  test -z "$as_dir" && as_dir=.
37152    for ac_exec_ext in '' $ac_executable_extensions; do
37153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37154    ac_cv_prog_ac_ct_AR="$ac_prog"
37155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37156    break 2
37157  fi
37158done
37159  done
37160IFS=$as_save_IFS
37161
37162fi
37163fi
37164ac_ct_AR=$ac_cv_prog_ac_ct_AR
37165if test -n "$ac_ct_AR"; then
37166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37167$as_echo "$ac_ct_AR" >&6; }
37168else
37169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37170$as_echo "no" >&6; }
37171fi
37172
37173
37174  test -n "$ac_ct_AR" && break
37175done
37176
37177  if test "x$ac_ct_AR" = x; then
37178    AR=""
37179  else
37180    case $cross_compiling:$ac_tool_warned in
37181yes:)
37182{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37183$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37184ac_tool_warned=yes ;;
37185esac
37186    AR=$ac_ct_AR
37187  fi
37188fi
37189
37190  else
37191    # The variable is set, but is it from the command line or the environment?
37192
37193    # Try to remove the string !AR! from our list.
37194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37196      # If it failed, the variable was not from the command line. Ignore it,
37197      # but warn the user (except for BASH, which is always set by the calling BASH).
37198      if test "xAR" != xBASH; then
37199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37200$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37201      fi
37202      # Try to locate tool using the code snippet
37203      if test -n "$ac_tool_prefix"; then
37204  for ac_prog in ar gcc-ar
37205  do
37206    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37207set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37209$as_echo_n "checking for $ac_word... " >&6; }
37210if ${ac_cv_prog_AR+:} false; then :
37211  $as_echo_n "(cached) " >&6
37212else
37213  if test -n "$AR"; then
37214  ac_cv_prog_AR="$AR" # Let the user override the test.
37215else
37216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37217for as_dir in $PATH
37218do
37219  IFS=$as_save_IFS
37220  test -z "$as_dir" && as_dir=.
37221    for ac_exec_ext in '' $ac_executable_extensions; do
37222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37223    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37225    break 2
37226  fi
37227done
37228  done
37229IFS=$as_save_IFS
37230
37231fi
37232fi
37233AR=$ac_cv_prog_AR
37234if test -n "$AR"; then
37235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37236$as_echo "$AR" >&6; }
37237else
37238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37239$as_echo "no" >&6; }
37240fi
37241
37242
37243    test -n "$AR" && break
37244  done
37245fi
37246if test -z "$AR"; then
37247  ac_ct_AR=$AR
37248  for ac_prog in ar gcc-ar
37249do
37250  # Extract the first word of "$ac_prog", so it can be a program name with args.
37251set dummy $ac_prog; ac_word=$2
37252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37253$as_echo_n "checking for $ac_word... " >&6; }
37254if ${ac_cv_prog_ac_ct_AR+:} false; then :
37255  $as_echo_n "(cached) " >&6
37256else
37257  if test -n "$ac_ct_AR"; then
37258  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37259else
37260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37261for as_dir in $PATH
37262do
37263  IFS=$as_save_IFS
37264  test -z "$as_dir" && as_dir=.
37265    for ac_exec_ext in '' $ac_executable_extensions; do
37266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37267    ac_cv_prog_ac_ct_AR="$ac_prog"
37268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37269    break 2
37270  fi
37271done
37272  done
37273IFS=$as_save_IFS
37274
37275fi
37276fi
37277ac_ct_AR=$ac_cv_prog_ac_ct_AR
37278if test -n "$ac_ct_AR"; then
37279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37280$as_echo "$ac_ct_AR" >&6; }
37281else
37282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37283$as_echo "no" >&6; }
37284fi
37285
37286
37287  test -n "$ac_ct_AR" && break
37288done
37289
37290  if test "x$ac_ct_AR" = x; then
37291    AR=""
37292  else
37293    case $cross_compiling:$ac_tool_warned in
37294yes:)
37295{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37296$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37297ac_tool_warned=yes ;;
37298esac
37299    AR=$ac_ct_AR
37300  fi
37301fi
37302
37303    else
37304      # If it succeeded, then it was overridden by the user. We will use it
37305      # for the tool.
37306
37307      # First remove it from the list of overridden variables, so we can test
37308      # for unknown variables in the end.
37309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37310
37311      # Check if we try to supply an empty value
37312      if test "x$AR" = x; then
37313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37314$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37316$as_echo_n "checking for AR... " >&6; }
37317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37318$as_echo "disabled" >&6; }
37319      else
37320        # Check if the provided tool contains a complete path.
37321        tool_specified="$AR"
37322        tool_basename="${tool_specified##*/}"
37323        if test "x$tool_basename" = "x$tool_specified"; then
37324          # A command without a complete path is provided, search $PATH.
37325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37326$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37327          # Extract the first word of "$tool_basename", so it can be a program name with args.
37328set dummy $tool_basename; ac_word=$2
37329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37330$as_echo_n "checking for $ac_word... " >&6; }
37331if ${ac_cv_path_AR+:} false; then :
37332  $as_echo_n "(cached) " >&6
37333else
37334  case $AR in
37335  [\\/]* | ?:[\\/]*)
37336  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37337  ;;
37338  *)
37339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37340for as_dir in $PATH
37341do
37342  IFS=$as_save_IFS
37343  test -z "$as_dir" && as_dir=.
37344    for ac_exec_ext in '' $ac_executable_extensions; do
37345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37346    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37348    break 2
37349  fi
37350done
37351  done
37352IFS=$as_save_IFS
37353
37354  ;;
37355esac
37356fi
37357AR=$ac_cv_path_AR
37358if test -n "$AR"; then
37359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37360$as_echo "$AR" >&6; }
37361else
37362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37363$as_echo "no" >&6; }
37364fi
37365
37366
37367          if test "x$AR" = x; then
37368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37369          fi
37370        else
37371          # Otherwise we believe it is a complete path. Use it as it is.
37372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37373$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37375$as_echo_n "checking for AR... " >&6; }
37376          if test ! -x "$tool_specified"; then
37377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37378$as_echo "not found" >&6; }
37379            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37380          fi
37381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37382$as_echo "$tool_specified" >&6; }
37383        fi
37384      fi
37385    fi
37386
37387  fi
37388
37389
37390  else
37391
37392
37393  # Publish this variable in the help.
37394
37395
37396  if [ -z "${AR+x}" ]; then
37397    # The variable is not set by user, try to locate tool using the code snippet
37398    if test -n "$ac_tool_prefix"; then
37399  for ac_prog in ar
37400  do
37401    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37402set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37404$as_echo_n "checking for $ac_word... " >&6; }
37405if ${ac_cv_prog_AR+:} false; then :
37406  $as_echo_n "(cached) " >&6
37407else
37408  if test -n "$AR"; then
37409  ac_cv_prog_AR="$AR" # Let the user override the test.
37410else
37411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37412for as_dir in $PATH
37413do
37414  IFS=$as_save_IFS
37415  test -z "$as_dir" && as_dir=.
37416    for ac_exec_ext in '' $ac_executable_extensions; do
37417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37418    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37420    break 2
37421  fi
37422done
37423  done
37424IFS=$as_save_IFS
37425
37426fi
37427fi
37428AR=$ac_cv_prog_AR
37429if test -n "$AR"; then
37430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37431$as_echo "$AR" >&6; }
37432else
37433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37434$as_echo "no" >&6; }
37435fi
37436
37437
37438    test -n "$AR" && break
37439  done
37440fi
37441if test -z "$AR"; then
37442  ac_ct_AR=$AR
37443  for ac_prog in ar
37444do
37445  # Extract the first word of "$ac_prog", so it can be a program name with args.
37446set dummy $ac_prog; ac_word=$2
37447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37448$as_echo_n "checking for $ac_word... " >&6; }
37449if ${ac_cv_prog_ac_ct_AR+:} false; then :
37450  $as_echo_n "(cached) " >&6
37451else
37452  if test -n "$ac_ct_AR"; then
37453  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37454else
37455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37456for as_dir in $PATH
37457do
37458  IFS=$as_save_IFS
37459  test -z "$as_dir" && as_dir=.
37460    for ac_exec_ext in '' $ac_executable_extensions; do
37461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37462    ac_cv_prog_ac_ct_AR="$ac_prog"
37463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37464    break 2
37465  fi
37466done
37467  done
37468IFS=$as_save_IFS
37469
37470fi
37471fi
37472ac_ct_AR=$ac_cv_prog_ac_ct_AR
37473if test -n "$ac_ct_AR"; then
37474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37475$as_echo "$ac_ct_AR" >&6; }
37476else
37477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37478$as_echo "no" >&6; }
37479fi
37480
37481
37482  test -n "$ac_ct_AR" && break
37483done
37484
37485  if test "x$ac_ct_AR" = x; then
37486    AR=""
37487  else
37488    case $cross_compiling:$ac_tool_warned in
37489yes:)
37490{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37491$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37492ac_tool_warned=yes ;;
37493esac
37494    AR=$ac_ct_AR
37495  fi
37496fi
37497
37498  else
37499    # The variable is set, but is it from the command line or the environment?
37500
37501    # Try to remove the string !AR! from our list.
37502    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37503    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37504      # If it failed, the variable was not from the command line. Ignore it,
37505      # but warn the user (except for BASH, which is always set by the calling BASH).
37506      if test "xAR" != xBASH; then
37507        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37508$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37509      fi
37510      # Try to locate tool using the code snippet
37511      if test -n "$ac_tool_prefix"; then
37512  for ac_prog in ar
37513  do
37514    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37515set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37517$as_echo_n "checking for $ac_word... " >&6; }
37518if ${ac_cv_prog_AR+:} false; then :
37519  $as_echo_n "(cached) " >&6
37520else
37521  if test -n "$AR"; then
37522  ac_cv_prog_AR="$AR" # Let the user override the test.
37523else
37524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37525for as_dir in $PATH
37526do
37527  IFS=$as_save_IFS
37528  test -z "$as_dir" && as_dir=.
37529    for ac_exec_ext in '' $ac_executable_extensions; do
37530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37531    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37533    break 2
37534  fi
37535done
37536  done
37537IFS=$as_save_IFS
37538
37539fi
37540fi
37541AR=$ac_cv_prog_AR
37542if test -n "$AR"; then
37543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37544$as_echo "$AR" >&6; }
37545else
37546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37547$as_echo "no" >&6; }
37548fi
37549
37550
37551    test -n "$AR" && break
37552  done
37553fi
37554if test -z "$AR"; then
37555  ac_ct_AR=$AR
37556  for ac_prog in ar
37557do
37558  # Extract the first word of "$ac_prog", so it can be a program name with args.
37559set dummy $ac_prog; ac_word=$2
37560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37561$as_echo_n "checking for $ac_word... " >&6; }
37562if ${ac_cv_prog_ac_ct_AR+:} false; then :
37563  $as_echo_n "(cached) " >&6
37564else
37565  if test -n "$ac_ct_AR"; then
37566  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37567else
37568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37569for as_dir in $PATH
37570do
37571  IFS=$as_save_IFS
37572  test -z "$as_dir" && as_dir=.
37573    for ac_exec_ext in '' $ac_executable_extensions; do
37574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37575    ac_cv_prog_ac_ct_AR="$ac_prog"
37576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37577    break 2
37578  fi
37579done
37580  done
37581IFS=$as_save_IFS
37582
37583fi
37584fi
37585ac_ct_AR=$ac_cv_prog_ac_ct_AR
37586if test -n "$ac_ct_AR"; then
37587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37588$as_echo "$ac_ct_AR" >&6; }
37589else
37590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37591$as_echo "no" >&6; }
37592fi
37593
37594
37595  test -n "$ac_ct_AR" && break
37596done
37597
37598  if test "x$ac_ct_AR" = x; then
37599    AR=""
37600  else
37601    case $cross_compiling:$ac_tool_warned in
37602yes:)
37603{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37604$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37605ac_tool_warned=yes ;;
37606esac
37607    AR=$ac_ct_AR
37608  fi
37609fi
37610
37611    else
37612      # If it succeeded, then it was overridden by the user. We will use it
37613      # for the tool.
37614
37615      # First remove it from the list of overridden variables, so we can test
37616      # for unknown variables in the end.
37617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37618
37619      # Check if we try to supply an empty value
37620      if test "x$AR" = x; then
37621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37622$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37624$as_echo_n "checking for AR... " >&6; }
37625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37626$as_echo "disabled" >&6; }
37627      else
37628        # Check if the provided tool contains a complete path.
37629        tool_specified="$AR"
37630        tool_basename="${tool_specified##*/}"
37631        if test "x$tool_basename" = "x$tool_specified"; then
37632          # A command without a complete path is provided, search $PATH.
37633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37634$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37635          # Extract the first word of "$tool_basename", so it can be a program name with args.
37636set dummy $tool_basename; ac_word=$2
37637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37638$as_echo_n "checking for $ac_word... " >&6; }
37639if ${ac_cv_path_AR+:} false; then :
37640  $as_echo_n "(cached) " >&6
37641else
37642  case $AR in
37643  [\\/]* | ?:[\\/]*)
37644  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37645  ;;
37646  *)
37647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37648for as_dir in $PATH
37649do
37650  IFS=$as_save_IFS
37651  test -z "$as_dir" && as_dir=.
37652    for ac_exec_ext in '' $ac_executable_extensions; do
37653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37654    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37656    break 2
37657  fi
37658done
37659  done
37660IFS=$as_save_IFS
37661
37662  ;;
37663esac
37664fi
37665AR=$ac_cv_path_AR
37666if test -n "$AR"; then
37667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37668$as_echo "$AR" >&6; }
37669else
37670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37671$as_echo "no" >&6; }
37672fi
37673
37674
37675          if test "x$AR" = x; then
37676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37677          fi
37678        else
37679          # Otherwise we believe it is a complete path. Use it as it is.
37680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37681$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37683$as_echo_n "checking for AR... " >&6; }
37684          if test ! -x "$tool_specified"; then
37685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37686$as_echo "not found" >&6; }
37687            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37688          fi
37689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37690$as_echo "$tool_specified" >&6; }
37691        fi
37692      fi
37693    fi
37694
37695  fi
37696
37697
37698  fi
37699
37700  # Only process if variable expands to non-empty
37701
37702  if test "x$AR" != x; then
37703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37704
37705  # First separate the path from the arguments. This will split at the first
37706  # space.
37707  complete="$AR"
37708  path="${complete%% *}"
37709  tmp="$complete EOL"
37710  arguments="${tmp#* }"
37711
37712  # Input might be given as Windows format, start by converting to
37713  # unix format.
37714  new_path=`$CYGPATH -u "$path"`
37715
37716  # Now try to locate executable using which
37717  new_path=`$WHICH "$new_path" 2> /dev/null`
37718  # bat and cmd files are not always considered executable in cygwin causing which
37719  # to not find them
37720  if test "x$new_path" = x \
37721      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37722      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37723    new_path=`$CYGPATH -u "$path"`
37724  fi
37725  if test "x$new_path" = x; then
37726    # Oops. Which didn't find the executable.
37727    # The splitting of arguments from the executable at a space might have been incorrect,
37728    # since paths with space are more likely in Windows. Give it another try with the whole
37729    # argument.
37730    path="$complete"
37731    arguments="EOL"
37732    new_path=`$CYGPATH -u "$path"`
37733    new_path=`$WHICH "$new_path" 2> /dev/null`
37734    # bat and cmd files are not always considered executable in cygwin causing which
37735    # to not find them
37736    if test "x$new_path" = x \
37737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37739      new_path=`$CYGPATH -u "$path"`
37740    fi
37741    if test "x$new_path" = x; then
37742      # It's still not found. Now this is an unrecoverable error.
37743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37744$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37745      has_space=`$ECHO "$complete" | $GREP " "`
37746      if test "x$has_space" != x; then
37747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37749      fi
37750      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37751    fi
37752  fi
37753
37754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37757  # "foo.exe" is OK but "foo" is an error.
37758  #
37759  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37760  # It is also a way to make sure we got the proper file name for the real test later on.
37761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37762  if test "x$test_shortpath" = x; then
37763    # Short path failed, file does not exist as specified.
37764    # Try adding .exe or .cmd
37765    if test -f "${new_path}.exe"; then
37766      input_to_shortpath="${new_path}.exe"
37767    elif test -f "${new_path}.cmd"; then
37768      input_to_shortpath="${new_path}.cmd"
37769    else
37770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37771$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37772      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37773$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37774      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37775    fi
37776  else
37777    input_to_shortpath="$new_path"
37778  fi
37779
37780  # Call helper function which possibly converts this using DOS-style short mode.
37781  # If so, the updated path is stored in $new_path.
37782  new_path="$input_to_shortpath"
37783
37784  input_path="$input_to_shortpath"
37785  # Check if we need to convert this using DOS-style short mode. If the path
37786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37787  # take no chances and rewrite it.
37788  # Note: m4 eats our [], so we need to use [ and ] instead.
37789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37790  if test "x$has_forbidden_chars" != x; then
37791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37795      # Going to short mode and back again did indeed matter. Since short mode is
37796      # case insensitive, let's make it lowercase to improve readability.
37797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37798      # Now convert it back to Unix-style (cygpath)
37799      input_path=`$CYGPATH -u "$shortmode_path"`
37800      new_path="$input_path"
37801    fi
37802  fi
37803
37804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37805  if test "x$test_cygdrive_prefix" = x; then
37806    # As a simple fix, exclude /usr/bin since it's not a real path.
37807    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37809      # a path prefixed by /cygdrive for fixpath to work.
37810      new_path="$CYGWIN_ROOT_PATH$input_path"
37811    fi
37812  fi
37813
37814  # remove trailing .exe if any
37815  new_path="${new_path/%.exe/}"
37816
37817    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37818
37819  # First separate the path from the arguments. This will split at the first
37820  # space.
37821  complete="$AR"
37822  path="${complete%% *}"
37823  tmp="$complete EOL"
37824  arguments="${tmp#* }"
37825
37826  # Input might be given as Windows format, start by converting to
37827  # unix format.
37828  new_path="$path"
37829
37830  windows_path="$new_path"
37831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37832    unix_path=`$CYGPATH -u "$windows_path"`
37833    new_path="$unix_path"
37834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37836    new_path="$unix_path"
37837  fi
37838
37839
37840  # Now try to locate executable using which
37841  new_path=`$WHICH "$new_path" 2> /dev/null`
37842
37843  if test "x$new_path" = x; then
37844    # Oops. Which didn't find the executable.
37845    # The splitting of arguments from the executable at a space might have been incorrect,
37846    # since paths with space are more likely in Windows. Give it another try with the whole
37847    # argument.
37848    path="$complete"
37849    arguments="EOL"
37850    new_path="$path"
37851
37852  windows_path="$new_path"
37853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37854    unix_path=`$CYGPATH -u "$windows_path"`
37855    new_path="$unix_path"
37856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37858    new_path="$unix_path"
37859  fi
37860
37861
37862    new_path=`$WHICH "$new_path" 2> /dev/null`
37863    # bat and cmd files are not always considered executable in MSYS causing which
37864    # to not find them
37865    if test "x$new_path" = x \
37866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37868      new_path="$path"
37869
37870  windows_path="$new_path"
37871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37872    unix_path=`$CYGPATH -u "$windows_path"`
37873    new_path="$unix_path"
37874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37876    new_path="$unix_path"
37877  fi
37878
37879    fi
37880
37881    if test "x$new_path" = x; then
37882      # It's still not found. Now this is an unrecoverable error.
37883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37884$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37885      has_space=`$ECHO "$complete" | $GREP " "`
37886      if test "x$has_space" != x; then
37887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37889      fi
37890      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37891    fi
37892  fi
37893
37894  # Now new_path has a complete unix path to the binary
37895  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37896    # Keep paths in /bin as-is, but remove trailing .exe if any
37897    new_path="${new_path/%.exe/}"
37898    # Do not save /bin paths to all_fixpath_prefixes!
37899  else
37900    # Not in mixed or Windows style, start by that.
37901    new_path=`cmd //c echo $new_path`
37902
37903  input_path="$new_path"
37904  # Check if we need to convert this using DOS-style short mode. If the path
37905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37906  # take no chances and rewrite it.
37907  # Note: m4 eats our [], so we need to use [ and ] instead.
37908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37909  if test "x$has_forbidden_chars" != x; then
37910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37912  fi
37913
37914    # Output is in $new_path
37915
37916  windows_path="$new_path"
37917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37918    unix_path=`$CYGPATH -u "$windows_path"`
37919    new_path="$unix_path"
37920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37922    new_path="$unix_path"
37923  fi
37924
37925    # remove trailing .exe if any
37926    new_path="${new_path/%.exe/}"
37927
37928    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37929    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37930  fi
37931
37932    else
37933      # We're on a unix platform. Hooray! :)
37934      # First separate the path from the arguments. This will split at the first
37935      # space.
37936      complete="$AR"
37937      path="${complete%% *}"
37938      tmp="$complete EOL"
37939      arguments="${tmp#* }"
37940
37941      # Cannot rely on the command "which" here since it doesn't always work.
37942      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37943      if test -z "$is_absolute_path"; then
37944        # Path to executable is not absolute. Find it.
37945        IFS_save="$IFS"
37946        IFS=:
37947        for p in $PATH; do
37948          if test -f "$p/$path" && test -x "$p/$path"; then
37949            new_path="$p/$path"
37950            break
37951          fi
37952        done
37953        IFS="$IFS_save"
37954      else
37955        # This is an absolute path, we can use it without further modifications.
37956        new_path="$path"
37957      fi
37958
37959      if test "x$new_path" = x; then
37960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37961$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37962        has_space=`$ECHO "$complete" | $GREP " "`
37963        if test "x$has_space" != x; then
37964          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37965$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37966        fi
37967        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37968      fi
37969    fi
37970
37971    # Now join together the path and the arguments once again
37972    if test "x$arguments" != xEOL; then
37973      new_complete="$new_path ${arguments% *}"
37974    else
37975      new_complete="$new_path"
37976    fi
37977
37978    if test "x$complete" != "x$new_complete"; then
37979      AR="$new_complete"
37980      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37981$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37982    fi
37983  fi
37984
37985
37986
37987  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37988
37989
37990  # Publish this variable in the help.
37991
37992
37993  if [ -z "${LIPO+x}" ]; then
37994    # The variable is not set by user, try to locate tool using the code snippet
37995    for ac_prog in lipo
37996do
37997  # Extract the first word of "$ac_prog", so it can be a program name with args.
37998set dummy $ac_prog; ac_word=$2
37999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38000$as_echo_n "checking for $ac_word... " >&6; }
38001if ${ac_cv_path_LIPO+:} false; then :
38002  $as_echo_n "(cached) " >&6
38003else
38004  case $LIPO in
38005  [\\/]* | ?:[\\/]*)
38006  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38007  ;;
38008  *)
38009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38010for as_dir in $PATH
38011do
38012  IFS=$as_save_IFS
38013  test -z "$as_dir" && as_dir=.
38014    for ac_exec_ext in '' $ac_executable_extensions; do
38015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38016    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38018    break 2
38019  fi
38020done
38021  done
38022IFS=$as_save_IFS
38023
38024  ;;
38025esac
38026fi
38027LIPO=$ac_cv_path_LIPO
38028if test -n "$LIPO"; then
38029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38030$as_echo "$LIPO" >&6; }
38031else
38032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38033$as_echo "no" >&6; }
38034fi
38035
38036
38037  test -n "$LIPO" && break
38038done
38039
38040  else
38041    # The variable is set, but is it from the command line or the environment?
38042
38043    # Try to remove the string !LIPO! from our list.
38044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38046      # If it failed, the variable was not from the command line. Ignore it,
38047      # but warn the user (except for BASH, which is always set by the calling BASH).
38048      if test "xLIPO" != xBASH; then
38049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38050$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38051      fi
38052      # Try to locate tool using the code snippet
38053      for ac_prog in lipo
38054do
38055  # Extract the first word of "$ac_prog", so it can be a program name with args.
38056set dummy $ac_prog; ac_word=$2
38057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38058$as_echo_n "checking for $ac_word... " >&6; }
38059if ${ac_cv_path_LIPO+:} false; then :
38060  $as_echo_n "(cached) " >&6
38061else
38062  case $LIPO in
38063  [\\/]* | ?:[\\/]*)
38064  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38065  ;;
38066  *)
38067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38068for as_dir in $PATH
38069do
38070  IFS=$as_save_IFS
38071  test -z "$as_dir" && as_dir=.
38072    for ac_exec_ext in '' $ac_executable_extensions; do
38073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38074    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38076    break 2
38077  fi
38078done
38079  done
38080IFS=$as_save_IFS
38081
38082  ;;
38083esac
38084fi
38085LIPO=$ac_cv_path_LIPO
38086if test -n "$LIPO"; then
38087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38088$as_echo "$LIPO" >&6; }
38089else
38090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38091$as_echo "no" >&6; }
38092fi
38093
38094
38095  test -n "$LIPO" && break
38096done
38097
38098    else
38099      # If it succeeded, then it was overridden by the user. We will use it
38100      # for the tool.
38101
38102      # First remove it from the list of overridden variables, so we can test
38103      # for unknown variables in the end.
38104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38105
38106      # Check if we try to supply an empty value
38107      if test "x$LIPO" = x; then
38108        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38109$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38111$as_echo_n "checking for LIPO... " >&6; }
38112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38113$as_echo "disabled" >&6; }
38114      else
38115        # Check if the provided tool contains a complete path.
38116        tool_specified="$LIPO"
38117        tool_basename="${tool_specified##*/}"
38118        if test "x$tool_basename" = "x$tool_specified"; then
38119          # A command without a complete path is provided, search $PATH.
38120          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38121$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38122          # Extract the first word of "$tool_basename", so it can be a program name with args.
38123set dummy $tool_basename; ac_word=$2
38124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38125$as_echo_n "checking for $ac_word... " >&6; }
38126if ${ac_cv_path_LIPO+:} false; then :
38127  $as_echo_n "(cached) " >&6
38128else
38129  case $LIPO in
38130  [\\/]* | ?:[\\/]*)
38131  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38132  ;;
38133  *)
38134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38135for as_dir in $PATH
38136do
38137  IFS=$as_save_IFS
38138  test -z "$as_dir" && as_dir=.
38139    for ac_exec_ext in '' $ac_executable_extensions; do
38140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38141    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38143    break 2
38144  fi
38145done
38146  done
38147IFS=$as_save_IFS
38148
38149  ;;
38150esac
38151fi
38152LIPO=$ac_cv_path_LIPO
38153if test -n "$LIPO"; then
38154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38155$as_echo "$LIPO" >&6; }
38156else
38157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38158$as_echo "no" >&6; }
38159fi
38160
38161
38162          if test "x$LIPO" = x; then
38163            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38164          fi
38165        else
38166          # Otherwise we believe it is a complete path. Use it as it is.
38167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38168$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38169          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38170$as_echo_n "checking for LIPO... " >&6; }
38171          if test ! -x "$tool_specified"; then
38172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38173$as_echo "not found" >&6; }
38174            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38175          fi
38176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38177$as_echo "$tool_specified" >&6; }
38178        fi
38179      fi
38180    fi
38181
38182  fi
38183
38184
38185
38186  # Only process if variable expands to non-empty
38187
38188  if test "x$LIPO" != x; then
38189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38190
38191  # First separate the path from the arguments. This will split at the first
38192  # space.
38193  complete="$LIPO"
38194  path="${complete%% *}"
38195  tmp="$complete EOL"
38196  arguments="${tmp#* }"
38197
38198  # Input might be given as Windows format, start by converting to
38199  # unix format.
38200  new_path=`$CYGPATH -u "$path"`
38201
38202  # Now try to locate executable using which
38203  new_path=`$WHICH "$new_path" 2> /dev/null`
38204  # bat and cmd files are not always considered executable in cygwin causing which
38205  # to not find them
38206  if test "x$new_path" = x \
38207      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38208      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38209    new_path=`$CYGPATH -u "$path"`
38210  fi
38211  if test "x$new_path" = x; then
38212    # Oops. Which didn't find the executable.
38213    # The splitting of arguments from the executable at a space might have been incorrect,
38214    # since paths with space are more likely in Windows. Give it another try with the whole
38215    # argument.
38216    path="$complete"
38217    arguments="EOL"
38218    new_path=`$CYGPATH -u "$path"`
38219    new_path=`$WHICH "$new_path" 2> /dev/null`
38220    # bat and cmd files are not always considered executable in cygwin causing which
38221    # to not find them
38222    if test "x$new_path" = x \
38223        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38224        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38225      new_path=`$CYGPATH -u "$path"`
38226    fi
38227    if test "x$new_path" = x; then
38228      # It's still not found. Now this is an unrecoverable error.
38229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38230$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38231      has_space=`$ECHO "$complete" | $GREP " "`
38232      if test "x$has_space" != x; then
38233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38235      fi
38236      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38237    fi
38238  fi
38239
38240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38243  # "foo.exe" is OK but "foo" is an error.
38244  #
38245  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38246  # It is also a way to make sure we got the proper file name for the real test later on.
38247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38248  if test "x$test_shortpath" = x; then
38249    # Short path failed, file does not exist as specified.
38250    # Try adding .exe or .cmd
38251    if test -f "${new_path}.exe"; then
38252      input_to_shortpath="${new_path}.exe"
38253    elif test -f "${new_path}.cmd"; then
38254      input_to_shortpath="${new_path}.cmd"
38255    else
38256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38257$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38258      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38259$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38260      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38261    fi
38262  else
38263    input_to_shortpath="$new_path"
38264  fi
38265
38266  # Call helper function which possibly converts this using DOS-style short mode.
38267  # If so, the updated path is stored in $new_path.
38268  new_path="$input_to_shortpath"
38269
38270  input_path="$input_to_shortpath"
38271  # Check if we need to convert this using DOS-style short mode. If the path
38272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38273  # take no chances and rewrite it.
38274  # Note: m4 eats our [], so we need to use [ and ] instead.
38275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38276  if test "x$has_forbidden_chars" != x; then
38277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38281      # Going to short mode and back again did indeed matter. Since short mode is
38282      # case insensitive, let's make it lowercase to improve readability.
38283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38284      # Now convert it back to Unix-style (cygpath)
38285      input_path=`$CYGPATH -u "$shortmode_path"`
38286      new_path="$input_path"
38287    fi
38288  fi
38289
38290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38291  if test "x$test_cygdrive_prefix" = x; then
38292    # As a simple fix, exclude /usr/bin since it's not a real path.
38293    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38295      # a path prefixed by /cygdrive for fixpath to work.
38296      new_path="$CYGWIN_ROOT_PATH$input_path"
38297    fi
38298  fi
38299
38300  # remove trailing .exe if any
38301  new_path="${new_path/%.exe/}"
38302
38303    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38304
38305  # First separate the path from the arguments. This will split at the first
38306  # space.
38307  complete="$LIPO"
38308  path="${complete%% *}"
38309  tmp="$complete EOL"
38310  arguments="${tmp#* }"
38311
38312  # Input might be given as Windows format, start by converting to
38313  # unix format.
38314  new_path="$path"
38315
38316  windows_path="$new_path"
38317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38318    unix_path=`$CYGPATH -u "$windows_path"`
38319    new_path="$unix_path"
38320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38322    new_path="$unix_path"
38323  fi
38324
38325
38326  # Now try to locate executable using which
38327  new_path=`$WHICH "$new_path" 2> /dev/null`
38328
38329  if test "x$new_path" = x; then
38330    # Oops. Which didn't find the executable.
38331    # The splitting of arguments from the executable at a space might have been incorrect,
38332    # since paths with space are more likely in Windows. Give it another try with the whole
38333    # argument.
38334    path="$complete"
38335    arguments="EOL"
38336    new_path="$path"
38337
38338  windows_path="$new_path"
38339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38340    unix_path=`$CYGPATH -u "$windows_path"`
38341    new_path="$unix_path"
38342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38344    new_path="$unix_path"
38345  fi
38346
38347
38348    new_path=`$WHICH "$new_path" 2> /dev/null`
38349    # bat and cmd files are not always considered executable in MSYS causing which
38350    # to not find them
38351    if test "x$new_path" = x \
38352        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38353        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38354      new_path="$path"
38355
38356  windows_path="$new_path"
38357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38358    unix_path=`$CYGPATH -u "$windows_path"`
38359    new_path="$unix_path"
38360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38362    new_path="$unix_path"
38363  fi
38364
38365    fi
38366
38367    if test "x$new_path" = x; then
38368      # It's still not found. Now this is an unrecoverable error.
38369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38370$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38371      has_space=`$ECHO "$complete" | $GREP " "`
38372      if test "x$has_space" != x; then
38373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38375      fi
38376      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38377    fi
38378  fi
38379
38380  # Now new_path has a complete unix path to the binary
38381  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38382    # Keep paths in /bin as-is, but remove trailing .exe if any
38383    new_path="${new_path/%.exe/}"
38384    # Do not save /bin paths to all_fixpath_prefixes!
38385  else
38386    # Not in mixed or Windows style, start by that.
38387    new_path=`cmd //c echo $new_path`
38388
38389  input_path="$new_path"
38390  # Check if we need to convert this using DOS-style short mode. If the path
38391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38392  # take no chances and rewrite it.
38393  # Note: m4 eats our [], so we need to use [ and ] instead.
38394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38395  if test "x$has_forbidden_chars" != x; then
38396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38398  fi
38399
38400    # Output is in $new_path
38401
38402  windows_path="$new_path"
38403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38404    unix_path=`$CYGPATH -u "$windows_path"`
38405    new_path="$unix_path"
38406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38408    new_path="$unix_path"
38409  fi
38410
38411    # remove trailing .exe if any
38412    new_path="${new_path/%.exe/}"
38413
38414    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38415    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38416  fi
38417
38418    else
38419      # We're on a unix platform. Hooray! :)
38420      # First separate the path from the arguments. This will split at the first
38421      # space.
38422      complete="$LIPO"
38423      path="${complete%% *}"
38424      tmp="$complete EOL"
38425      arguments="${tmp#* }"
38426
38427      # Cannot rely on the command "which" here since it doesn't always work.
38428      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38429      if test -z "$is_absolute_path"; then
38430        # Path to executable is not absolute. Find it.
38431        IFS_save="$IFS"
38432        IFS=:
38433        for p in $PATH; do
38434          if test -f "$p/$path" && test -x "$p/$path"; then
38435            new_path="$p/$path"
38436            break
38437          fi
38438        done
38439        IFS="$IFS_save"
38440      else
38441        # This is an absolute path, we can use it without further modifications.
38442        new_path="$path"
38443      fi
38444
38445      if test "x$new_path" = x; then
38446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38447$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38448        has_space=`$ECHO "$complete" | $GREP " "`
38449        if test "x$has_space" != x; then
38450          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38451$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38452        fi
38453        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38454      fi
38455    fi
38456
38457    # Now join together the path and the arguments once again
38458    if test "x$arguments" != xEOL; then
38459      new_complete="$new_path ${arguments% *}"
38460    else
38461      new_complete="$new_path"
38462    fi
38463
38464    if test "x$complete" != "x$new_complete"; then
38465      LIPO="$new_complete"
38466      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38467$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38468    fi
38469  fi
38470
38471  fi
38472
38473  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38474    # Extract the first word of "mt", so it can be a program name with args.
38475set dummy mt; ac_word=$2
38476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38477$as_echo_n "checking for $ac_word... " >&6; }
38478if ${ac_cv_prog_MT+:} false; then :
38479  $as_echo_n "(cached) " >&6
38480else
38481  if test -n "$MT"; then
38482  ac_cv_prog_MT="$MT" # Let the user override the test.
38483else
38484  ac_prog_rejected=no
38485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38486for as_dir in $PATH
38487do
38488  IFS=$as_save_IFS
38489  test -z "$as_dir" && as_dir=.
38490    for ac_exec_ext in '' $ac_executable_extensions; do
38491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38492    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38493       ac_prog_rejected=yes
38494       continue
38495     fi
38496    ac_cv_prog_MT="mt"
38497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38498    break 2
38499  fi
38500done
38501  done
38502IFS=$as_save_IFS
38503
38504if test $ac_prog_rejected = yes; then
38505  # We found a bogon in the path, so make sure we never use it.
38506  set dummy $ac_cv_prog_MT
38507  shift
38508  if test $# != 0; then
38509    # We chose a different compiler from the bogus one.
38510    # However, it has the same basename, so the bogon will be chosen
38511    # first if we set MT to just the basename; use the full file name.
38512    shift
38513    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38514  fi
38515fi
38516fi
38517fi
38518MT=$ac_cv_prog_MT
38519if test -n "$MT"; then
38520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38521$as_echo "$MT" >&6; }
38522else
38523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38524$as_echo "no" >&6; }
38525fi
38526
38527
38528
38529  # Only process if variable expands to non-empty
38530
38531  if test "x$MT" != x; then
38532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38533
38534  # First separate the path from the arguments. This will split at the first
38535  # space.
38536  complete="$MT"
38537  path="${complete%% *}"
38538  tmp="$complete EOL"
38539  arguments="${tmp#* }"
38540
38541  # Input might be given as Windows format, start by converting to
38542  # unix format.
38543  new_path=`$CYGPATH -u "$path"`
38544
38545  # Now try to locate executable using which
38546  new_path=`$WHICH "$new_path" 2> /dev/null`
38547  # bat and cmd files are not always considered executable in cygwin causing which
38548  # to not find them
38549  if test "x$new_path" = x \
38550      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38551      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38552    new_path=`$CYGPATH -u "$path"`
38553  fi
38554  if test "x$new_path" = x; then
38555    # Oops. Which didn't find the executable.
38556    # The splitting of arguments from the executable at a space might have been incorrect,
38557    # since paths with space are more likely in Windows. Give it another try with the whole
38558    # argument.
38559    path="$complete"
38560    arguments="EOL"
38561    new_path=`$CYGPATH -u "$path"`
38562    new_path=`$WHICH "$new_path" 2> /dev/null`
38563    # bat and cmd files are not always considered executable in cygwin causing which
38564    # to not find them
38565    if test "x$new_path" = x \
38566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38568      new_path=`$CYGPATH -u "$path"`
38569    fi
38570    if test "x$new_path" = x; then
38571      # It's still not found. Now this is an unrecoverable error.
38572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38573$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38574      has_space=`$ECHO "$complete" | $GREP " "`
38575      if test "x$has_space" != x; then
38576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38578      fi
38579      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38580    fi
38581  fi
38582
38583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38586  # "foo.exe" is OK but "foo" is an error.
38587  #
38588  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38589  # It is also a way to make sure we got the proper file name for the real test later on.
38590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38591  if test "x$test_shortpath" = x; then
38592    # Short path failed, file does not exist as specified.
38593    # Try adding .exe or .cmd
38594    if test -f "${new_path}.exe"; then
38595      input_to_shortpath="${new_path}.exe"
38596    elif test -f "${new_path}.cmd"; then
38597      input_to_shortpath="${new_path}.cmd"
38598    else
38599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38600$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38601      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38602$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38603      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38604    fi
38605  else
38606    input_to_shortpath="$new_path"
38607  fi
38608
38609  # Call helper function which possibly converts this using DOS-style short mode.
38610  # If so, the updated path is stored in $new_path.
38611  new_path="$input_to_shortpath"
38612
38613  input_path="$input_to_shortpath"
38614  # Check if we need to convert this using DOS-style short mode. If the path
38615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38616  # take no chances and rewrite it.
38617  # Note: m4 eats our [], so we need to use [ and ] instead.
38618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38619  if test "x$has_forbidden_chars" != x; then
38620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38624      # Going to short mode and back again did indeed matter. Since short mode is
38625      # case insensitive, let's make it lowercase to improve readability.
38626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38627      # Now convert it back to Unix-style (cygpath)
38628      input_path=`$CYGPATH -u "$shortmode_path"`
38629      new_path="$input_path"
38630    fi
38631  fi
38632
38633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38634  if test "x$test_cygdrive_prefix" = x; then
38635    # As a simple fix, exclude /usr/bin since it's not a real path.
38636    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38638      # a path prefixed by /cygdrive for fixpath to work.
38639      new_path="$CYGWIN_ROOT_PATH$input_path"
38640    fi
38641  fi
38642
38643  # remove trailing .exe if any
38644  new_path="${new_path/%.exe/}"
38645
38646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38647
38648  # First separate the path from the arguments. This will split at the first
38649  # space.
38650  complete="$MT"
38651  path="${complete%% *}"
38652  tmp="$complete EOL"
38653  arguments="${tmp#* }"
38654
38655  # Input might be given as Windows format, start by converting to
38656  # unix format.
38657  new_path="$path"
38658
38659  windows_path="$new_path"
38660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38661    unix_path=`$CYGPATH -u "$windows_path"`
38662    new_path="$unix_path"
38663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38665    new_path="$unix_path"
38666  fi
38667
38668
38669  # Now try to locate executable using which
38670  new_path=`$WHICH "$new_path" 2> /dev/null`
38671
38672  if test "x$new_path" = x; then
38673    # Oops. Which didn't find the executable.
38674    # The splitting of arguments from the executable at a space might have been incorrect,
38675    # since paths with space are more likely in Windows. Give it another try with the whole
38676    # argument.
38677    path="$complete"
38678    arguments="EOL"
38679    new_path="$path"
38680
38681  windows_path="$new_path"
38682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38683    unix_path=`$CYGPATH -u "$windows_path"`
38684    new_path="$unix_path"
38685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38687    new_path="$unix_path"
38688  fi
38689
38690
38691    new_path=`$WHICH "$new_path" 2> /dev/null`
38692    # bat and cmd files are not always considered executable in MSYS causing which
38693    # to not find them
38694    if test "x$new_path" = x \
38695        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38696        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38697      new_path="$path"
38698
38699  windows_path="$new_path"
38700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38701    unix_path=`$CYGPATH -u "$windows_path"`
38702    new_path="$unix_path"
38703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38705    new_path="$unix_path"
38706  fi
38707
38708    fi
38709
38710    if test "x$new_path" = x; then
38711      # It's still not found. Now this is an unrecoverable error.
38712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38713$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38714      has_space=`$ECHO "$complete" | $GREP " "`
38715      if test "x$has_space" != x; then
38716        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38717$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38718      fi
38719      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38720    fi
38721  fi
38722
38723  # Now new_path has a complete unix path to the binary
38724  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38725    # Keep paths in /bin as-is, but remove trailing .exe if any
38726    new_path="${new_path/%.exe/}"
38727    # Do not save /bin paths to all_fixpath_prefixes!
38728  else
38729    # Not in mixed or Windows style, start by that.
38730    new_path=`cmd //c echo $new_path`
38731
38732  input_path="$new_path"
38733  # Check if we need to convert this using DOS-style short mode. If the path
38734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38735  # take no chances and rewrite it.
38736  # Note: m4 eats our [], so we need to use [ and ] instead.
38737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38738  if test "x$has_forbidden_chars" != x; then
38739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38741  fi
38742
38743    # Output is in $new_path
38744
38745  windows_path="$new_path"
38746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38747    unix_path=`$CYGPATH -u "$windows_path"`
38748    new_path="$unix_path"
38749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38751    new_path="$unix_path"
38752  fi
38753
38754    # remove trailing .exe if any
38755    new_path="${new_path/%.exe/}"
38756
38757    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38758    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38759  fi
38760
38761    else
38762      # We're on a unix platform. Hooray! :)
38763      # First separate the path from the arguments. This will split at the first
38764      # space.
38765      complete="$MT"
38766      path="${complete%% *}"
38767      tmp="$complete EOL"
38768      arguments="${tmp#* }"
38769
38770      # Cannot rely on the command "which" here since it doesn't always work.
38771      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38772      if test -z "$is_absolute_path"; then
38773        # Path to executable is not absolute. Find it.
38774        IFS_save="$IFS"
38775        IFS=:
38776        for p in $PATH; do
38777          if test -f "$p/$path" && test -x "$p/$path"; then
38778            new_path="$p/$path"
38779            break
38780          fi
38781        done
38782        IFS="$IFS_save"
38783      else
38784        # This is an absolute path, we can use it without further modifications.
38785        new_path="$path"
38786      fi
38787
38788      if test "x$new_path" = x; then
38789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38790$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38791        has_space=`$ECHO "$complete" | $GREP " "`
38792        if test "x$has_space" != x; then
38793          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38794$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38795        fi
38796        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38797      fi
38798    fi
38799
38800    # Now join together the path and the arguments once again
38801    if test "x$arguments" != xEOL; then
38802      new_complete="$new_path ${arguments% *}"
38803    else
38804      new_complete="$new_path"
38805    fi
38806
38807    if test "x$complete" != "x$new_complete"; then
38808      MT="$new_complete"
38809      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38810$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38811    fi
38812  fi
38813
38814    # Setup the resource compiler (RC)
38815    # Extract the first word of "rc", so it can be a program name with args.
38816set dummy rc; ac_word=$2
38817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38818$as_echo_n "checking for $ac_word... " >&6; }
38819if ${ac_cv_prog_RC+:} false; then :
38820  $as_echo_n "(cached) " >&6
38821else
38822  if test -n "$RC"; then
38823  ac_cv_prog_RC="$RC" # Let the user override the test.
38824else
38825  ac_prog_rejected=no
38826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38827for as_dir in $PATH
38828do
38829  IFS=$as_save_IFS
38830  test -z "$as_dir" && as_dir=.
38831    for ac_exec_ext in '' $ac_executable_extensions; do
38832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38833    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38834       ac_prog_rejected=yes
38835       continue
38836     fi
38837    ac_cv_prog_RC="rc"
38838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38839    break 2
38840  fi
38841done
38842  done
38843IFS=$as_save_IFS
38844
38845if test $ac_prog_rejected = yes; then
38846  # We found a bogon in the path, so make sure we never use it.
38847  set dummy $ac_cv_prog_RC
38848  shift
38849  if test $# != 0; then
38850    # We chose a different compiler from the bogus one.
38851    # However, it has the same basename, so the bogon will be chosen
38852    # first if we set RC to just the basename; use the full file name.
38853    shift
38854    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38855  fi
38856fi
38857fi
38858fi
38859RC=$ac_cv_prog_RC
38860if test -n "$RC"; then
38861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38862$as_echo "$RC" >&6; }
38863else
38864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38865$as_echo "no" >&6; }
38866fi
38867
38868
38869
38870  # Only process if variable expands to non-empty
38871
38872  if test "x$RC" != x; then
38873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38874
38875  # First separate the path from the arguments. This will split at the first
38876  # space.
38877  complete="$RC"
38878  path="${complete%% *}"
38879  tmp="$complete EOL"
38880  arguments="${tmp#* }"
38881
38882  # Input might be given as Windows format, start by converting to
38883  # unix format.
38884  new_path=`$CYGPATH -u "$path"`
38885
38886  # Now try to locate executable using which
38887  new_path=`$WHICH "$new_path" 2> /dev/null`
38888  # bat and cmd files are not always considered executable in cygwin causing which
38889  # to not find them
38890  if test "x$new_path" = x \
38891      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38892      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38893    new_path=`$CYGPATH -u "$path"`
38894  fi
38895  if test "x$new_path" = x; then
38896    # Oops. Which didn't find the executable.
38897    # The splitting of arguments from the executable at a space might have been incorrect,
38898    # since paths with space are more likely in Windows. Give it another try with the whole
38899    # argument.
38900    path="$complete"
38901    arguments="EOL"
38902    new_path=`$CYGPATH -u "$path"`
38903    new_path=`$WHICH "$new_path" 2> /dev/null`
38904    # bat and cmd files are not always considered executable in cygwin causing which
38905    # to not find them
38906    if test "x$new_path" = x \
38907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38909      new_path=`$CYGPATH -u "$path"`
38910    fi
38911    if test "x$new_path" = x; then
38912      # It's still not found. Now this is an unrecoverable error.
38913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38914$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38915      has_space=`$ECHO "$complete" | $GREP " "`
38916      if test "x$has_space" != x; then
38917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38919      fi
38920      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38921    fi
38922  fi
38923
38924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38927  # "foo.exe" is OK but "foo" is an error.
38928  #
38929  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38930  # It is also a way to make sure we got the proper file name for the real test later on.
38931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38932  if test "x$test_shortpath" = x; then
38933    # Short path failed, file does not exist as specified.
38934    # Try adding .exe or .cmd
38935    if test -f "${new_path}.exe"; then
38936      input_to_shortpath="${new_path}.exe"
38937    elif test -f "${new_path}.cmd"; then
38938      input_to_shortpath="${new_path}.cmd"
38939    else
38940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38941$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38942      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38943$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38944      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38945    fi
38946  else
38947    input_to_shortpath="$new_path"
38948  fi
38949
38950  # Call helper function which possibly converts this using DOS-style short mode.
38951  # If so, the updated path is stored in $new_path.
38952  new_path="$input_to_shortpath"
38953
38954  input_path="$input_to_shortpath"
38955  # Check if we need to convert this using DOS-style short mode. If the path
38956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38957  # take no chances and rewrite it.
38958  # Note: m4 eats our [], so we need to use [ and ] instead.
38959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38960  if test "x$has_forbidden_chars" != x; then
38961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38965      # Going to short mode and back again did indeed matter. Since short mode is
38966      # case insensitive, let's make it lowercase to improve readability.
38967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38968      # Now convert it back to Unix-style (cygpath)
38969      input_path=`$CYGPATH -u "$shortmode_path"`
38970      new_path="$input_path"
38971    fi
38972  fi
38973
38974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38975  if test "x$test_cygdrive_prefix" = x; then
38976    # As a simple fix, exclude /usr/bin since it's not a real path.
38977    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38979      # a path prefixed by /cygdrive for fixpath to work.
38980      new_path="$CYGWIN_ROOT_PATH$input_path"
38981    fi
38982  fi
38983
38984  # remove trailing .exe if any
38985  new_path="${new_path/%.exe/}"
38986
38987    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38988
38989  # First separate the path from the arguments. This will split at the first
38990  # space.
38991  complete="$RC"
38992  path="${complete%% *}"
38993  tmp="$complete EOL"
38994  arguments="${tmp#* }"
38995
38996  # Input might be given as Windows format, start by converting to
38997  # unix format.
38998  new_path="$path"
38999
39000  windows_path="$new_path"
39001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39002    unix_path=`$CYGPATH -u "$windows_path"`
39003    new_path="$unix_path"
39004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39006    new_path="$unix_path"
39007  fi
39008
39009
39010  # Now try to locate executable using which
39011  new_path=`$WHICH "$new_path" 2> /dev/null`
39012
39013  if test "x$new_path" = x; then
39014    # Oops. Which didn't find the executable.
39015    # The splitting of arguments from the executable at a space might have been incorrect,
39016    # since paths with space are more likely in Windows. Give it another try with the whole
39017    # argument.
39018    path="$complete"
39019    arguments="EOL"
39020    new_path="$path"
39021
39022  windows_path="$new_path"
39023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39024    unix_path=`$CYGPATH -u "$windows_path"`
39025    new_path="$unix_path"
39026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39028    new_path="$unix_path"
39029  fi
39030
39031
39032    new_path=`$WHICH "$new_path" 2> /dev/null`
39033    # bat and cmd files are not always considered executable in MSYS causing which
39034    # to not find them
39035    if test "x$new_path" = x \
39036        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39037        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39038      new_path="$path"
39039
39040  windows_path="$new_path"
39041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39042    unix_path=`$CYGPATH -u "$windows_path"`
39043    new_path="$unix_path"
39044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39046    new_path="$unix_path"
39047  fi
39048
39049    fi
39050
39051    if test "x$new_path" = x; then
39052      # It's still not found. Now this is an unrecoverable error.
39053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39054$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39055      has_space=`$ECHO "$complete" | $GREP " "`
39056      if test "x$has_space" != x; then
39057        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39059      fi
39060      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39061    fi
39062  fi
39063
39064  # Now new_path has a complete unix path to the binary
39065  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39066    # Keep paths in /bin as-is, but remove trailing .exe if any
39067    new_path="${new_path/%.exe/}"
39068    # Do not save /bin paths to all_fixpath_prefixes!
39069  else
39070    # Not in mixed or Windows style, start by that.
39071    new_path=`cmd //c echo $new_path`
39072
39073  input_path="$new_path"
39074  # Check if we need to convert this using DOS-style short mode. If the path
39075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39076  # take no chances and rewrite it.
39077  # Note: m4 eats our [], so we need to use [ and ] instead.
39078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39079  if test "x$has_forbidden_chars" != x; then
39080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39082  fi
39083
39084    # Output is in $new_path
39085
39086  windows_path="$new_path"
39087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39088    unix_path=`$CYGPATH -u "$windows_path"`
39089    new_path="$unix_path"
39090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39092    new_path="$unix_path"
39093  fi
39094
39095    # remove trailing .exe if any
39096    new_path="${new_path/%.exe/}"
39097
39098    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39099    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39100  fi
39101
39102    else
39103      # We're on a unix platform. Hooray! :)
39104      # First separate the path from the arguments. This will split at the first
39105      # space.
39106      complete="$RC"
39107      path="${complete%% *}"
39108      tmp="$complete EOL"
39109      arguments="${tmp#* }"
39110
39111      # Cannot rely on the command "which" here since it doesn't always work.
39112      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39113      if test -z "$is_absolute_path"; then
39114        # Path to executable is not absolute. Find it.
39115        IFS_save="$IFS"
39116        IFS=:
39117        for p in $PATH; do
39118          if test -f "$p/$path" && test -x "$p/$path"; then
39119            new_path="$p/$path"
39120            break
39121          fi
39122        done
39123        IFS="$IFS_save"
39124      else
39125        # This is an absolute path, we can use it without further modifications.
39126        new_path="$path"
39127      fi
39128
39129      if test "x$new_path" = x; then
39130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39131$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39132        has_space=`$ECHO "$complete" | $GREP " "`
39133        if test "x$has_space" != x; then
39134          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39135$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39136        fi
39137        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39138      fi
39139    fi
39140
39141    # Now join together the path and the arguments once again
39142    if test "x$arguments" != xEOL; then
39143      new_complete="$new_path ${arguments% *}"
39144    else
39145      new_complete="$new_path"
39146    fi
39147
39148    if test "x$complete" != "x$new_complete"; then
39149      RC="$new_complete"
39150      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39151$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39152    fi
39153  fi
39154
39155    # Extract the first word of "dumpbin", so it can be a program name with args.
39156set dummy dumpbin; ac_word=$2
39157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39158$as_echo_n "checking for $ac_word... " >&6; }
39159if ${ac_cv_prog_DUMPBIN+:} false; then :
39160  $as_echo_n "(cached) " >&6
39161else
39162  if test -n "$DUMPBIN"; then
39163  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39164else
39165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39166for as_dir in $PATH
39167do
39168  IFS=$as_save_IFS
39169  test -z "$as_dir" && as_dir=.
39170    for ac_exec_ext in '' $ac_executable_extensions; do
39171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39172    ac_cv_prog_DUMPBIN="dumpbin"
39173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39174    break 2
39175  fi
39176done
39177  done
39178IFS=$as_save_IFS
39179
39180fi
39181fi
39182DUMPBIN=$ac_cv_prog_DUMPBIN
39183if test -n "$DUMPBIN"; then
39184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39185$as_echo "$DUMPBIN" >&6; }
39186else
39187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39188$as_echo "no" >&6; }
39189fi
39190
39191
39192
39193  # Only process if variable expands to non-empty
39194
39195  if test "x$DUMPBIN" != x; then
39196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39197
39198  # First separate the path from the arguments. This will split at the first
39199  # space.
39200  complete="$DUMPBIN"
39201  path="${complete%% *}"
39202  tmp="$complete EOL"
39203  arguments="${tmp#* }"
39204
39205  # Input might be given as Windows format, start by converting to
39206  # unix format.
39207  new_path=`$CYGPATH -u "$path"`
39208
39209  # Now try to locate executable using which
39210  new_path=`$WHICH "$new_path" 2> /dev/null`
39211  # bat and cmd files are not always considered executable in cygwin causing which
39212  # to not find them
39213  if test "x$new_path" = x \
39214      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39215      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39216    new_path=`$CYGPATH -u "$path"`
39217  fi
39218  if test "x$new_path" = x; then
39219    # Oops. Which didn't find the executable.
39220    # The splitting of arguments from the executable at a space might have been incorrect,
39221    # since paths with space are more likely in Windows. Give it another try with the whole
39222    # argument.
39223    path="$complete"
39224    arguments="EOL"
39225    new_path=`$CYGPATH -u "$path"`
39226    new_path=`$WHICH "$new_path" 2> /dev/null`
39227    # bat and cmd files are not always considered executable in cygwin causing which
39228    # to not find them
39229    if test "x$new_path" = x \
39230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39232      new_path=`$CYGPATH -u "$path"`
39233    fi
39234    if test "x$new_path" = x; then
39235      # It's still not found. Now this is an unrecoverable error.
39236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39237$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39238      has_space=`$ECHO "$complete" | $GREP " "`
39239      if test "x$has_space" != x; then
39240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39242      fi
39243      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39244    fi
39245  fi
39246
39247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39250  # "foo.exe" is OK but "foo" is an error.
39251  #
39252  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39253  # It is also a way to make sure we got the proper file name for the real test later on.
39254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39255  if test "x$test_shortpath" = x; then
39256    # Short path failed, file does not exist as specified.
39257    # Try adding .exe or .cmd
39258    if test -f "${new_path}.exe"; then
39259      input_to_shortpath="${new_path}.exe"
39260    elif test -f "${new_path}.cmd"; then
39261      input_to_shortpath="${new_path}.cmd"
39262    else
39263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39264$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39265      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39266$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39267      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39268    fi
39269  else
39270    input_to_shortpath="$new_path"
39271  fi
39272
39273  # Call helper function which possibly converts this using DOS-style short mode.
39274  # If so, the updated path is stored in $new_path.
39275  new_path="$input_to_shortpath"
39276
39277  input_path="$input_to_shortpath"
39278  # Check if we need to convert this using DOS-style short mode. If the path
39279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39280  # take no chances and rewrite it.
39281  # Note: m4 eats our [], so we need to use [ and ] instead.
39282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39283  if test "x$has_forbidden_chars" != x; then
39284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39288      # Going to short mode and back again did indeed matter. Since short mode is
39289      # case insensitive, let's make it lowercase to improve readability.
39290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39291      # Now convert it back to Unix-style (cygpath)
39292      input_path=`$CYGPATH -u "$shortmode_path"`
39293      new_path="$input_path"
39294    fi
39295  fi
39296
39297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39298  if test "x$test_cygdrive_prefix" = x; then
39299    # As a simple fix, exclude /usr/bin since it's not a real path.
39300    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39302      # a path prefixed by /cygdrive for fixpath to work.
39303      new_path="$CYGWIN_ROOT_PATH$input_path"
39304    fi
39305  fi
39306
39307  # remove trailing .exe if any
39308  new_path="${new_path/%.exe/}"
39309
39310    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39311
39312  # First separate the path from the arguments. This will split at the first
39313  # space.
39314  complete="$DUMPBIN"
39315  path="${complete%% *}"
39316  tmp="$complete EOL"
39317  arguments="${tmp#* }"
39318
39319  # Input might be given as Windows format, start by converting to
39320  # unix format.
39321  new_path="$path"
39322
39323  windows_path="$new_path"
39324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39325    unix_path=`$CYGPATH -u "$windows_path"`
39326    new_path="$unix_path"
39327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39329    new_path="$unix_path"
39330  fi
39331
39332
39333  # Now try to locate executable using which
39334  new_path=`$WHICH "$new_path" 2> /dev/null`
39335
39336  if test "x$new_path" = x; then
39337    # Oops. Which didn't find the executable.
39338    # The splitting of arguments from the executable at a space might have been incorrect,
39339    # since paths with space are more likely in Windows. Give it another try with the whole
39340    # argument.
39341    path="$complete"
39342    arguments="EOL"
39343    new_path="$path"
39344
39345  windows_path="$new_path"
39346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39347    unix_path=`$CYGPATH -u "$windows_path"`
39348    new_path="$unix_path"
39349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39351    new_path="$unix_path"
39352  fi
39353
39354
39355    new_path=`$WHICH "$new_path" 2> /dev/null`
39356    # bat and cmd files are not always considered executable in MSYS causing which
39357    # to not find them
39358    if test "x$new_path" = x \
39359        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39360        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39361      new_path="$path"
39362
39363  windows_path="$new_path"
39364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39365    unix_path=`$CYGPATH -u "$windows_path"`
39366    new_path="$unix_path"
39367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39369    new_path="$unix_path"
39370  fi
39371
39372    fi
39373
39374    if test "x$new_path" = x; then
39375      # It's still not found. Now this is an unrecoverable error.
39376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39377$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39378      has_space=`$ECHO "$complete" | $GREP " "`
39379      if test "x$has_space" != x; then
39380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39382      fi
39383      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39384    fi
39385  fi
39386
39387  # Now new_path has a complete unix path to the binary
39388  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39389    # Keep paths in /bin as-is, but remove trailing .exe if any
39390    new_path="${new_path/%.exe/}"
39391    # Do not save /bin paths to all_fixpath_prefixes!
39392  else
39393    # Not in mixed or Windows style, start by that.
39394    new_path=`cmd //c echo $new_path`
39395
39396  input_path="$new_path"
39397  # Check if we need to convert this using DOS-style short mode. If the path
39398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39399  # take no chances and rewrite it.
39400  # Note: m4 eats our [], so we need to use [ and ] instead.
39401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39402  if test "x$has_forbidden_chars" != x; then
39403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39405  fi
39406
39407    # Output is in $new_path
39408
39409  windows_path="$new_path"
39410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39411    unix_path=`$CYGPATH -u "$windows_path"`
39412    new_path="$unix_path"
39413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39415    new_path="$unix_path"
39416  fi
39417
39418    # remove trailing .exe if any
39419    new_path="${new_path/%.exe/}"
39420
39421    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39422    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39423  fi
39424
39425    else
39426      # We're on a unix platform. Hooray! :)
39427      # First separate the path from the arguments. This will split at the first
39428      # space.
39429      complete="$DUMPBIN"
39430      path="${complete%% *}"
39431      tmp="$complete EOL"
39432      arguments="${tmp#* }"
39433
39434      # Cannot rely on the command "which" here since it doesn't always work.
39435      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39436      if test -z "$is_absolute_path"; then
39437        # Path to executable is not absolute. Find it.
39438        IFS_save="$IFS"
39439        IFS=:
39440        for p in $PATH; do
39441          if test -f "$p/$path" && test -x "$p/$path"; then
39442            new_path="$p/$path"
39443            break
39444          fi
39445        done
39446        IFS="$IFS_save"
39447      else
39448        # This is an absolute path, we can use it without further modifications.
39449        new_path="$path"
39450      fi
39451
39452      if test "x$new_path" = x; then
39453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39454$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39455        has_space=`$ECHO "$complete" | $GREP " "`
39456        if test "x$has_space" != x; then
39457          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39458$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39459        fi
39460        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39461      fi
39462    fi
39463
39464    # Now join together the path and the arguments once again
39465    if test "x$arguments" != xEOL; then
39466      new_complete="$new_path ${arguments% *}"
39467    else
39468      new_complete="$new_path"
39469    fi
39470
39471    if test "x$complete" != "x$new_complete"; then
39472      DUMPBIN="$new_complete"
39473      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39474$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39475    fi
39476  fi
39477
39478    # We need to check for 'msbuild.exe' because at the place where we expect to
39479    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39480    # won't find the 'msbuild.exe' executable in that case (and the
39481    # 'ac_executable_extensions' is unusable due to performance reasons).
39482    # Notice that we intentionally don't fix up the path to MSBUILD because we
39483    # will call it in a DOS shell during freetype detection on Windows (see
39484    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39485    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39486set dummy msbuild.exe; ac_word=$2
39487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39488$as_echo_n "checking for $ac_word... " >&6; }
39489if ${ac_cv_prog_MSBUILD+:} false; then :
39490  $as_echo_n "(cached) " >&6
39491else
39492  if test -n "$MSBUILD"; then
39493  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39494else
39495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39496for as_dir in $PATH
39497do
39498  IFS=$as_save_IFS
39499  test -z "$as_dir" && as_dir=.
39500    for ac_exec_ext in '' $ac_executable_extensions; do
39501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39502    ac_cv_prog_MSBUILD="msbuild.exe"
39503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39504    break 2
39505  fi
39506done
39507  done
39508IFS=$as_save_IFS
39509
39510fi
39511fi
39512MSBUILD=$ac_cv_prog_MSBUILD
39513if test -n "$MSBUILD"; then
39514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39515$as_echo "$MSBUILD" >&6; }
39516else
39517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39518$as_echo "no" >&6; }
39519fi
39520
39521
39522  fi
39523
39524  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39525
39526
39527  # Publish this variable in the help.
39528
39529
39530  if [ -z "${STRIP+x}" ]; then
39531    # The variable is not set by user, try to locate tool using the code snippet
39532    for ac_prog in strip
39533do
39534  # Extract the first word of "$ac_prog", so it can be a program name with args.
39535set dummy $ac_prog; ac_word=$2
39536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39537$as_echo_n "checking for $ac_word... " >&6; }
39538if ${ac_cv_path_STRIP+:} false; then :
39539  $as_echo_n "(cached) " >&6
39540else
39541  case $STRIP in
39542  [\\/]* | ?:[\\/]*)
39543  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39544  ;;
39545  *)
39546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39547for as_dir in $PATH
39548do
39549  IFS=$as_save_IFS
39550  test -z "$as_dir" && as_dir=.
39551    for ac_exec_ext in '' $ac_executable_extensions; do
39552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39553    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39555    break 2
39556  fi
39557done
39558  done
39559IFS=$as_save_IFS
39560
39561  ;;
39562esac
39563fi
39564STRIP=$ac_cv_path_STRIP
39565if test -n "$STRIP"; then
39566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39567$as_echo "$STRIP" >&6; }
39568else
39569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39570$as_echo "no" >&6; }
39571fi
39572
39573
39574  test -n "$STRIP" && break
39575done
39576
39577  else
39578    # The variable is set, but is it from the command line or the environment?
39579
39580    # Try to remove the string !STRIP! from our list.
39581    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39582    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39583      # If it failed, the variable was not from the command line. Ignore it,
39584      # but warn the user (except for BASH, which is always set by the calling BASH).
39585      if test "xSTRIP" != xBASH; then
39586        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39587$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39588      fi
39589      # Try to locate tool using the code snippet
39590      for ac_prog in strip
39591do
39592  # Extract the first word of "$ac_prog", so it can be a program name with args.
39593set dummy $ac_prog; ac_word=$2
39594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39595$as_echo_n "checking for $ac_word... " >&6; }
39596if ${ac_cv_path_STRIP+:} false; then :
39597  $as_echo_n "(cached) " >&6
39598else
39599  case $STRIP in
39600  [\\/]* | ?:[\\/]*)
39601  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39602  ;;
39603  *)
39604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39605for as_dir in $PATH
39606do
39607  IFS=$as_save_IFS
39608  test -z "$as_dir" && as_dir=.
39609    for ac_exec_ext in '' $ac_executable_extensions; do
39610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39611    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39613    break 2
39614  fi
39615done
39616  done
39617IFS=$as_save_IFS
39618
39619  ;;
39620esac
39621fi
39622STRIP=$ac_cv_path_STRIP
39623if test -n "$STRIP"; then
39624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39625$as_echo "$STRIP" >&6; }
39626else
39627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39628$as_echo "no" >&6; }
39629fi
39630
39631
39632  test -n "$STRIP" && break
39633done
39634
39635    else
39636      # If it succeeded, then it was overridden by the user. We will use it
39637      # for the tool.
39638
39639      # First remove it from the list of overridden variables, so we can test
39640      # for unknown variables in the end.
39641      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39642
39643      # Check if we try to supply an empty value
39644      if test "x$STRIP" = x; then
39645        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39646$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39647        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39648$as_echo_n "checking for STRIP... " >&6; }
39649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39650$as_echo "disabled" >&6; }
39651      else
39652        # Check if the provided tool contains a complete path.
39653        tool_specified="$STRIP"
39654        tool_basename="${tool_specified##*/}"
39655        if test "x$tool_basename" = "x$tool_specified"; then
39656          # A command without a complete path is provided, search $PATH.
39657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39658$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39659          # Extract the first word of "$tool_basename", so it can be a program name with args.
39660set dummy $tool_basename; ac_word=$2
39661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39662$as_echo_n "checking for $ac_word... " >&6; }
39663if ${ac_cv_path_STRIP+:} false; then :
39664  $as_echo_n "(cached) " >&6
39665else
39666  case $STRIP in
39667  [\\/]* | ?:[\\/]*)
39668  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39669  ;;
39670  *)
39671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39672for as_dir in $PATH
39673do
39674  IFS=$as_save_IFS
39675  test -z "$as_dir" && as_dir=.
39676    for ac_exec_ext in '' $ac_executable_extensions; do
39677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39678    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39680    break 2
39681  fi
39682done
39683  done
39684IFS=$as_save_IFS
39685
39686  ;;
39687esac
39688fi
39689STRIP=$ac_cv_path_STRIP
39690if test -n "$STRIP"; then
39691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39692$as_echo "$STRIP" >&6; }
39693else
39694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39695$as_echo "no" >&6; }
39696fi
39697
39698
39699          if test "x$STRIP" = x; then
39700            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39701          fi
39702        else
39703          # Otherwise we believe it is a complete path. Use it as it is.
39704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39705$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39706          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39707$as_echo_n "checking for STRIP... " >&6; }
39708          if test ! -x "$tool_specified"; then
39709            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39710$as_echo "not found" >&6; }
39711            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39712          fi
39713          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39714$as_echo "$tool_specified" >&6; }
39715        fi
39716      fi
39717    fi
39718
39719  fi
39720
39721
39722
39723  # Only process if variable expands to non-empty
39724
39725  if test "x$STRIP" != x; then
39726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39727
39728  # First separate the path from the arguments. This will split at the first
39729  # space.
39730  complete="$STRIP"
39731  path="${complete%% *}"
39732  tmp="$complete EOL"
39733  arguments="${tmp#* }"
39734
39735  # Input might be given as Windows format, start by converting to
39736  # unix format.
39737  new_path=`$CYGPATH -u "$path"`
39738
39739  # Now try to locate executable using which
39740  new_path=`$WHICH "$new_path" 2> /dev/null`
39741  # bat and cmd files are not always considered executable in cygwin causing which
39742  # to not find them
39743  if test "x$new_path" = x \
39744      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39745      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39746    new_path=`$CYGPATH -u "$path"`
39747  fi
39748  if test "x$new_path" = x; then
39749    # Oops. Which didn't find the executable.
39750    # The splitting of arguments from the executable at a space might have been incorrect,
39751    # since paths with space are more likely in Windows. Give it another try with the whole
39752    # argument.
39753    path="$complete"
39754    arguments="EOL"
39755    new_path=`$CYGPATH -u "$path"`
39756    new_path=`$WHICH "$new_path" 2> /dev/null`
39757    # bat and cmd files are not always considered executable in cygwin causing which
39758    # to not find them
39759    if test "x$new_path" = x \
39760        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39761        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39762      new_path=`$CYGPATH -u "$path"`
39763    fi
39764    if test "x$new_path" = x; then
39765      # It's still not found. Now this is an unrecoverable error.
39766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39767$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39768      has_space=`$ECHO "$complete" | $GREP " "`
39769      if test "x$has_space" != x; then
39770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39772      fi
39773      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39774    fi
39775  fi
39776
39777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39780  # "foo.exe" is OK but "foo" is an error.
39781  #
39782  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39783  # It is also a way to make sure we got the proper file name for the real test later on.
39784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39785  if test "x$test_shortpath" = x; then
39786    # Short path failed, file does not exist as specified.
39787    # Try adding .exe or .cmd
39788    if test -f "${new_path}.exe"; then
39789      input_to_shortpath="${new_path}.exe"
39790    elif test -f "${new_path}.cmd"; then
39791      input_to_shortpath="${new_path}.cmd"
39792    else
39793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39794$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39795      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39796$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39797      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39798    fi
39799  else
39800    input_to_shortpath="$new_path"
39801  fi
39802
39803  # Call helper function which possibly converts this using DOS-style short mode.
39804  # If so, the updated path is stored in $new_path.
39805  new_path="$input_to_shortpath"
39806
39807  input_path="$input_to_shortpath"
39808  # Check if we need to convert this using DOS-style short mode. If the path
39809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39810  # take no chances and rewrite it.
39811  # Note: m4 eats our [], so we need to use [ and ] instead.
39812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39813  if test "x$has_forbidden_chars" != x; then
39814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39818      # Going to short mode and back again did indeed matter. Since short mode is
39819      # case insensitive, let's make it lowercase to improve readability.
39820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39821      # Now convert it back to Unix-style (cygpath)
39822      input_path=`$CYGPATH -u "$shortmode_path"`
39823      new_path="$input_path"
39824    fi
39825  fi
39826
39827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39828  if test "x$test_cygdrive_prefix" = x; then
39829    # As a simple fix, exclude /usr/bin since it's not a real path.
39830    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39832      # a path prefixed by /cygdrive for fixpath to work.
39833      new_path="$CYGWIN_ROOT_PATH$input_path"
39834    fi
39835  fi
39836
39837  # remove trailing .exe if any
39838  new_path="${new_path/%.exe/}"
39839
39840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39841
39842  # First separate the path from the arguments. This will split at the first
39843  # space.
39844  complete="$STRIP"
39845  path="${complete%% *}"
39846  tmp="$complete EOL"
39847  arguments="${tmp#* }"
39848
39849  # Input might be given as Windows format, start by converting to
39850  # unix format.
39851  new_path="$path"
39852
39853  windows_path="$new_path"
39854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39855    unix_path=`$CYGPATH -u "$windows_path"`
39856    new_path="$unix_path"
39857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39859    new_path="$unix_path"
39860  fi
39861
39862
39863  # Now try to locate executable using which
39864  new_path=`$WHICH "$new_path" 2> /dev/null`
39865
39866  if test "x$new_path" = x; then
39867    # Oops. Which didn't find the executable.
39868    # The splitting of arguments from the executable at a space might have been incorrect,
39869    # since paths with space are more likely in Windows. Give it another try with the whole
39870    # argument.
39871    path="$complete"
39872    arguments="EOL"
39873    new_path="$path"
39874
39875  windows_path="$new_path"
39876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39877    unix_path=`$CYGPATH -u "$windows_path"`
39878    new_path="$unix_path"
39879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39881    new_path="$unix_path"
39882  fi
39883
39884
39885    new_path=`$WHICH "$new_path" 2> /dev/null`
39886    # bat and cmd files are not always considered executable in MSYS causing which
39887    # to not find them
39888    if test "x$new_path" = x \
39889        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39890        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39891      new_path="$path"
39892
39893  windows_path="$new_path"
39894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39895    unix_path=`$CYGPATH -u "$windows_path"`
39896    new_path="$unix_path"
39897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39899    new_path="$unix_path"
39900  fi
39901
39902    fi
39903
39904    if test "x$new_path" = x; then
39905      # It's still not found. Now this is an unrecoverable error.
39906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39907$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39908      has_space=`$ECHO "$complete" | $GREP " "`
39909      if test "x$has_space" != x; then
39910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39912      fi
39913      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39914    fi
39915  fi
39916
39917  # Now new_path has a complete unix path to the binary
39918  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39919    # Keep paths in /bin as-is, but remove trailing .exe if any
39920    new_path="${new_path/%.exe/}"
39921    # Do not save /bin paths to all_fixpath_prefixes!
39922  else
39923    # Not in mixed or Windows style, start by that.
39924    new_path=`cmd //c echo $new_path`
39925
39926  input_path="$new_path"
39927  # Check if we need to convert this using DOS-style short mode. If the path
39928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39929  # take no chances and rewrite it.
39930  # Note: m4 eats our [], so we need to use [ and ] instead.
39931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39932  if test "x$has_forbidden_chars" != x; then
39933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39935  fi
39936
39937    # Output is in $new_path
39938
39939  windows_path="$new_path"
39940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39941    unix_path=`$CYGPATH -u "$windows_path"`
39942    new_path="$unix_path"
39943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39945    new_path="$unix_path"
39946  fi
39947
39948    # remove trailing .exe if any
39949    new_path="${new_path/%.exe/}"
39950
39951    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39952    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39953  fi
39954
39955    else
39956      # We're on a unix platform. Hooray! :)
39957      # First separate the path from the arguments. This will split at the first
39958      # space.
39959      complete="$STRIP"
39960      path="${complete%% *}"
39961      tmp="$complete EOL"
39962      arguments="${tmp#* }"
39963
39964      # Cannot rely on the command "which" here since it doesn't always work.
39965      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39966      if test -z "$is_absolute_path"; then
39967        # Path to executable is not absolute. Find it.
39968        IFS_save="$IFS"
39969        IFS=:
39970        for p in $PATH; do
39971          if test -f "$p/$path" && test -x "$p/$path"; then
39972            new_path="$p/$path"
39973            break
39974          fi
39975        done
39976        IFS="$IFS_save"
39977      else
39978        # This is an absolute path, we can use it without further modifications.
39979        new_path="$path"
39980      fi
39981
39982      if test "x$new_path" = x; then
39983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39984$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39985        has_space=`$ECHO "$complete" | $GREP " "`
39986        if test "x$has_space" != x; then
39987          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39988$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39989        fi
39990        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39991      fi
39992    fi
39993
39994    # Now join together the path and the arguments once again
39995    if test "x$arguments" != xEOL; then
39996      new_complete="$new_path ${arguments% *}"
39997    else
39998      new_complete="$new_path"
39999    fi
40000
40001    if test "x$complete" != "x$new_complete"; then
40002      STRIP="$new_complete"
40003      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40004$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40005    fi
40006  fi
40007
40008
40009
40010  # Publish this variable in the help.
40011
40012
40013  if [ -z "${NM+x}" ]; then
40014    # The variable is not set by user, try to locate tool using the code snippet
40015    for ac_prog in nm
40016do
40017  # Extract the first word of "$ac_prog", so it can be a program name with args.
40018set dummy $ac_prog; ac_word=$2
40019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40020$as_echo_n "checking for $ac_word... " >&6; }
40021if ${ac_cv_path_NM+:} false; then :
40022  $as_echo_n "(cached) " >&6
40023else
40024  case $NM in
40025  [\\/]* | ?:[\\/]*)
40026  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40027  ;;
40028  *)
40029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40030for as_dir in $PATH
40031do
40032  IFS=$as_save_IFS
40033  test -z "$as_dir" && as_dir=.
40034    for ac_exec_ext in '' $ac_executable_extensions; do
40035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40036    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40038    break 2
40039  fi
40040done
40041  done
40042IFS=$as_save_IFS
40043
40044  ;;
40045esac
40046fi
40047NM=$ac_cv_path_NM
40048if test -n "$NM"; then
40049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40050$as_echo "$NM" >&6; }
40051else
40052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40053$as_echo "no" >&6; }
40054fi
40055
40056
40057  test -n "$NM" && break
40058done
40059
40060  else
40061    # The variable is set, but is it from the command line or the environment?
40062
40063    # Try to remove the string !NM! from our list.
40064    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40065    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40066      # If it failed, the variable was not from the command line. Ignore it,
40067      # but warn the user (except for BASH, which is always set by the calling BASH).
40068      if test "xNM" != xBASH; then
40069        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40070$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40071      fi
40072      # Try to locate tool using the code snippet
40073      for ac_prog in nm
40074do
40075  # Extract the first word of "$ac_prog", so it can be a program name with args.
40076set dummy $ac_prog; ac_word=$2
40077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40078$as_echo_n "checking for $ac_word... " >&6; }
40079if ${ac_cv_path_NM+:} false; then :
40080  $as_echo_n "(cached) " >&6
40081else
40082  case $NM in
40083  [\\/]* | ?:[\\/]*)
40084  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40085  ;;
40086  *)
40087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40088for as_dir in $PATH
40089do
40090  IFS=$as_save_IFS
40091  test -z "$as_dir" && as_dir=.
40092    for ac_exec_ext in '' $ac_executable_extensions; do
40093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40094    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40096    break 2
40097  fi
40098done
40099  done
40100IFS=$as_save_IFS
40101
40102  ;;
40103esac
40104fi
40105NM=$ac_cv_path_NM
40106if test -n "$NM"; then
40107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40108$as_echo "$NM" >&6; }
40109else
40110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40111$as_echo "no" >&6; }
40112fi
40113
40114
40115  test -n "$NM" && break
40116done
40117
40118    else
40119      # If it succeeded, then it was overridden by the user. We will use it
40120      # for the tool.
40121
40122      # First remove it from the list of overridden variables, so we can test
40123      # for unknown variables in the end.
40124      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40125
40126      # Check if we try to supply an empty value
40127      if test "x$NM" = x; then
40128        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40129$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40131$as_echo_n "checking for NM... " >&6; }
40132        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40133$as_echo "disabled" >&6; }
40134      else
40135        # Check if the provided tool contains a complete path.
40136        tool_specified="$NM"
40137        tool_basename="${tool_specified##*/}"
40138        if test "x$tool_basename" = "x$tool_specified"; then
40139          # A command without a complete path is provided, search $PATH.
40140          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40141$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40142          # Extract the first word of "$tool_basename", so it can be a program name with args.
40143set dummy $tool_basename; ac_word=$2
40144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40145$as_echo_n "checking for $ac_word... " >&6; }
40146if ${ac_cv_path_NM+:} false; then :
40147  $as_echo_n "(cached) " >&6
40148else
40149  case $NM in
40150  [\\/]* | ?:[\\/]*)
40151  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40152  ;;
40153  *)
40154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40155for as_dir in $PATH
40156do
40157  IFS=$as_save_IFS
40158  test -z "$as_dir" && as_dir=.
40159    for ac_exec_ext in '' $ac_executable_extensions; do
40160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40161    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40163    break 2
40164  fi
40165done
40166  done
40167IFS=$as_save_IFS
40168
40169  ;;
40170esac
40171fi
40172NM=$ac_cv_path_NM
40173if test -n "$NM"; then
40174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40175$as_echo "$NM" >&6; }
40176else
40177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40178$as_echo "no" >&6; }
40179fi
40180
40181
40182          if test "x$NM" = x; then
40183            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40184          fi
40185        else
40186          # Otherwise we believe it is a complete path. Use it as it is.
40187          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40188$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40189          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40190$as_echo_n "checking for NM... " >&6; }
40191          if test ! -x "$tool_specified"; then
40192            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40193$as_echo "not found" >&6; }
40194            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40195          fi
40196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40197$as_echo "$tool_specified" >&6; }
40198        fi
40199      fi
40200    fi
40201
40202  fi
40203
40204
40205
40206  # Only process if variable expands to non-empty
40207
40208  if test "x$NM" != x; then
40209    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40210
40211  # First separate the path from the arguments. This will split at the first
40212  # space.
40213  complete="$NM"
40214  path="${complete%% *}"
40215  tmp="$complete EOL"
40216  arguments="${tmp#* }"
40217
40218  # Input might be given as Windows format, start by converting to
40219  # unix format.
40220  new_path=`$CYGPATH -u "$path"`
40221
40222  # Now try to locate executable using which
40223  new_path=`$WHICH "$new_path" 2> /dev/null`
40224  # bat and cmd files are not always considered executable in cygwin causing which
40225  # to not find them
40226  if test "x$new_path" = x \
40227      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40228      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40229    new_path=`$CYGPATH -u "$path"`
40230  fi
40231  if test "x$new_path" = x; then
40232    # Oops. Which didn't find the executable.
40233    # The splitting of arguments from the executable at a space might have been incorrect,
40234    # since paths with space are more likely in Windows. Give it another try with the whole
40235    # argument.
40236    path="$complete"
40237    arguments="EOL"
40238    new_path=`$CYGPATH -u "$path"`
40239    new_path=`$WHICH "$new_path" 2> /dev/null`
40240    # bat and cmd files are not always considered executable in cygwin causing which
40241    # to not find them
40242    if test "x$new_path" = x \
40243        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40244        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40245      new_path=`$CYGPATH -u "$path"`
40246    fi
40247    if test "x$new_path" = x; then
40248      # It's still not found. Now this is an unrecoverable error.
40249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40250$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40251      has_space=`$ECHO "$complete" | $GREP " "`
40252      if test "x$has_space" != x; then
40253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40255      fi
40256      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40257    fi
40258  fi
40259
40260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40263  # "foo.exe" is OK but "foo" is an error.
40264  #
40265  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40266  # It is also a way to make sure we got the proper file name for the real test later on.
40267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40268  if test "x$test_shortpath" = x; then
40269    # Short path failed, file does not exist as specified.
40270    # Try adding .exe or .cmd
40271    if test -f "${new_path}.exe"; then
40272      input_to_shortpath="${new_path}.exe"
40273    elif test -f "${new_path}.cmd"; then
40274      input_to_shortpath="${new_path}.cmd"
40275    else
40276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40277$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40278      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40279$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40280      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40281    fi
40282  else
40283    input_to_shortpath="$new_path"
40284  fi
40285
40286  # Call helper function which possibly converts this using DOS-style short mode.
40287  # If so, the updated path is stored in $new_path.
40288  new_path="$input_to_shortpath"
40289
40290  input_path="$input_to_shortpath"
40291  # Check if we need to convert this using DOS-style short mode. If the path
40292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40293  # take no chances and rewrite it.
40294  # Note: m4 eats our [], so we need to use [ and ] instead.
40295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40296  if test "x$has_forbidden_chars" != x; then
40297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40301      # Going to short mode and back again did indeed matter. Since short mode is
40302      # case insensitive, let's make it lowercase to improve readability.
40303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40304      # Now convert it back to Unix-style (cygpath)
40305      input_path=`$CYGPATH -u "$shortmode_path"`
40306      new_path="$input_path"
40307    fi
40308  fi
40309
40310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40311  if test "x$test_cygdrive_prefix" = x; then
40312    # As a simple fix, exclude /usr/bin since it's not a real path.
40313    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40315      # a path prefixed by /cygdrive for fixpath to work.
40316      new_path="$CYGWIN_ROOT_PATH$input_path"
40317    fi
40318  fi
40319
40320  # remove trailing .exe if any
40321  new_path="${new_path/%.exe/}"
40322
40323    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40324
40325  # First separate the path from the arguments. This will split at the first
40326  # space.
40327  complete="$NM"
40328  path="${complete%% *}"
40329  tmp="$complete EOL"
40330  arguments="${tmp#* }"
40331
40332  # Input might be given as Windows format, start by converting to
40333  # unix format.
40334  new_path="$path"
40335
40336  windows_path="$new_path"
40337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40338    unix_path=`$CYGPATH -u "$windows_path"`
40339    new_path="$unix_path"
40340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40342    new_path="$unix_path"
40343  fi
40344
40345
40346  # Now try to locate executable using which
40347  new_path=`$WHICH "$new_path" 2> /dev/null`
40348
40349  if test "x$new_path" = x; then
40350    # Oops. Which didn't find the executable.
40351    # The splitting of arguments from the executable at a space might have been incorrect,
40352    # since paths with space are more likely in Windows. Give it another try with the whole
40353    # argument.
40354    path="$complete"
40355    arguments="EOL"
40356    new_path="$path"
40357
40358  windows_path="$new_path"
40359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40360    unix_path=`$CYGPATH -u "$windows_path"`
40361    new_path="$unix_path"
40362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40364    new_path="$unix_path"
40365  fi
40366
40367
40368    new_path=`$WHICH "$new_path" 2> /dev/null`
40369    # bat and cmd files are not always considered executable in MSYS causing which
40370    # to not find them
40371    if test "x$new_path" = x \
40372        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40373        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40374      new_path="$path"
40375
40376  windows_path="$new_path"
40377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40378    unix_path=`$CYGPATH -u "$windows_path"`
40379    new_path="$unix_path"
40380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40382    new_path="$unix_path"
40383  fi
40384
40385    fi
40386
40387    if test "x$new_path" = x; then
40388      # It's still not found. Now this is an unrecoverable error.
40389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40390$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40391      has_space=`$ECHO "$complete" | $GREP " "`
40392      if test "x$has_space" != x; then
40393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40395      fi
40396      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40397    fi
40398  fi
40399
40400  # Now new_path has a complete unix path to the binary
40401  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40402    # Keep paths in /bin as-is, but remove trailing .exe if any
40403    new_path="${new_path/%.exe/}"
40404    # Do not save /bin paths to all_fixpath_prefixes!
40405  else
40406    # Not in mixed or Windows style, start by that.
40407    new_path=`cmd //c echo $new_path`
40408
40409  input_path="$new_path"
40410  # Check if we need to convert this using DOS-style short mode. If the path
40411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40412  # take no chances and rewrite it.
40413  # Note: m4 eats our [], so we need to use [ and ] instead.
40414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40415  if test "x$has_forbidden_chars" != x; then
40416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40418  fi
40419
40420    # Output is in $new_path
40421
40422  windows_path="$new_path"
40423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40424    unix_path=`$CYGPATH -u "$windows_path"`
40425    new_path="$unix_path"
40426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40428    new_path="$unix_path"
40429  fi
40430
40431    # remove trailing .exe if any
40432    new_path="${new_path/%.exe/}"
40433
40434    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40435    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40436  fi
40437
40438    else
40439      # We're on a unix platform. Hooray! :)
40440      # First separate the path from the arguments. This will split at the first
40441      # space.
40442      complete="$NM"
40443      path="${complete%% *}"
40444      tmp="$complete EOL"
40445      arguments="${tmp#* }"
40446
40447      # Cannot rely on the command "which" here since it doesn't always work.
40448      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40449      if test -z "$is_absolute_path"; then
40450        # Path to executable is not absolute. Find it.
40451        IFS_save="$IFS"
40452        IFS=:
40453        for p in $PATH; do
40454          if test -f "$p/$path" && test -x "$p/$path"; then
40455            new_path="$p/$path"
40456            break
40457          fi
40458        done
40459        IFS="$IFS_save"
40460      else
40461        # This is an absolute path, we can use it without further modifications.
40462        new_path="$path"
40463      fi
40464
40465      if test "x$new_path" = x; then
40466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40467$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40468        has_space=`$ECHO "$complete" | $GREP " "`
40469        if test "x$has_space" != x; then
40470          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40471$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40472        fi
40473        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40474      fi
40475    fi
40476
40477    # Now join together the path and the arguments once again
40478    if test "x$arguments" != xEOL; then
40479      new_complete="$new_path ${arguments% *}"
40480    else
40481      new_complete="$new_path"
40482    fi
40483
40484    if test "x$complete" != "x$new_complete"; then
40485      NM="$new_complete"
40486      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40487$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40488    fi
40489  fi
40490
40491
40492
40493  # Publish this variable in the help.
40494
40495
40496  if [ -z "${GNM+x}" ]; then
40497    # The variable is not set by user, try to locate tool using the code snippet
40498    for ac_prog in gnm
40499do
40500  # Extract the first word of "$ac_prog", so it can be a program name with args.
40501set dummy $ac_prog; ac_word=$2
40502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40503$as_echo_n "checking for $ac_word... " >&6; }
40504if ${ac_cv_path_GNM+:} false; then :
40505  $as_echo_n "(cached) " >&6
40506else
40507  case $GNM in
40508  [\\/]* | ?:[\\/]*)
40509  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40510  ;;
40511  *)
40512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40513for as_dir in $PATH
40514do
40515  IFS=$as_save_IFS
40516  test -z "$as_dir" && as_dir=.
40517    for ac_exec_ext in '' $ac_executable_extensions; do
40518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40519    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40521    break 2
40522  fi
40523done
40524  done
40525IFS=$as_save_IFS
40526
40527  ;;
40528esac
40529fi
40530GNM=$ac_cv_path_GNM
40531if test -n "$GNM"; then
40532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40533$as_echo "$GNM" >&6; }
40534else
40535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40536$as_echo "no" >&6; }
40537fi
40538
40539
40540  test -n "$GNM" && break
40541done
40542
40543  else
40544    # The variable is set, but is it from the command line or the environment?
40545
40546    # Try to remove the string !GNM! from our list.
40547    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40548    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40549      # If it failed, the variable was not from the command line. Ignore it,
40550      # but warn the user (except for BASH, which is always set by the calling BASH).
40551      if test "xGNM" != xBASH; then
40552        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40553$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40554      fi
40555      # Try to locate tool using the code snippet
40556      for ac_prog in gnm
40557do
40558  # Extract the first word of "$ac_prog", so it can be a program name with args.
40559set dummy $ac_prog; ac_word=$2
40560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40561$as_echo_n "checking for $ac_word... " >&6; }
40562if ${ac_cv_path_GNM+:} false; then :
40563  $as_echo_n "(cached) " >&6
40564else
40565  case $GNM in
40566  [\\/]* | ?:[\\/]*)
40567  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40568  ;;
40569  *)
40570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40571for as_dir in $PATH
40572do
40573  IFS=$as_save_IFS
40574  test -z "$as_dir" && as_dir=.
40575    for ac_exec_ext in '' $ac_executable_extensions; do
40576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40577    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40579    break 2
40580  fi
40581done
40582  done
40583IFS=$as_save_IFS
40584
40585  ;;
40586esac
40587fi
40588GNM=$ac_cv_path_GNM
40589if test -n "$GNM"; then
40590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40591$as_echo "$GNM" >&6; }
40592else
40593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40594$as_echo "no" >&6; }
40595fi
40596
40597
40598  test -n "$GNM" && break
40599done
40600
40601    else
40602      # If it succeeded, then it was overridden by the user. We will use it
40603      # for the tool.
40604
40605      # First remove it from the list of overridden variables, so we can test
40606      # for unknown variables in the end.
40607      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40608
40609      # Check if we try to supply an empty value
40610      if test "x$GNM" = x; then
40611        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40612$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40613        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40614$as_echo_n "checking for GNM... " >&6; }
40615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40616$as_echo "disabled" >&6; }
40617      else
40618        # Check if the provided tool contains a complete path.
40619        tool_specified="$GNM"
40620        tool_basename="${tool_specified##*/}"
40621        if test "x$tool_basename" = "x$tool_specified"; then
40622          # A command without a complete path is provided, search $PATH.
40623          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40624$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40625          # Extract the first word of "$tool_basename", so it can be a program name with args.
40626set dummy $tool_basename; ac_word=$2
40627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40628$as_echo_n "checking for $ac_word... " >&6; }
40629if ${ac_cv_path_GNM+:} false; then :
40630  $as_echo_n "(cached) " >&6
40631else
40632  case $GNM in
40633  [\\/]* | ?:[\\/]*)
40634  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40635  ;;
40636  *)
40637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40638for as_dir in $PATH
40639do
40640  IFS=$as_save_IFS
40641  test -z "$as_dir" && as_dir=.
40642    for ac_exec_ext in '' $ac_executable_extensions; do
40643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40644    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40646    break 2
40647  fi
40648done
40649  done
40650IFS=$as_save_IFS
40651
40652  ;;
40653esac
40654fi
40655GNM=$ac_cv_path_GNM
40656if test -n "$GNM"; then
40657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40658$as_echo "$GNM" >&6; }
40659else
40660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40661$as_echo "no" >&6; }
40662fi
40663
40664
40665          if test "x$GNM" = x; then
40666            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40667          fi
40668        else
40669          # Otherwise we believe it is a complete path. Use it as it is.
40670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40671$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40672          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40673$as_echo_n "checking for GNM... " >&6; }
40674          if test ! -x "$tool_specified"; then
40675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40676$as_echo "not found" >&6; }
40677            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40678          fi
40679          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40680$as_echo "$tool_specified" >&6; }
40681        fi
40682      fi
40683    fi
40684
40685  fi
40686
40687
40688
40689  # Only process if variable expands to non-empty
40690
40691  if test "x$GNM" != x; then
40692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40693
40694  # First separate the path from the arguments. This will split at the first
40695  # space.
40696  complete="$GNM"
40697  path="${complete%% *}"
40698  tmp="$complete EOL"
40699  arguments="${tmp#* }"
40700
40701  # Input might be given as Windows format, start by converting to
40702  # unix format.
40703  new_path=`$CYGPATH -u "$path"`
40704
40705  # Now try to locate executable using which
40706  new_path=`$WHICH "$new_path" 2> /dev/null`
40707  # bat and cmd files are not always considered executable in cygwin causing which
40708  # to not find them
40709  if test "x$new_path" = x \
40710      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40711      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40712    new_path=`$CYGPATH -u "$path"`
40713  fi
40714  if test "x$new_path" = x; then
40715    # Oops. Which didn't find the executable.
40716    # The splitting of arguments from the executable at a space might have been incorrect,
40717    # since paths with space are more likely in Windows. Give it another try with the whole
40718    # argument.
40719    path="$complete"
40720    arguments="EOL"
40721    new_path=`$CYGPATH -u "$path"`
40722    new_path=`$WHICH "$new_path" 2> /dev/null`
40723    # bat and cmd files are not always considered executable in cygwin causing which
40724    # to not find them
40725    if test "x$new_path" = x \
40726        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40727        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40728      new_path=`$CYGPATH -u "$path"`
40729    fi
40730    if test "x$new_path" = x; then
40731      # It's still not found. Now this is an unrecoverable error.
40732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40733$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40734      has_space=`$ECHO "$complete" | $GREP " "`
40735      if test "x$has_space" != x; then
40736        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40737$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40738      fi
40739      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40740    fi
40741  fi
40742
40743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40746  # "foo.exe" is OK but "foo" is an error.
40747  #
40748  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40749  # It is also a way to make sure we got the proper file name for the real test later on.
40750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40751  if test "x$test_shortpath" = x; then
40752    # Short path failed, file does not exist as specified.
40753    # Try adding .exe or .cmd
40754    if test -f "${new_path}.exe"; then
40755      input_to_shortpath="${new_path}.exe"
40756    elif test -f "${new_path}.cmd"; then
40757      input_to_shortpath="${new_path}.cmd"
40758    else
40759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40760$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40761      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40762$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40763      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40764    fi
40765  else
40766    input_to_shortpath="$new_path"
40767  fi
40768
40769  # Call helper function which possibly converts this using DOS-style short mode.
40770  # If so, the updated path is stored in $new_path.
40771  new_path="$input_to_shortpath"
40772
40773  input_path="$input_to_shortpath"
40774  # Check if we need to convert this using DOS-style short mode. If the path
40775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40776  # take no chances and rewrite it.
40777  # Note: m4 eats our [], so we need to use [ and ] instead.
40778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40779  if test "x$has_forbidden_chars" != x; then
40780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40784      # Going to short mode and back again did indeed matter. Since short mode is
40785      # case insensitive, let's make it lowercase to improve readability.
40786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40787      # Now convert it back to Unix-style (cygpath)
40788      input_path=`$CYGPATH -u "$shortmode_path"`
40789      new_path="$input_path"
40790    fi
40791  fi
40792
40793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40794  if test "x$test_cygdrive_prefix" = x; then
40795    # As a simple fix, exclude /usr/bin since it's not a real path.
40796    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40798      # a path prefixed by /cygdrive for fixpath to work.
40799      new_path="$CYGWIN_ROOT_PATH$input_path"
40800    fi
40801  fi
40802
40803  # remove trailing .exe if any
40804  new_path="${new_path/%.exe/}"
40805
40806    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40807
40808  # First separate the path from the arguments. This will split at the first
40809  # space.
40810  complete="$GNM"
40811  path="${complete%% *}"
40812  tmp="$complete EOL"
40813  arguments="${tmp#* }"
40814
40815  # Input might be given as Windows format, start by converting to
40816  # unix format.
40817  new_path="$path"
40818
40819  windows_path="$new_path"
40820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40821    unix_path=`$CYGPATH -u "$windows_path"`
40822    new_path="$unix_path"
40823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40825    new_path="$unix_path"
40826  fi
40827
40828
40829  # Now try to locate executable using which
40830  new_path=`$WHICH "$new_path" 2> /dev/null`
40831
40832  if test "x$new_path" = x; then
40833    # Oops. Which didn't find the executable.
40834    # The splitting of arguments from the executable at a space might have been incorrect,
40835    # since paths with space are more likely in Windows. Give it another try with the whole
40836    # argument.
40837    path="$complete"
40838    arguments="EOL"
40839    new_path="$path"
40840
40841  windows_path="$new_path"
40842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40843    unix_path=`$CYGPATH -u "$windows_path"`
40844    new_path="$unix_path"
40845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40847    new_path="$unix_path"
40848  fi
40849
40850
40851    new_path=`$WHICH "$new_path" 2> /dev/null`
40852    # bat and cmd files are not always considered executable in MSYS causing which
40853    # to not find them
40854    if test "x$new_path" = x \
40855        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40856        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40857      new_path="$path"
40858
40859  windows_path="$new_path"
40860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40861    unix_path=`$CYGPATH -u "$windows_path"`
40862    new_path="$unix_path"
40863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40865    new_path="$unix_path"
40866  fi
40867
40868    fi
40869
40870    if test "x$new_path" = x; then
40871      # It's still not found. Now this is an unrecoverable error.
40872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40873$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40874      has_space=`$ECHO "$complete" | $GREP " "`
40875      if test "x$has_space" != x; then
40876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40878      fi
40879      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40880    fi
40881  fi
40882
40883  # Now new_path has a complete unix path to the binary
40884  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40885    # Keep paths in /bin as-is, but remove trailing .exe if any
40886    new_path="${new_path/%.exe/}"
40887    # Do not save /bin paths to all_fixpath_prefixes!
40888  else
40889    # Not in mixed or Windows style, start by that.
40890    new_path=`cmd //c echo $new_path`
40891
40892  input_path="$new_path"
40893  # Check if we need to convert this using DOS-style short mode. If the path
40894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40895  # take no chances and rewrite it.
40896  # Note: m4 eats our [], so we need to use [ and ] instead.
40897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40898  if test "x$has_forbidden_chars" != x; then
40899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40901  fi
40902
40903    # Output is in $new_path
40904
40905  windows_path="$new_path"
40906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40907    unix_path=`$CYGPATH -u "$windows_path"`
40908    new_path="$unix_path"
40909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40911    new_path="$unix_path"
40912  fi
40913
40914    # remove trailing .exe if any
40915    new_path="${new_path/%.exe/}"
40916
40917    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40918    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40919  fi
40920
40921    else
40922      # We're on a unix platform. Hooray! :)
40923      # First separate the path from the arguments. This will split at the first
40924      # space.
40925      complete="$GNM"
40926      path="${complete%% *}"
40927      tmp="$complete EOL"
40928      arguments="${tmp#* }"
40929
40930      # Cannot rely on the command "which" here since it doesn't always work.
40931      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40932      if test -z "$is_absolute_path"; then
40933        # Path to executable is not absolute. Find it.
40934        IFS_save="$IFS"
40935        IFS=:
40936        for p in $PATH; do
40937          if test -f "$p/$path" && test -x "$p/$path"; then
40938            new_path="$p/$path"
40939            break
40940          fi
40941        done
40942        IFS="$IFS_save"
40943      else
40944        # This is an absolute path, we can use it without further modifications.
40945        new_path="$path"
40946      fi
40947
40948      if test "x$new_path" = x; then
40949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40950$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40951        has_space=`$ECHO "$complete" | $GREP " "`
40952        if test "x$has_space" != x; then
40953          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40954$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40955        fi
40956        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40957      fi
40958    fi
40959
40960    # Now join together the path and the arguments once again
40961    if test "x$arguments" != xEOL; then
40962      new_complete="$new_path ${arguments% *}"
40963    else
40964      new_complete="$new_path"
40965    fi
40966
40967    if test "x$complete" != "x$new_complete"; then
40968      GNM="$new_complete"
40969      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40970$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40971    fi
40972  fi
40973
40974  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40975    # FIXME: we should unify this with the solaris case above.
40976
40977
40978  # Publish this variable in the help.
40979
40980
40981  if [ -z "${STRIP+x}" ]; then
40982    # The variable is not set by user, try to locate tool using the code snippet
40983    if test -n "$ac_tool_prefix"; then
40984  for ac_prog in strip
40985  do
40986    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40987set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40989$as_echo_n "checking for $ac_word... " >&6; }
40990if ${ac_cv_prog_STRIP+:} false; then :
40991  $as_echo_n "(cached) " >&6
40992else
40993  if test -n "$STRIP"; then
40994  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40995else
40996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40997for as_dir in $PATH
40998do
40999  IFS=$as_save_IFS
41000  test -z "$as_dir" && as_dir=.
41001    for ac_exec_ext in '' $ac_executable_extensions; do
41002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41003    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41005    break 2
41006  fi
41007done
41008  done
41009IFS=$as_save_IFS
41010
41011fi
41012fi
41013STRIP=$ac_cv_prog_STRIP
41014if test -n "$STRIP"; then
41015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41016$as_echo "$STRIP" >&6; }
41017else
41018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41019$as_echo "no" >&6; }
41020fi
41021
41022
41023    test -n "$STRIP" && break
41024  done
41025fi
41026if test -z "$STRIP"; then
41027  ac_ct_STRIP=$STRIP
41028  for ac_prog in strip
41029do
41030  # Extract the first word of "$ac_prog", so it can be a program name with args.
41031set dummy $ac_prog; ac_word=$2
41032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41033$as_echo_n "checking for $ac_word... " >&6; }
41034if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41035  $as_echo_n "(cached) " >&6
41036else
41037  if test -n "$ac_ct_STRIP"; then
41038  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41039else
41040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41041for as_dir in $PATH
41042do
41043  IFS=$as_save_IFS
41044  test -z "$as_dir" && as_dir=.
41045    for ac_exec_ext in '' $ac_executable_extensions; do
41046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41047    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41049    break 2
41050  fi
41051done
41052  done
41053IFS=$as_save_IFS
41054
41055fi
41056fi
41057ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41058if test -n "$ac_ct_STRIP"; then
41059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41060$as_echo "$ac_ct_STRIP" >&6; }
41061else
41062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41063$as_echo "no" >&6; }
41064fi
41065
41066
41067  test -n "$ac_ct_STRIP" && break
41068done
41069
41070  if test "x$ac_ct_STRIP" = x; then
41071    STRIP=""
41072  else
41073    case $cross_compiling:$ac_tool_warned in
41074yes:)
41075{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41076$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41077ac_tool_warned=yes ;;
41078esac
41079    STRIP=$ac_ct_STRIP
41080  fi
41081fi
41082
41083  else
41084    # The variable is set, but is it from the command line or the environment?
41085
41086    # Try to remove the string !STRIP! from our list.
41087    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41088    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41089      # If it failed, the variable was not from the command line. Ignore it,
41090      # but warn the user (except for BASH, which is always set by the calling BASH).
41091      if test "xSTRIP" != xBASH; then
41092        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41093$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41094      fi
41095      # Try to locate tool using the code snippet
41096      if test -n "$ac_tool_prefix"; then
41097  for ac_prog in strip
41098  do
41099    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41100set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41102$as_echo_n "checking for $ac_word... " >&6; }
41103if ${ac_cv_prog_STRIP+:} false; then :
41104  $as_echo_n "(cached) " >&6
41105else
41106  if test -n "$STRIP"; then
41107  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41108else
41109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41110for as_dir in $PATH
41111do
41112  IFS=$as_save_IFS
41113  test -z "$as_dir" && as_dir=.
41114    for ac_exec_ext in '' $ac_executable_extensions; do
41115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41116    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41118    break 2
41119  fi
41120done
41121  done
41122IFS=$as_save_IFS
41123
41124fi
41125fi
41126STRIP=$ac_cv_prog_STRIP
41127if test -n "$STRIP"; then
41128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41129$as_echo "$STRIP" >&6; }
41130else
41131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41132$as_echo "no" >&6; }
41133fi
41134
41135
41136    test -n "$STRIP" && break
41137  done
41138fi
41139if test -z "$STRIP"; then
41140  ac_ct_STRIP=$STRIP
41141  for ac_prog in strip
41142do
41143  # Extract the first word of "$ac_prog", so it can be a program name with args.
41144set dummy $ac_prog; ac_word=$2
41145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41146$as_echo_n "checking for $ac_word... " >&6; }
41147if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41148  $as_echo_n "(cached) " >&6
41149else
41150  if test -n "$ac_ct_STRIP"; then
41151  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41152else
41153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41154for as_dir in $PATH
41155do
41156  IFS=$as_save_IFS
41157  test -z "$as_dir" && as_dir=.
41158    for ac_exec_ext in '' $ac_executable_extensions; do
41159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41160    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41162    break 2
41163  fi
41164done
41165  done
41166IFS=$as_save_IFS
41167
41168fi
41169fi
41170ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41171if test -n "$ac_ct_STRIP"; then
41172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41173$as_echo "$ac_ct_STRIP" >&6; }
41174else
41175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41176$as_echo "no" >&6; }
41177fi
41178
41179
41180  test -n "$ac_ct_STRIP" && break
41181done
41182
41183  if test "x$ac_ct_STRIP" = x; then
41184    STRIP=""
41185  else
41186    case $cross_compiling:$ac_tool_warned in
41187yes:)
41188{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41189$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41190ac_tool_warned=yes ;;
41191esac
41192    STRIP=$ac_ct_STRIP
41193  fi
41194fi
41195
41196    else
41197      # If it succeeded, then it was overridden by the user. We will use it
41198      # for the tool.
41199
41200      # First remove it from the list of overridden variables, so we can test
41201      # for unknown variables in the end.
41202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41203
41204      # Check if we try to supply an empty value
41205      if test "x$STRIP" = x; then
41206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41207$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41209$as_echo_n "checking for STRIP... " >&6; }
41210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41211$as_echo "disabled" >&6; }
41212      else
41213        # Check if the provided tool contains a complete path.
41214        tool_specified="$STRIP"
41215        tool_basename="${tool_specified##*/}"
41216        if test "x$tool_basename" = "x$tool_specified"; then
41217          # A command without a complete path is provided, search $PATH.
41218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41219$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41220          # Extract the first word of "$tool_basename", so it can be a program name with args.
41221set dummy $tool_basename; ac_word=$2
41222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41223$as_echo_n "checking for $ac_word... " >&6; }
41224if ${ac_cv_path_STRIP+:} false; then :
41225  $as_echo_n "(cached) " >&6
41226else
41227  case $STRIP in
41228  [\\/]* | ?:[\\/]*)
41229  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41230  ;;
41231  *)
41232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41233for as_dir in $PATH
41234do
41235  IFS=$as_save_IFS
41236  test -z "$as_dir" && as_dir=.
41237    for ac_exec_ext in '' $ac_executable_extensions; do
41238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41239    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41241    break 2
41242  fi
41243done
41244  done
41245IFS=$as_save_IFS
41246
41247  ;;
41248esac
41249fi
41250STRIP=$ac_cv_path_STRIP
41251if test -n "$STRIP"; then
41252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41253$as_echo "$STRIP" >&6; }
41254else
41255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41256$as_echo "no" >&6; }
41257fi
41258
41259
41260          if test "x$STRIP" = x; then
41261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41262          fi
41263        else
41264          # Otherwise we believe it is a complete path. Use it as it is.
41265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41266$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41268$as_echo_n "checking for STRIP... " >&6; }
41269          if test ! -x "$tool_specified"; then
41270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41271$as_echo "not found" >&6; }
41272            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41273          fi
41274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41275$as_echo "$tool_specified" >&6; }
41276        fi
41277      fi
41278    fi
41279
41280  fi
41281
41282
41283
41284  # Only process if variable expands to non-empty
41285
41286  if test "x$STRIP" != x; then
41287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41288
41289  # First separate the path from the arguments. This will split at the first
41290  # space.
41291  complete="$STRIP"
41292  path="${complete%% *}"
41293  tmp="$complete EOL"
41294  arguments="${tmp#* }"
41295
41296  # Input might be given as Windows format, start by converting to
41297  # unix format.
41298  new_path=`$CYGPATH -u "$path"`
41299
41300  # Now try to locate executable using which
41301  new_path=`$WHICH "$new_path" 2> /dev/null`
41302  # bat and cmd files are not always considered executable in cygwin causing which
41303  # to not find them
41304  if test "x$new_path" = x \
41305      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41306      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41307    new_path=`$CYGPATH -u "$path"`
41308  fi
41309  if test "x$new_path" = x; then
41310    # Oops. Which didn't find the executable.
41311    # The splitting of arguments from the executable at a space might have been incorrect,
41312    # since paths with space are more likely in Windows. Give it another try with the whole
41313    # argument.
41314    path="$complete"
41315    arguments="EOL"
41316    new_path=`$CYGPATH -u "$path"`
41317    new_path=`$WHICH "$new_path" 2> /dev/null`
41318    # bat and cmd files are not always considered executable in cygwin causing which
41319    # to not find them
41320    if test "x$new_path" = x \
41321        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41322        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41323      new_path=`$CYGPATH -u "$path"`
41324    fi
41325    if test "x$new_path" = x; then
41326      # It's still not found. Now this is an unrecoverable error.
41327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41328$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41329      has_space=`$ECHO "$complete" | $GREP " "`
41330      if test "x$has_space" != x; then
41331        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41332$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41333      fi
41334      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41335    fi
41336  fi
41337
41338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41341  # "foo.exe" is OK but "foo" is an error.
41342  #
41343  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41344  # It is also a way to make sure we got the proper file name for the real test later on.
41345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41346  if test "x$test_shortpath" = x; then
41347    # Short path failed, file does not exist as specified.
41348    # Try adding .exe or .cmd
41349    if test -f "${new_path}.exe"; then
41350      input_to_shortpath="${new_path}.exe"
41351    elif test -f "${new_path}.cmd"; then
41352      input_to_shortpath="${new_path}.cmd"
41353    else
41354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41355$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41356      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41357$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41358      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41359    fi
41360  else
41361    input_to_shortpath="$new_path"
41362  fi
41363
41364  # Call helper function which possibly converts this using DOS-style short mode.
41365  # If so, the updated path is stored in $new_path.
41366  new_path="$input_to_shortpath"
41367
41368  input_path="$input_to_shortpath"
41369  # Check if we need to convert this using DOS-style short mode. If the path
41370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41371  # take no chances and rewrite it.
41372  # Note: m4 eats our [], so we need to use [ and ] instead.
41373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41374  if test "x$has_forbidden_chars" != x; then
41375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41379      # Going to short mode and back again did indeed matter. Since short mode is
41380      # case insensitive, let's make it lowercase to improve readability.
41381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41382      # Now convert it back to Unix-style (cygpath)
41383      input_path=`$CYGPATH -u "$shortmode_path"`
41384      new_path="$input_path"
41385    fi
41386  fi
41387
41388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41389  if test "x$test_cygdrive_prefix" = x; then
41390    # As a simple fix, exclude /usr/bin since it's not a real path.
41391    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41393      # a path prefixed by /cygdrive for fixpath to work.
41394      new_path="$CYGWIN_ROOT_PATH$input_path"
41395    fi
41396  fi
41397
41398  # remove trailing .exe if any
41399  new_path="${new_path/%.exe/}"
41400
41401    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41402
41403  # First separate the path from the arguments. This will split at the first
41404  # space.
41405  complete="$STRIP"
41406  path="${complete%% *}"
41407  tmp="$complete EOL"
41408  arguments="${tmp#* }"
41409
41410  # Input might be given as Windows format, start by converting to
41411  # unix format.
41412  new_path="$path"
41413
41414  windows_path="$new_path"
41415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41416    unix_path=`$CYGPATH -u "$windows_path"`
41417    new_path="$unix_path"
41418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41420    new_path="$unix_path"
41421  fi
41422
41423
41424  # Now try to locate executable using which
41425  new_path=`$WHICH "$new_path" 2> /dev/null`
41426
41427  if test "x$new_path" = x; then
41428    # Oops. Which didn't find the executable.
41429    # The splitting of arguments from the executable at a space might have been incorrect,
41430    # since paths with space are more likely in Windows. Give it another try with the whole
41431    # argument.
41432    path="$complete"
41433    arguments="EOL"
41434    new_path="$path"
41435
41436  windows_path="$new_path"
41437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41438    unix_path=`$CYGPATH -u "$windows_path"`
41439    new_path="$unix_path"
41440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41442    new_path="$unix_path"
41443  fi
41444
41445
41446    new_path=`$WHICH "$new_path" 2> /dev/null`
41447    # bat and cmd files are not always considered executable in MSYS causing which
41448    # to not find them
41449    if test "x$new_path" = x \
41450        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41451        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41452      new_path="$path"
41453
41454  windows_path="$new_path"
41455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41456    unix_path=`$CYGPATH -u "$windows_path"`
41457    new_path="$unix_path"
41458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41460    new_path="$unix_path"
41461  fi
41462
41463    fi
41464
41465    if test "x$new_path" = x; then
41466      # It's still not found. Now this is an unrecoverable error.
41467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41468$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41469      has_space=`$ECHO "$complete" | $GREP " "`
41470      if test "x$has_space" != x; then
41471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41473      fi
41474      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41475    fi
41476  fi
41477
41478  # Now new_path has a complete unix path to the binary
41479  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41480    # Keep paths in /bin as-is, but remove trailing .exe if any
41481    new_path="${new_path/%.exe/}"
41482    # Do not save /bin paths to all_fixpath_prefixes!
41483  else
41484    # Not in mixed or Windows style, start by that.
41485    new_path=`cmd //c echo $new_path`
41486
41487  input_path="$new_path"
41488  # Check if we need to convert this using DOS-style short mode. If the path
41489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41490  # take no chances and rewrite it.
41491  # Note: m4 eats our [], so we need to use [ and ] instead.
41492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41493  if test "x$has_forbidden_chars" != x; then
41494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41496  fi
41497
41498    # Output is in $new_path
41499
41500  windows_path="$new_path"
41501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41502    unix_path=`$CYGPATH -u "$windows_path"`
41503    new_path="$unix_path"
41504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41506    new_path="$unix_path"
41507  fi
41508
41509    # remove trailing .exe if any
41510    new_path="${new_path/%.exe/}"
41511
41512    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41513    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41514  fi
41515
41516    else
41517      # We're on a unix platform. Hooray! :)
41518      # First separate the path from the arguments. This will split at the first
41519      # space.
41520      complete="$STRIP"
41521      path="${complete%% *}"
41522      tmp="$complete EOL"
41523      arguments="${tmp#* }"
41524
41525      # Cannot rely on the command "which" here since it doesn't always work.
41526      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41527      if test -z "$is_absolute_path"; then
41528        # Path to executable is not absolute. Find it.
41529        IFS_save="$IFS"
41530        IFS=:
41531        for p in $PATH; do
41532          if test -f "$p/$path" && test -x "$p/$path"; then
41533            new_path="$p/$path"
41534            break
41535          fi
41536        done
41537        IFS="$IFS_save"
41538      else
41539        # This is an absolute path, we can use it without further modifications.
41540        new_path="$path"
41541      fi
41542
41543      if test "x$new_path" = x; then
41544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41545$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41546        has_space=`$ECHO "$complete" | $GREP " "`
41547        if test "x$has_space" != x; then
41548          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41549$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41550        fi
41551        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41552      fi
41553    fi
41554
41555    # Now join together the path and the arguments once again
41556    if test "x$arguments" != xEOL; then
41557      new_complete="$new_path ${arguments% *}"
41558    else
41559      new_complete="$new_path"
41560    fi
41561
41562    if test "x$complete" != "x$new_complete"; then
41563      STRIP="$new_complete"
41564      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41565$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41566    fi
41567  fi
41568
41569    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41570
41571
41572  # Publish this variable in the help.
41573
41574
41575  if [ -z "${NM+x}" ]; then
41576    # The variable is not set by user, try to locate tool using the code snippet
41577    if test -n "$ac_tool_prefix"; then
41578  for ac_prog in nm gcc-nm
41579  do
41580    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41581set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41583$as_echo_n "checking for $ac_word... " >&6; }
41584if ${ac_cv_prog_NM+:} false; then :
41585  $as_echo_n "(cached) " >&6
41586else
41587  if test -n "$NM"; then
41588  ac_cv_prog_NM="$NM" # Let the user override the test.
41589else
41590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41591for as_dir in $PATH
41592do
41593  IFS=$as_save_IFS
41594  test -z "$as_dir" && as_dir=.
41595    for ac_exec_ext in '' $ac_executable_extensions; do
41596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41597    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41599    break 2
41600  fi
41601done
41602  done
41603IFS=$as_save_IFS
41604
41605fi
41606fi
41607NM=$ac_cv_prog_NM
41608if test -n "$NM"; then
41609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41610$as_echo "$NM" >&6; }
41611else
41612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41613$as_echo "no" >&6; }
41614fi
41615
41616
41617    test -n "$NM" && break
41618  done
41619fi
41620if test -z "$NM"; then
41621  ac_ct_NM=$NM
41622  for ac_prog in nm gcc-nm
41623do
41624  # Extract the first word of "$ac_prog", so it can be a program name with args.
41625set dummy $ac_prog; ac_word=$2
41626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41627$as_echo_n "checking for $ac_word... " >&6; }
41628if ${ac_cv_prog_ac_ct_NM+:} false; then :
41629  $as_echo_n "(cached) " >&6
41630else
41631  if test -n "$ac_ct_NM"; then
41632  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41633else
41634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41635for as_dir in $PATH
41636do
41637  IFS=$as_save_IFS
41638  test -z "$as_dir" && as_dir=.
41639    for ac_exec_ext in '' $ac_executable_extensions; do
41640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41641    ac_cv_prog_ac_ct_NM="$ac_prog"
41642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41643    break 2
41644  fi
41645done
41646  done
41647IFS=$as_save_IFS
41648
41649fi
41650fi
41651ac_ct_NM=$ac_cv_prog_ac_ct_NM
41652if test -n "$ac_ct_NM"; then
41653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41654$as_echo "$ac_ct_NM" >&6; }
41655else
41656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41657$as_echo "no" >&6; }
41658fi
41659
41660
41661  test -n "$ac_ct_NM" && break
41662done
41663
41664  if test "x$ac_ct_NM" = x; then
41665    NM=""
41666  else
41667    case $cross_compiling:$ac_tool_warned in
41668yes:)
41669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41671ac_tool_warned=yes ;;
41672esac
41673    NM=$ac_ct_NM
41674  fi
41675fi
41676
41677  else
41678    # The variable is set, but is it from the command line or the environment?
41679
41680    # Try to remove the string !NM! from our list.
41681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41683      # If it failed, the variable was not from the command line. Ignore it,
41684      # but warn the user (except for BASH, which is always set by the calling BASH).
41685      if test "xNM" != xBASH; then
41686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41687$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41688      fi
41689      # Try to locate tool using the code snippet
41690      if test -n "$ac_tool_prefix"; then
41691  for ac_prog in nm gcc-nm
41692  do
41693    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41694set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41696$as_echo_n "checking for $ac_word... " >&6; }
41697if ${ac_cv_prog_NM+:} false; then :
41698  $as_echo_n "(cached) " >&6
41699else
41700  if test -n "$NM"; then
41701  ac_cv_prog_NM="$NM" # Let the user override the test.
41702else
41703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41704for as_dir in $PATH
41705do
41706  IFS=$as_save_IFS
41707  test -z "$as_dir" && as_dir=.
41708    for ac_exec_ext in '' $ac_executable_extensions; do
41709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41710    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41712    break 2
41713  fi
41714done
41715  done
41716IFS=$as_save_IFS
41717
41718fi
41719fi
41720NM=$ac_cv_prog_NM
41721if test -n "$NM"; then
41722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41723$as_echo "$NM" >&6; }
41724else
41725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41726$as_echo "no" >&6; }
41727fi
41728
41729
41730    test -n "$NM" && break
41731  done
41732fi
41733if test -z "$NM"; then
41734  ac_ct_NM=$NM
41735  for ac_prog in nm gcc-nm
41736do
41737  # Extract the first word of "$ac_prog", so it can be a program name with args.
41738set dummy $ac_prog; ac_word=$2
41739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41740$as_echo_n "checking for $ac_word... " >&6; }
41741if ${ac_cv_prog_ac_ct_NM+:} false; then :
41742  $as_echo_n "(cached) " >&6
41743else
41744  if test -n "$ac_ct_NM"; then
41745  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41746else
41747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41748for as_dir in $PATH
41749do
41750  IFS=$as_save_IFS
41751  test -z "$as_dir" && as_dir=.
41752    for ac_exec_ext in '' $ac_executable_extensions; do
41753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41754    ac_cv_prog_ac_ct_NM="$ac_prog"
41755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41756    break 2
41757  fi
41758done
41759  done
41760IFS=$as_save_IFS
41761
41762fi
41763fi
41764ac_ct_NM=$ac_cv_prog_ac_ct_NM
41765if test -n "$ac_ct_NM"; then
41766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41767$as_echo "$ac_ct_NM" >&6; }
41768else
41769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41770$as_echo "no" >&6; }
41771fi
41772
41773
41774  test -n "$ac_ct_NM" && break
41775done
41776
41777  if test "x$ac_ct_NM" = x; then
41778    NM=""
41779  else
41780    case $cross_compiling:$ac_tool_warned in
41781yes:)
41782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41784ac_tool_warned=yes ;;
41785esac
41786    NM=$ac_ct_NM
41787  fi
41788fi
41789
41790    else
41791      # If it succeeded, then it was overridden by the user. We will use it
41792      # for the tool.
41793
41794      # First remove it from the list of overridden variables, so we can test
41795      # for unknown variables in the end.
41796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41797
41798      # Check if we try to supply an empty value
41799      if test "x$NM" = x; then
41800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41801$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41803$as_echo_n "checking for NM... " >&6; }
41804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41805$as_echo "disabled" >&6; }
41806      else
41807        # Check if the provided tool contains a complete path.
41808        tool_specified="$NM"
41809        tool_basename="${tool_specified##*/}"
41810        if test "x$tool_basename" = "x$tool_specified"; then
41811          # A command without a complete path is provided, search $PATH.
41812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41813$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41814          # Extract the first word of "$tool_basename", so it can be a program name with args.
41815set dummy $tool_basename; ac_word=$2
41816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41817$as_echo_n "checking for $ac_word... " >&6; }
41818if ${ac_cv_path_NM+:} false; then :
41819  $as_echo_n "(cached) " >&6
41820else
41821  case $NM in
41822  [\\/]* | ?:[\\/]*)
41823  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41824  ;;
41825  *)
41826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41827for as_dir in $PATH
41828do
41829  IFS=$as_save_IFS
41830  test -z "$as_dir" && as_dir=.
41831    for ac_exec_ext in '' $ac_executable_extensions; do
41832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41833    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41835    break 2
41836  fi
41837done
41838  done
41839IFS=$as_save_IFS
41840
41841  ;;
41842esac
41843fi
41844NM=$ac_cv_path_NM
41845if test -n "$NM"; then
41846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41847$as_echo "$NM" >&6; }
41848else
41849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41850$as_echo "no" >&6; }
41851fi
41852
41853
41854          if test "x$NM" = x; then
41855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41856          fi
41857        else
41858          # Otherwise we believe it is a complete path. Use it as it is.
41859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41860$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41862$as_echo_n "checking for NM... " >&6; }
41863          if test ! -x "$tool_specified"; then
41864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41865$as_echo "not found" >&6; }
41866            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41867          fi
41868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41869$as_echo "$tool_specified" >&6; }
41870        fi
41871      fi
41872    fi
41873
41874  fi
41875
41876
41877    else
41878
41879
41880  # Publish this variable in the help.
41881
41882
41883  if [ -z "${NM+x}" ]; then
41884    # The variable is not set by user, try to locate tool using the code snippet
41885    if test -n "$ac_tool_prefix"; then
41886  for ac_prog in nm
41887  do
41888    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41889set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41891$as_echo_n "checking for $ac_word... " >&6; }
41892if ${ac_cv_prog_NM+:} false; then :
41893  $as_echo_n "(cached) " >&6
41894else
41895  if test -n "$NM"; then
41896  ac_cv_prog_NM="$NM" # Let the user override the test.
41897else
41898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41899for as_dir in $PATH
41900do
41901  IFS=$as_save_IFS
41902  test -z "$as_dir" && as_dir=.
41903    for ac_exec_ext in '' $ac_executable_extensions; do
41904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41905    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41907    break 2
41908  fi
41909done
41910  done
41911IFS=$as_save_IFS
41912
41913fi
41914fi
41915NM=$ac_cv_prog_NM
41916if test -n "$NM"; then
41917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41918$as_echo "$NM" >&6; }
41919else
41920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41921$as_echo "no" >&6; }
41922fi
41923
41924
41925    test -n "$NM" && break
41926  done
41927fi
41928if test -z "$NM"; then
41929  ac_ct_NM=$NM
41930  for ac_prog in nm
41931do
41932  # Extract the first word of "$ac_prog", so it can be a program name with args.
41933set dummy $ac_prog; ac_word=$2
41934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41935$as_echo_n "checking for $ac_word... " >&6; }
41936if ${ac_cv_prog_ac_ct_NM+:} false; then :
41937  $as_echo_n "(cached) " >&6
41938else
41939  if test -n "$ac_ct_NM"; then
41940  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41941else
41942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41943for as_dir in $PATH
41944do
41945  IFS=$as_save_IFS
41946  test -z "$as_dir" && as_dir=.
41947    for ac_exec_ext in '' $ac_executable_extensions; do
41948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41949    ac_cv_prog_ac_ct_NM="$ac_prog"
41950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41951    break 2
41952  fi
41953done
41954  done
41955IFS=$as_save_IFS
41956
41957fi
41958fi
41959ac_ct_NM=$ac_cv_prog_ac_ct_NM
41960if test -n "$ac_ct_NM"; then
41961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41962$as_echo "$ac_ct_NM" >&6; }
41963else
41964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41965$as_echo "no" >&6; }
41966fi
41967
41968
41969  test -n "$ac_ct_NM" && break
41970done
41971
41972  if test "x$ac_ct_NM" = x; then
41973    NM=""
41974  else
41975    case $cross_compiling:$ac_tool_warned in
41976yes:)
41977{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41978$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41979ac_tool_warned=yes ;;
41980esac
41981    NM=$ac_ct_NM
41982  fi
41983fi
41984
41985  else
41986    # The variable is set, but is it from the command line or the environment?
41987
41988    # Try to remove the string !NM! from our list.
41989    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41990    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41991      # If it failed, the variable was not from the command line. Ignore it,
41992      # but warn the user (except for BASH, which is always set by the calling BASH).
41993      if test "xNM" != xBASH; then
41994        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41995$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41996      fi
41997      # Try to locate tool using the code snippet
41998      if test -n "$ac_tool_prefix"; then
41999  for ac_prog in nm
42000  do
42001    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42002set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42004$as_echo_n "checking for $ac_word... " >&6; }
42005if ${ac_cv_prog_NM+:} false; then :
42006  $as_echo_n "(cached) " >&6
42007else
42008  if test -n "$NM"; then
42009  ac_cv_prog_NM="$NM" # Let the user override the test.
42010else
42011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42012for as_dir in $PATH
42013do
42014  IFS=$as_save_IFS
42015  test -z "$as_dir" && as_dir=.
42016    for ac_exec_ext in '' $ac_executable_extensions; do
42017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42018    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42020    break 2
42021  fi
42022done
42023  done
42024IFS=$as_save_IFS
42025
42026fi
42027fi
42028NM=$ac_cv_prog_NM
42029if test -n "$NM"; then
42030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42031$as_echo "$NM" >&6; }
42032else
42033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42034$as_echo "no" >&6; }
42035fi
42036
42037
42038    test -n "$NM" && break
42039  done
42040fi
42041if test -z "$NM"; then
42042  ac_ct_NM=$NM
42043  for ac_prog in nm
42044do
42045  # Extract the first word of "$ac_prog", so it can be a program name with args.
42046set dummy $ac_prog; ac_word=$2
42047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42048$as_echo_n "checking for $ac_word... " >&6; }
42049if ${ac_cv_prog_ac_ct_NM+:} false; then :
42050  $as_echo_n "(cached) " >&6
42051else
42052  if test -n "$ac_ct_NM"; then
42053  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42054else
42055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42056for as_dir in $PATH
42057do
42058  IFS=$as_save_IFS
42059  test -z "$as_dir" && as_dir=.
42060    for ac_exec_ext in '' $ac_executable_extensions; do
42061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42062    ac_cv_prog_ac_ct_NM="$ac_prog"
42063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42064    break 2
42065  fi
42066done
42067  done
42068IFS=$as_save_IFS
42069
42070fi
42071fi
42072ac_ct_NM=$ac_cv_prog_ac_ct_NM
42073if test -n "$ac_ct_NM"; then
42074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42075$as_echo "$ac_ct_NM" >&6; }
42076else
42077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42078$as_echo "no" >&6; }
42079fi
42080
42081
42082  test -n "$ac_ct_NM" && break
42083done
42084
42085  if test "x$ac_ct_NM" = x; then
42086    NM=""
42087  else
42088    case $cross_compiling:$ac_tool_warned in
42089yes:)
42090{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42091$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42092ac_tool_warned=yes ;;
42093esac
42094    NM=$ac_ct_NM
42095  fi
42096fi
42097
42098    else
42099      # If it succeeded, then it was overridden by the user. We will use it
42100      # for the tool.
42101
42102      # First remove it from the list of overridden variables, so we can test
42103      # for unknown variables in the end.
42104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42105
42106      # Check if we try to supply an empty value
42107      if test "x$NM" = x; then
42108        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42109$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42111$as_echo_n "checking for NM... " >&6; }
42112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42113$as_echo "disabled" >&6; }
42114      else
42115        # Check if the provided tool contains a complete path.
42116        tool_specified="$NM"
42117        tool_basename="${tool_specified##*/}"
42118        if test "x$tool_basename" = "x$tool_specified"; then
42119          # A command without a complete path is provided, search $PATH.
42120          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42121$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42122          # Extract the first word of "$tool_basename", so it can be a program name with args.
42123set dummy $tool_basename; ac_word=$2
42124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42125$as_echo_n "checking for $ac_word... " >&6; }
42126if ${ac_cv_path_NM+:} false; then :
42127  $as_echo_n "(cached) " >&6
42128else
42129  case $NM in
42130  [\\/]* | ?:[\\/]*)
42131  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42132  ;;
42133  *)
42134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42135for as_dir in $PATH
42136do
42137  IFS=$as_save_IFS
42138  test -z "$as_dir" && as_dir=.
42139    for ac_exec_ext in '' $ac_executable_extensions; do
42140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42141    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42143    break 2
42144  fi
42145done
42146  done
42147IFS=$as_save_IFS
42148
42149  ;;
42150esac
42151fi
42152NM=$ac_cv_path_NM
42153if test -n "$NM"; then
42154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42155$as_echo "$NM" >&6; }
42156else
42157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42158$as_echo "no" >&6; }
42159fi
42160
42161
42162          if test "x$NM" = x; then
42163            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42164          fi
42165        else
42166          # Otherwise we believe it is a complete path. Use it as it is.
42167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42168$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42169          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42170$as_echo_n "checking for NM... " >&6; }
42171          if test ! -x "$tool_specified"; then
42172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42173$as_echo "not found" >&6; }
42174            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42175          fi
42176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42177$as_echo "$tool_specified" >&6; }
42178        fi
42179      fi
42180    fi
42181
42182  fi
42183
42184
42185    fi
42186
42187  # Only process if variable expands to non-empty
42188
42189  if test "x$NM" != x; then
42190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42191
42192  # First separate the path from the arguments. This will split at the first
42193  # space.
42194  complete="$NM"
42195  path="${complete%% *}"
42196  tmp="$complete EOL"
42197  arguments="${tmp#* }"
42198
42199  # Input might be given as Windows format, start by converting to
42200  # unix format.
42201  new_path=`$CYGPATH -u "$path"`
42202
42203  # Now try to locate executable using which
42204  new_path=`$WHICH "$new_path" 2> /dev/null`
42205  # bat and cmd files are not always considered executable in cygwin causing which
42206  # to not find them
42207  if test "x$new_path" = x \
42208      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42209      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42210    new_path=`$CYGPATH -u "$path"`
42211  fi
42212  if test "x$new_path" = x; then
42213    # Oops. Which didn't find the executable.
42214    # The splitting of arguments from the executable at a space might have been incorrect,
42215    # since paths with space are more likely in Windows. Give it another try with the whole
42216    # argument.
42217    path="$complete"
42218    arguments="EOL"
42219    new_path=`$CYGPATH -u "$path"`
42220    new_path=`$WHICH "$new_path" 2> /dev/null`
42221    # bat and cmd files are not always considered executable in cygwin causing which
42222    # to not find them
42223    if test "x$new_path" = x \
42224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42226      new_path=`$CYGPATH -u "$path"`
42227    fi
42228    if test "x$new_path" = x; then
42229      # It's still not found. Now this is an unrecoverable error.
42230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42231$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42232      has_space=`$ECHO "$complete" | $GREP " "`
42233      if test "x$has_space" != x; then
42234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42236      fi
42237      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42238    fi
42239  fi
42240
42241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42244  # "foo.exe" is OK but "foo" is an error.
42245  #
42246  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42247  # It is also a way to make sure we got the proper file name for the real test later on.
42248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42249  if test "x$test_shortpath" = x; then
42250    # Short path failed, file does not exist as specified.
42251    # Try adding .exe or .cmd
42252    if test -f "${new_path}.exe"; then
42253      input_to_shortpath="${new_path}.exe"
42254    elif test -f "${new_path}.cmd"; then
42255      input_to_shortpath="${new_path}.cmd"
42256    else
42257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42258$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42259      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42260$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42261      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42262    fi
42263  else
42264    input_to_shortpath="$new_path"
42265  fi
42266
42267  # Call helper function which possibly converts this using DOS-style short mode.
42268  # If so, the updated path is stored in $new_path.
42269  new_path="$input_to_shortpath"
42270
42271  input_path="$input_to_shortpath"
42272  # Check if we need to convert this using DOS-style short mode. If the path
42273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42274  # take no chances and rewrite it.
42275  # Note: m4 eats our [], so we need to use [ and ] instead.
42276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42277  if test "x$has_forbidden_chars" != x; then
42278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42282      # Going to short mode and back again did indeed matter. Since short mode is
42283      # case insensitive, let's make it lowercase to improve readability.
42284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42285      # Now convert it back to Unix-style (cygpath)
42286      input_path=`$CYGPATH -u "$shortmode_path"`
42287      new_path="$input_path"
42288    fi
42289  fi
42290
42291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42292  if test "x$test_cygdrive_prefix" = x; then
42293    # As a simple fix, exclude /usr/bin since it's not a real path.
42294    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42296      # a path prefixed by /cygdrive for fixpath to work.
42297      new_path="$CYGWIN_ROOT_PATH$input_path"
42298    fi
42299  fi
42300
42301  # remove trailing .exe if any
42302  new_path="${new_path/%.exe/}"
42303
42304    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42305
42306  # First separate the path from the arguments. This will split at the first
42307  # space.
42308  complete="$NM"
42309  path="${complete%% *}"
42310  tmp="$complete EOL"
42311  arguments="${tmp#* }"
42312
42313  # Input might be given as Windows format, start by converting to
42314  # unix format.
42315  new_path="$path"
42316
42317  windows_path="$new_path"
42318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42319    unix_path=`$CYGPATH -u "$windows_path"`
42320    new_path="$unix_path"
42321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42323    new_path="$unix_path"
42324  fi
42325
42326
42327  # Now try to locate executable using which
42328  new_path=`$WHICH "$new_path" 2> /dev/null`
42329
42330  if test "x$new_path" = x; then
42331    # Oops. Which didn't find the executable.
42332    # The splitting of arguments from the executable at a space might have been incorrect,
42333    # since paths with space are more likely in Windows. Give it another try with the whole
42334    # argument.
42335    path="$complete"
42336    arguments="EOL"
42337    new_path="$path"
42338
42339  windows_path="$new_path"
42340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42341    unix_path=`$CYGPATH -u "$windows_path"`
42342    new_path="$unix_path"
42343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42345    new_path="$unix_path"
42346  fi
42347
42348
42349    new_path=`$WHICH "$new_path" 2> /dev/null`
42350    # bat and cmd files are not always considered executable in MSYS causing which
42351    # to not find them
42352    if test "x$new_path" = x \
42353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42355      new_path="$path"
42356
42357  windows_path="$new_path"
42358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42359    unix_path=`$CYGPATH -u "$windows_path"`
42360    new_path="$unix_path"
42361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42363    new_path="$unix_path"
42364  fi
42365
42366    fi
42367
42368    if test "x$new_path" = x; then
42369      # It's still not found. Now this is an unrecoverable error.
42370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42371$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42372      has_space=`$ECHO "$complete" | $GREP " "`
42373      if test "x$has_space" != x; then
42374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42376      fi
42377      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42378    fi
42379  fi
42380
42381  # Now new_path has a complete unix path to the binary
42382  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42383    # Keep paths in /bin as-is, but remove trailing .exe if any
42384    new_path="${new_path/%.exe/}"
42385    # Do not save /bin paths to all_fixpath_prefixes!
42386  else
42387    # Not in mixed or Windows style, start by that.
42388    new_path=`cmd //c echo $new_path`
42389
42390  input_path="$new_path"
42391  # Check if we need to convert this using DOS-style short mode. If the path
42392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42393  # take no chances and rewrite it.
42394  # Note: m4 eats our [], so we need to use [ and ] instead.
42395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42396  if test "x$has_forbidden_chars" != x; then
42397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42399  fi
42400
42401    # Output is in $new_path
42402
42403  windows_path="$new_path"
42404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42405    unix_path=`$CYGPATH -u "$windows_path"`
42406    new_path="$unix_path"
42407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42409    new_path="$unix_path"
42410  fi
42411
42412    # remove trailing .exe if any
42413    new_path="${new_path/%.exe/}"
42414
42415    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42416    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42417  fi
42418
42419    else
42420      # We're on a unix platform. Hooray! :)
42421      # First separate the path from the arguments. This will split at the first
42422      # space.
42423      complete="$NM"
42424      path="${complete%% *}"
42425      tmp="$complete EOL"
42426      arguments="${tmp#* }"
42427
42428      # Cannot rely on the command "which" here since it doesn't always work.
42429      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42430      if test -z "$is_absolute_path"; then
42431        # Path to executable is not absolute. Find it.
42432        IFS_save="$IFS"
42433        IFS=:
42434        for p in $PATH; do
42435          if test -f "$p/$path" && test -x "$p/$path"; then
42436            new_path="$p/$path"
42437            break
42438          fi
42439        done
42440        IFS="$IFS_save"
42441      else
42442        # This is an absolute path, we can use it without further modifications.
42443        new_path="$path"
42444      fi
42445
42446      if test "x$new_path" = x; then
42447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42448$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42449        has_space=`$ECHO "$complete" | $GREP " "`
42450        if test "x$has_space" != x; then
42451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42453        fi
42454        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42455      fi
42456    fi
42457
42458    # Now join together the path and the arguments once again
42459    if test "x$arguments" != xEOL; then
42460      new_complete="$new_path ${arguments% *}"
42461    else
42462      new_complete="$new_path"
42463    fi
42464
42465    if test "x$complete" != "x$new_complete"; then
42466      NM="$new_complete"
42467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42468$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42469    fi
42470  fi
42471
42472    GNM="$NM"
42473
42474  fi
42475
42476  # objcopy is used for moving debug symbols to separate files when
42477  # full debug symbols are enabled.
42478  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42479
42480
42481  # Publish this variable in the help.
42482
42483
42484  if [ -z "${OBJCOPY+x}" ]; then
42485    # The variable is not set by user, try to locate tool using the code snippet
42486    if test -n "$ac_tool_prefix"; then
42487  for ac_prog in gobjcopy objcopy
42488  do
42489    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42490set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42492$as_echo_n "checking for $ac_word... " >&6; }
42493if ${ac_cv_prog_OBJCOPY+:} false; then :
42494  $as_echo_n "(cached) " >&6
42495else
42496  if test -n "$OBJCOPY"; then
42497  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42498else
42499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42500for as_dir in $PATH
42501do
42502  IFS=$as_save_IFS
42503  test -z "$as_dir" && as_dir=.
42504    for ac_exec_ext in '' $ac_executable_extensions; do
42505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42506    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42508    break 2
42509  fi
42510done
42511  done
42512IFS=$as_save_IFS
42513
42514fi
42515fi
42516OBJCOPY=$ac_cv_prog_OBJCOPY
42517if test -n "$OBJCOPY"; then
42518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42519$as_echo "$OBJCOPY" >&6; }
42520else
42521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42522$as_echo "no" >&6; }
42523fi
42524
42525
42526    test -n "$OBJCOPY" && break
42527  done
42528fi
42529if test -z "$OBJCOPY"; then
42530  ac_ct_OBJCOPY=$OBJCOPY
42531  for ac_prog in gobjcopy objcopy
42532do
42533  # Extract the first word of "$ac_prog", so it can be a program name with args.
42534set dummy $ac_prog; ac_word=$2
42535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42536$as_echo_n "checking for $ac_word... " >&6; }
42537if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42538  $as_echo_n "(cached) " >&6
42539else
42540  if test -n "$ac_ct_OBJCOPY"; then
42541  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42542else
42543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42544for as_dir in $PATH
42545do
42546  IFS=$as_save_IFS
42547  test -z "$as_dir" && as_dir=.
42548    for ac_exec_ext in '' $ac_executable_extensions; do
42549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42550    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42552    break 2
42553  fi
42554done
42555  done
42556IFS=$as_save_IFS
42557
42558fi
42559fi
42560ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42561if test -n "$ac_ct_OBJCOPY"; then
42562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42563$as_echo "$ac_ct_OBJCOPY" >&6; }
42564else
42565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42566$as_echo "no" >&6; }
42567fi
42568
42569
42570  test -n "$ac_ct_OBJCOPY" && break
42571done
42572
42573  if test "x$ac_ct_OBJCOPY" = x; then
42574    OBJCOPY=""
42575  else
42576    case $cross_compiling:$ac_tool_warned in
42577yes:)
42578{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42579$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42580ac_tool_warned=yes ;;
42581esac
42582    OBJCOPY=$ac_ct_OBJCOPY
42583  fi
42584fi
42585
42586  else
42587    # The variable is set, but is it from the command line or the environment?
42588
42589    # Try to remove the string !OBJCOPY! from our list.
42590    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42591    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42592      # If it failed, the variable was not from the command line. Ignore it,
42593      # but warn the user (except for BASH, which is always set by the calling BASH).
42594      if test "xOBJCOPY" != xBASH; then
42595        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42596$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42597      fi
42598      # Try to locate tool using the code snippet
42599      if test -n "$ac_tool_prefix"; then
42600  for ac_prog in gobjcopy objcopy
42601  do
42602    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42603set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42605$as_echo_n "checking for $ac_word... " >&6; }
42606if ${ac_cv_prog_OBJCOPY+:} false; then :
42607  $as_echo_n "(cached) " >&6
42608else
42609  if test -n "$OBJCOPY"; then
42610  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42611else
42612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42613for as_dir in $PATH
42614do
42615  IFS=$as_save_IFS
42616  test -z "$as_dir" && as_dir=.
42617    for ac_exec_ext in '' $ac_executable_extensions; do
42618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42619    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42621    break 2
42622  fi
42623done
42624  done
42625IFS=$as_save_IFS
42626
42627fi
42628fi
42629OBJCOPY=$ac_cv_prog_OBJCOPY
42630if test -n "$OBJCOPY"; then
42631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42632$as_echo "$OBJCOPY" >&6; }
42633else
42634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42635$as_echo "no" >&6; }
42636fi
42637
42638
42639    test -n "$OBJCOPY" && break
42640  done
42641fi
42642if test -z "$OBJCOPY"; then
42643  ac_ct_OBJCOPY=$OBJCOPY
42644  for ac_prog in gobjcopy objcopy
42645do
42646  # Extract the first word of "$ac_prog", so it can be a program name with args.
42647set dummy $ac_prog; ac_word=$2
42648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42649$as_echo_n "checking for $ac_word... " >&6; }
42650if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42651  $as_echo_n "(cached) " >&6
42652else
42653  if test -n "$ac_ct_OBJCOPY"; then
42654  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42655else
42656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42657for as_dir in $PATH
42658do
42659  IFS=$as_save_IFS
42660  test -z "$as_dir" && as_dir=.
42661    for ac_exec_ext in '' $ac_executable_extensions; do
42662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42663    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42665    break 2
42666  fi
42667done
42668  done
42669IFS=$as_save_IFS
42670
42671fi
42672fi
42673ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42674if test -n "$ac_ct_OBJCOPY"; then
42675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42676$as_echo "$ac_ct_OBJCOPY" >&6; }
42677else
42678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42679$as_echo "no" >&6; }
42680fi
42681
42682
42683  test -n "$ac_ct_OBJCOPY" && break
42684done
42685
42686  if test "x$ac_ct_OBJCOPY" = x; then
42687    OBJCOPY=""
42688  else
42689    case $cross_compiling:$ac_tool_warned in
42690yes:)
42691{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42692$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42693ac_tool_warned=yes ;;
42694esac
42695    OBJCOPY=$ac_ct_OBJCOPY
42696  fi
42697fi
42698
42699    else
42700      # If it succeeded, then it was overridden by the user. We will use it
42701      # for the tool.
42702
42703      # First remove it from the list of overridden variables, so we can test
42704      # for unknown variables in the end.
42705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42706
42707      # Check if we try to supply an empty value
42708      if test "x$OBJCOPY" = x; then
42709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42710$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42712$as_echo_n "checking for OBJCOPY... " >&6; }
42713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42714$as_echo "disabled" >&6; }
42715      else
42716        # Check if the provided tool contains a complete path.
42717        tool_specified="$OBJCOPY"
42718        tool_basename="${tool_specified##*/}"
42719        if test "x$tool_basename" = "x$tool_specified"; then
42720          # A command without a complete path is provided, search $PATH.
42721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42722$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42723          # Extract the first word of "$tool_basename", so it can be a program name with args.
42724set dummy $tool_basename; ac_word=$2
42725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42726$as_echo_n "checking for $ac_word... " >&6; }
42727if ${ac_cv_path_OBJCOPY+:} false; then :
42728  $as_echo_n "(cached) " >&6
42729else
42730  case $OBJCOPY in
42731  [\\/]* | ?:[\\/]*)
42732  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42733  ;;
42734  *)
42735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42736for as_dir in $PATH
42737do
42738  IFS=$as_save_IFS
42739  test -z "$as_dir" && as_dir=.
42740    for ac_exec_ext in '' $ac_executable_extensions; do
42741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42742    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42744    break 2
42745  fi
42746done
42747  done
42748IFS=$as_save_IFS
42749
42750  ;;
42751esac
42752fi
42753OBJCOPY=$ac_cv_path_OBJCOPY
42754if test -n "$OBJCOPY"; then
42755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42756$as_echo "$OBJCOPY" >&6; }
42757else
42758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42759$as_echo "no" >&6; }
42760fi
42761
42762
42763          if test "x$OBJCOPY" = x; then
42764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42765          fi
42766        else
42767          # Otherwise we believe it is a complete path. Use it as it is.
42768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42769$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42771$as_echo_n "checking for OBJCOPY... " >&6; }
42772          if test ! -x "$tool_specified"; then
42773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42774$as_echo "not found" >&6; }
42775            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42776          fi
42777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42778$as_echo "$tool_specified" >&6; }
42779        fi
42780      fi
42781    fi
42782
42783  fi
42784
42785
42786    # Only call fixup if objcopy was found.
42787    if test -n "$OBJCOPY"; then
42788
42789  # Only process if variable expands to non-empty
42790
42791  if test "x$OBJCOPY" != x; then
42792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42793
42794  # First separate the path from the arguments. This will split at the first
42795  # space.
42796  complete="$OBJCOPY"
42797  path="${complete%% *}"
42798  tmp="$complete EOL"
42799  arguments="${tmp#* }"
42800
42801  # Input might be given as Windows format, start by converting to
42802  # unix format.
42803  new_path=`$CYGPATH -u "$path"`
42804
42805  # Now try to locate executable using which
42806  new_path=`$WHICH "$new_path" 2> /dev/null`
42807  # bat and cmd files are not always considered executable in cygwin causing which
42808  # to not find them
42809  if test "x$new_path" = x \
42810      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42811      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42812    new_path=`$CYGPATH -u "$path"`
42813  fi
42814  if test "x$new_path" = x; then
42815    # Oops. Which didn't find the executable.
42816    # The splitting of arguments from the executable at a space might have been incorrect,
42817    # since paths with space are more likely in Windows. Give it another try with the whole
42818    # argument.
42819    path="$complete"
42820    arguments="EOL"
42821    new_path=`$CYGPATH -u "$path"`
42822    new_path=`$WHICH "$new_path" 2> /dev/null`
42823    # bat and cmd files are not always considered executable in cygwin causing which
42824    # to not find them
42825    if test "x$new_path" = x \
42826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42828      new_path=`$CYGPATH -u "$path"`
42829    fi
42830    if test "x$new_path" = x; then
42831      # It's still not found. Now this is an unrecoverable error.
42832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42833$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42834      has_space=`$ECHO "$complete" | $GREP " "`
42835      if test "x$has_space" != x; then
42836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42838      fi
42839      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42840    fi
42841  fi
42842
42843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42846  # "foo.exe" is OK but "foo" is an error.
42847  #
42848  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42849  # It is also a way to make sure we got the proper file name for the real test later on.
42850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42851  if test "x$test_shortpath" = x; then
42852    # Short path failed, file does not exist as specified.
42853    # Try adding .exe or .cmd
42854    if test -f "${new_path}.exe"; then
42855      input_to_shortpath="${new_path}.exe"
42856    elif test -f "${new_path}.cmd"; then
42857      input_to_shortpath="${new_path}.cmd"
42858    else
42859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42860$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42863      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42864    fi
42865  else
42866    input_to_shortpath="$new_path"
42867  fi
42868
42869  # Call helper function which possibly converts this using DOS-style short mode.
42870  # If so, the updated path is stored in $new_path.
42871  new_path="$input_to_shortpath"
42872
42873  input_path="$input_to_shortpath"
42874  # Check if we need to convert this using DOS-style short mode. If the path
42875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42876  # take no chances and rewrite it.
42877  # Note: m4 eats our [], so we need to use [ and ] instead.
42878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42879  if test "x$has_forbidden_chars" != x; then
42880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42884      # Going to short mode and back again did indeed matter. Since short mode is
42885      # case insensitive, let's make it lowercase to improve readability.
42886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42887      # Now convert it back to Unix-style (cygpath)
42888      input_path=`$CYGPATH -u "$shortmode_path"`
42889      new_path="$input_path"
42890    fi
42891  fi
42892
42893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42894  if test "x$test_cygdrive_prefix" = x; then
42895    # As a simple fix, exclude /usr/bin since it's not a real path.
42896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42898      # a path prefixed by /cygdrive for fixpath to work.
42899      new_path="$CYGWIN_ROOT_PATH$input_path"
42900    fi
42901  fi
42902
42903  # remove trailing .exe if any
42904  new_path="${new_path/%.exe/}"
42905
42906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42907
42908  # First separate the path from the arguments. This will split at the first
42909  # space.
42910  complete="$OBJCOPY"
42911  path="${complete%% *}"
42912  tmp="$complete EOL"
42913  arguments="${tmp#* }"
42914
42915  # Input might be given as Windows format, start by converting to
42916  # unix format.
42917  new_path="$path"
42918
42919  windows_path="$new_path"
42920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42921    unix_path=`$CYGPATH -u "$windows_path"`
42922    new_path="$unix_path"
42923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42925    new_path="$unix_path"
42926  fi
42927
42928
42929  # Now try to locate executable using which
42930  new_path=`$WHICH "$new_path" 2> /dev/null`
42931
42932  if test "x$new_path" = x; then
42933    # Oops. Which didn't find the executable.
42934    # The splitting of arguments from the executable at a space might have been incorrect,
42935    # since paths with space are more likely in Windows. Give it another try with the whole
42936    # argument.
42937    path="$complete"
42938    arguments="EOL"
42939    new_path="$path"
42940
42941  windows_path="$new_path"
42942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42943    unix_path=`$CYGPATH -u "$windows_path"`
42944    new_path="$unix_path"
42945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42947    new_path="$unix_path"
42948  fi
42949
42950
42951    new_path=`$WHICH "$new_path" 2> /dev/null`
42952    # bat and cmd files are not always considered executable in MSYS causing which
42953    # to not find them
42954    if test "x$new_path" = x \
42955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42957      new_path="$path"
42958
42959  windows_path="$new_path"
42960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42961    unix_path=`$CYGPATH -u "$windows_path"`
42962    new_path="$unix_path"
42963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42965    new_path="$unix_path"
42966  fi
42967
42968    fi
42969
42970    if test "x$new_path" = x; then
42971      # It's still not found. Now this is an unrecoverable error.
42972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42973$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42974      has_space=`$ECHO "$complete" | $GREP " "`
42975      if test "x$has_space" != x; then
42976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42978      fi
42979      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42980    fi
42981  fi
42982
42983  # Now new_path has a complete unix path to the binary
42984  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42985    # Keep paths in /bin as-is, but remove trailing .exe if any
42986    new_path="${new_path/%.exe/}"
42987    # Do not save /bin paths to all_fixpath_prefixes!
42988  else
42989    # Not in mixed or Windows style, start by that.
42990    new_path=`cmd //c echo $new_path`
42991
42992  input_path="$new_path"
42993  # Check if we need to convert this using DOS-style short mode. If the path
42994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42995  # take no chances and rewrite it.
42996  # Note: m4 eats our [], so we need to use [ and ] instead.
42997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42998  if test "x$has_forbidden_chars" != x; then
42999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43001  fi
43002
43003    # Output is in $new_path
43004
43005  windows_path="$new_path"
43006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43007    unix_path=`$CYGPATH -u "$windows_path"`
43008    new_path="$unix_path"
43009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43011    new_path="$unix_path"
43012  fi
43013
43014    # remove trailing .exe if any
43015    new_path="${new_path/%.exe/}"
43016
43017    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43018    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43019  fi
43020
43021    else
43022      # We're on a unix platform. Hooray! :)
43023      # First separate the path from the arguments. This will split at the first
43024      # space.
43025      complete="$OBJCOPY"
43026      path="${complete%% *}"
43027      tmp="$complete EOL"
43028      arguments="${tmp#* }"
43029
43030      # Cannot rely on the command "which" here since it doesn't always work.
43031      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43032      if test -z "$is_absolute_path"; then
43033        # Path to executable is not absolute. Find it.
43034        IFS_save="$IFS"
43035        IFS=:
43036        for p in $PATH; do
43037          if test -f "$p/$path" && test -x "$p/$path"; then
43038            new_path="$p/$path"
43039            break
43040          fi
43041        done
43042        IFS="$IFS_save"
43043      else
43044        # This is an absolute path, we can use it without further modifications.
43045        new_path="$path"
43046      fi
43047
43048      if test "x$new_path" = x; then
43049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43050$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43051        has_space=`$ECHO "$complete" | $GREP " "`
43052        if test "x$has_space" != x; then
43053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43055        fi
43056        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43057      fi
43058    fi
43059
43060    # Now join together the path and the arguments once again
43061    if test "x$arguments" != xEOL; then
43062      new_complete="$new_path ${arguments% *}"
43063    else
43064      new_complete="$new_path"
43065    fi
43066
43067    if test "x$complete" != "x$new_complete"; then
43068      OBJCOPY="$new_complete"
43069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43070$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43071    fi
43072  fi
43073
43074      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43075        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43076        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43077        # - version number is last blank separate word on first line
43078        # - version number formats that have been seen:
43079        #   - <major>.<minor>
43080        #   - <major>.<minor>.<micro>
43081        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43082        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43083         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43084              -e 's/.* //' \
43085              -e '/^[01]\./b bad' \
43086              -e '/^2\./{' \
43087              -e '  s/^2\.//' \
43088              -e '  /^[0-9]$/b bad' \
43089              -e '  /^[0-9]\./b bad' \
43090              -e '  /^1[0-9]$/b bad' \
43091              -e '  /^1[0-9]\./b bad' \
43092              -e '  /^20\./b bad' \
43093              -e '  /^21\.0$/b bad' \
43094              -e '  /^21\.0\./b bad' \
43095              -e '}' \
43096              -e ':good' \
43097              -e 's/.*/VALID_VERSION/p' \
43098              -e 'q' \
43099              -e ':bad' \
43100              -e 's/.*/BAD_VERSION/p' \
43101              -e 'q'`
43102        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43103          OBJCOPY=
43104          { $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
43105$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43106          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43107$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43108          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43109$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43110          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43111$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43112          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43113$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43114        fi
43115      fi
43116    fi
43117  fi
43118
43119
43120
43121  # Publish this variable in the help.
43122
43123
43124  if [ -z "${OBJDUMP+x}" ]; then
43125    # The variable is not set by user, try to locate tool using the code snippet
43126    if test -n "$ac_tool_prefix"; then
43127  for ac_prog in gobjdump objdump
43128  do
43129    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43130set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43132$as_echo_n "checking for $ac_word... " >&6; }
43133if ${ac_cv_prog_OBJDUMP+:} false; then :
43134  $as_echo_n "(cached) " >&6
43135else
43136  if test -n "$OBJDUMP"; then
43137  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43138else
43139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43140for as_dir in $PATH
43141do
43142  IFS=$as_save_IFS
43143  test -z "$as_dir" && as_dir=.
43144    for ac_exec_ext in '' $ac_executable_extensions; do
43145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43146    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43148    break 2
43149  fi
43150done
43151  done
43152IFS=$as_save_IFS
43153
43154fi
43155fi
43156OBJDUMP=$ac_cv_prog_OBJDUMP
43157if test -n "$OBJDUMP"; then
43158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43159$as_echo "$OBJDUMP" >&6; }
43160else
43161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43162$as_echo "no" >&6; }
43163fi
43164
43165
43166    test -n "$OBJDUMP" && break
43167  done
43168fi
43169if test -z "$OBJDUMP"; then
43170  ac_ct_OBJDUMP=$OBJDUMP
43171  for ac_prog in gobjdump objdump
43172do
43173  # Extract the first word of "$ac_prog", so it can be a program name with args.
43174set dummy $ac_prog; ac_word=$2
43175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43176$as_echo_n "checking for $ac_word... " >&6; }
43177if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43178  $as_echo_n "(cached) " >&6
43179else
43180  if test -n "$ac_ct_OBJDUMP"; then
43181  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43182else
43183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43184for as_dir in $PATH
43185do
43186  IFS=$as_save_IFS
43187  test -z "$as_dir" && as_dir=.
43188    for ac_exec_ext in '' $ac_executable_extensions; do
43189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43190    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43192    break 2
43193  fi
43194done
43195  done
43196IFS=$as_save_IFS
43197
43198fi
43199fi
43200ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43201if test -n "$ac_ct_OBJDUMP"; then
43202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43203$as_echo "$ac_ct_OBJDUMP" >&6; }
43204else
43205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43206$as_echo "no" >&6; }
43207fi
43208
43209
43210  test -n "$ac_ct_OBJDUMP" && break
43211done
43212
43213  if test "x$ac_ct_OBJDUMP" = x; then
43214    OBJDUMP=""
43215  else
43216    case $cross_compiling:$ac_tool_warned in
43217yes:)
43218{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43219$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43220ac_tool_warned=yes ;;
43221esac
43222    OBJDUMP=$ac_ct_OBJDUMP
43223  fi
43224fi
43225
43226  else
43227    # The variable is set, but is it from the command line or the environment?
43228
43229    # Try to remove the string !OBJDUMP! from our list.
43230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43232      # If it failed, the variable was not from the command line. Ignore it,
43233      # but warn the user (except for BASH, which is always set by the calling BASH).
43234      if test "xOBJDUMP" != xBASH; then
43235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43236$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43237      fi
43238      # Try to locate tool using the code snippet
43239      if test -n "$ac_tool_prefix"; then
43240  for ac_prog in gobjdump objdump
43241  do
43242    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43243set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43245$as_echo_n "checking for $ac_word... " >&6; }
43246if ${ac_cv_prog_OBJDUMP+:} false; then :
43247  $as_echo_n "(cached) " >&6
43248else
43249  if test -n "$OBJDUMP"; then
43250  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43251else
43252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43253for as_dir in $PATH
43254do
43255  IFS=$as_save_IFS
43256  test -z "$as_dir" && as_dir=.
43257    for ac_exec_ext in '' $ac_executable_extensions; do
43258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43259    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43261    break 2
43262  fi
43263done
43264  done
43265IFS=$as_save_IFS
43266
43267fi
43268fi
43269OBJDUMP=$ac_cv_prog_OBJDUMP
43270if test -n "$OBJDUMP"; then
43271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43272$as_echo "$OBJDUMP" >&6; }
43273else
43274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43275$as_echo "no" >&6; }
43276fi
43277
43278
43279    test -n "$OBJDUMP" && break
43280  done
43281fi
43282if test -z "$OBJDUMP"; then
43283  ac_ct_OBJDUMP=$OBJDUMP
43284  for ac_prog in gobjdump objdump
43285do
43286  # Extract the first word of "$ac_prog", so it can be a program name with args.
43287set dummy $ac_prog; ac_word=$2
43288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43289$as_echo_n "checking for $ac_word... " >&6; }
43290if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43291  $as_echo_n "(cached) " >&6
43292else
43293  if test -n "$ac_ct_OBJDUMP"; then
43294  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43295else
43296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43297for as_dir in $PATH
43298do
43299  IFS=$as_save_IFS
43300  test -z "$as_dir" && as_dir=.
43301    for ac_exec_ext in '' $ac_executable_extensions; do
43302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43303    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43305    break 2
43306  fi
43307done
43308  done
43309IFS=$as_save_IFS
43310
43311fi
43312fi
43313ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43314if test -n "$ac_ct_OBJDUMP"; then
43315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43316$as_echo "$ac_ct_OBJDUMP" >&6; }
43317else
43318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43319$as_echo "no" >&6; }
43320fi
43321
43322
43323  test -n "$ac_ct_OBJDUMP" && break
43324done
43325
43326  if test "x$ac_ct_OBJDUMP" = x; then
43327    OBJDUMP=""
43328  else
43329    case $cross_compiling:$ac_tool_warned in
43330yes:)
43331{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43332$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43333ac_tool_warned=yes ;;
43334esac
43335    OBJDUMP=$ac_ct_OBJDUMP
43336  fi
43337fi
43338
43339    else
43340      # If it succeeded, then it was overridden by the user. We will use it
43341      # for the tool.
43342
43343      # First remove it from the list of overridden variables, so we can test
43344      # for unknown variables in the end.
43345      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43346
43347      # Check if we try to supply an empty value
43348      if test "x$OBJDUMP" = x; then
43349        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43350$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43351        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43352$as_echo_n "checking for OBJDUMP... " >&6; }
43353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43354$as_echo "disabled" >&6; }
43355      else
43356        # Check if the provided tool contains a complete path.
43357        tool_specified="$OBJDUMP"
43358        tool_basename="${tool_specified##*/}"
43359        if test "x$tool_basename" = "x$tool_specified"; then
43360          # A command without a complete path is provided, search $PATH.
43361          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43362$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43363          # Extract the first word of "$tool_basename", so it can be a program name with args.
43364set dummy $tool_basename; ac_word=$2
43365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43366$as_echo_n "checking for $ac_word... " >&6; }
43367if ${ac_cv_path_OBJDUMP+:} false; then :
43368  $as_echo_n "(cached) " >&6
43369else
43370  case $OBJDUMP in
43371  [\\/]* | ?:[\\/]*)
43372  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43373  ;;
43374  *)
43375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43376for as_dir in $PATH
43377do
43378  IFS=$as_save_IFS
43379  test -z "$as_dir" && as_dir=.
43380    for ac_exec_ext in '' $ac_executable_extensions; do
43381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43382    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43384    break 2
43385  fi
43386done
43387  done
43388IFS=$as_save_IFS
43389
43390  ;;
43391esac
43392fi
43393OBJDUMP=$ac_cv_path_OBJDUMP
43394if test -n "$OBJDUMP"; then
43395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43396$as_echo "$OBJDUMP" >&6; }
43397else
43398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43399$as_echo "no" >&6; }
43400fi
43401
43402
43403          if test "x$OBJDUMP" = x; then
43404            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43405          fi
43406        else
43407          # Otherwise we believe it is a complete path. Use it as it is.
43408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43409$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43410          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43411$as_echo_n "checking for OBJDUMP... " >&6; }
43412          if test ! -x "$tool_specified"; then
43413            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43414$as_echo "not found" >&6; }
43415            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43416          fi
43417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43418$as_echo "$tool_specified" >&6; }
43419        fi
43420      fi
43421    fi
43422
43423  fi
43424
43425
43426  if test "x$OBJDUMP" != x; then
43427    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43428    # bails if argument is missing.
43429
43430  # Only process if variable expands to non-empty
43431
43432  if test "x$OBJDUMP" != x; then
43433    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43434
43435  # First separate the path from the arguments. This will split at the first
43436  # space.
43437  complete="$OBJDUMP"
43438  path="${complete%% *}"
43439  tmp="$complete EOL"
43440  arguments="${tmp#* }"
43441
43442  # Input might be given as Windows format, start by converting to
43443  # unix format.
43444  new_path=`$CYGPATH -u "$path"`
43445
43446  # Now try to locate executable using which
43447  new_path=`$WHICH "$new_path" 2> /dev/null`
43448  # bat and cmd files are not always considered executable in cygwin causing which
43449  # to not find them
43450  if test "x$new_path" = x \
43451      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43452      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43453    new_path=`$CYGPATH -u "$path"`
43454  fi
43455  if test "x$new_path" = x; then
43456    # Oops. Which didn't find the executable.
43457    # The splitting of arguments from the executable at a space might have been incorrect,
43458    # since paths with space are more likely in Windows. Give it another try with the whole
43459    # argument.
43460    path="$complete"
43461    arguments="EOL"
43462    new_path=`$CYGPATH -u "$path"`
43463    new_path=`$WHICH "$new_path" 2> /dev/null`
43464    # bat and cmd files are not always considered executable in cygwin causing which
43465    # to not find them
43466    if test "x$new_path" = x \
43467        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43468        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43469      new_path=`$CYGPATH -u "$path"`
43470    fi
43471    if test "x$new_path" = x; then
43472      # It's still not found. Now this is an unrecoverable error.
43473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43474$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43475      has_space=`$ECHO "$complete" | $GREP " "`
43476      if test "x$has_space" != x; then
43477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43479      fi
43480      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43481    fi
43482  fi
43483
43484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43487  # "foo.exe" is OK but "foo" is an error.
43488  #
43489  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43490  # It is also a way to make sure we got the proper file name for the real test later on.
43491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43492  if test "x$test_shortpath" = x; then
43493    # Short path failed, file does not exist as specified.
43494    # Try adding .exe or .cmd
43495    if test -f "${new_path}.exe"; then
43496      input_to_shortpath="${new_path}.exe"
43497    elif test -f "${new_path}.cmd"; then
43498      input_to_shortpath="${new_path}.cmd"
43499    else
43500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43501$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43502      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43503$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43504      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43505    fi
43506  else
43507    input_to_shortpath="$new_path"
43508  fi
43509
43510  # Call helper function which possibly converts this using DOS-style short mode.
43511  # If so, the updated path is stored in $new_path.
43512  new_path="$input_to_shortpath"
43513
43514  input_path="$input_to_shortpath"
43515  # Check if we need to convert this using DOS-style short mode. If the path
43516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43517  # take no chances and rewrite it.
43518  # Note: m4 eats our [], so we need to use [ and ] instead.
43519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43520  if test "x$has_forbidden_chars" != x; then
43521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43525      # Going to short mode and back again did indeed matter. Since short mode is
43526      # case insensitive, let's make it lowercase to improve readability.
43527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43528      # Now convert it back to Unix-style (cygpath)
43529      input_path=`$CYGPATH -u "$shortmode_path"`
43530      new_path="$input_path"
43531    fi
43532  fi
43533
43534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43535  if test "x$test_cygdrive_prefix" = x; then
43536    # As a simple fix, exclude /usr/bin since it's not a real path.
43537    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43539      # a path prefixed by /cygdrive for fixpath to work.
43540      new_path="$CYGWIN_ROOT_PATH$input_path"
43541    fi
43542  fi
43543
43544  # remove trailing .exe if any
43545  new_path="${new_path/%.exe/}"
43546
43547    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43548
43549  # First separate the path from the arguments. This will split at the first
43550  # space.
43551  complete="$OBJDUMP"
43552  path="${complete%% *}"
43553  tmp="$complete EOL"
43554  arguments="${tmp#* }"
43555
43556  # Input might be given as Windows format, start by converting to
43557  # unix format.
43558  new_path="$path"
43559
43560  windows_path="$new_path"
43561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43562    unix_path=`$CYGPATH -u "$windows_path"`
43563    new_path="$unix_path"
43564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43566    new_path="$unix_path"
43567  fi
43568
43569
43570  # Now try to locate executable using which
43571  new_path=`$WHICH "$new_path" 2> /dev/null`
43572
43573  if test "x$new_path" = x; then
43574    # Oops. Which didn't find the executable.
43575    # The splitting of arguments from the executable at a space might have been incorrect,
43576    # since paths with space are more likely in Windows. Give it another try with the whole
43577    # argument.
43578    path="$complete"
43579    arguments="EOL"
43580    new_path="$path"
43581
43582  windows_path="$new_path"
43583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43584    unix_path=`$CYGPATH -u "$windows_path"`
43585    new_path="$unix_path"
43586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43588    new_path="$unix_path"
43589  fi
43590
43591
43592    new_path=`$WHICH "$new_path" 2> /dev/null`
43593    # bat and cmd files are not always considered executable in MSYS causing which
43594    # to not find them
43595    if test "x$new_path" = x \
43596        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43597        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43598      new_path="$path"
43599
43600  windows_path="$new_path"
43601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43602    unix_path=`$CYGPATH -u "$windows_path"`
43603    new_path="$unix_path"
43604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43606    new_path="$unix_path"
43607  fi
43608
43609    fi
43610
43611    if test "x$new_path" = x; then
43612      # It's still not found. Now this is an unrecoverable error.
43613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43614$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43615      has_space=`$ECHO "$complete" | $GREP " "`
43616      if test "x$has_space" != x; then
43617        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43619      fi
43620      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43621    fi
43622  fi
43623
43624  # Now new_path has a complete unix path to the binary
43625  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43626    # Keep paths in /bin as-is, but remove trailing .exe if any
43627    new_path="${new_path/%.exe/}"
43628    # Do not save /bin paths to all_fixpath_prefixes!
43629  else
43630    # Not in mixed or Windows style, start by that.
43631    new_path=`cmd //c echo $new_path`
43632
43633  input_path="$new_path"
43634  # Check if we need to convert this using DOS-style short mode. If the path
43635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43636  # take no chances and rewrite it.
43637  # Note: m4 eats our [], so we need to use [ and ] instead.
43638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43639  if test "x$has_forbidden_chars" != x; then
43640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43642  fi
43643
43644    # Output is in $new_path
43645
43646  windows_path="$new_path"
43647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43648    unix_path=`$CYGPATH -u "$windows_path"`
43649    new_path="$unix_path"
43650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43652    new_path="$unix_path"
43653  fi
43654
43655    # remove trailing .exe if any
43656    new_path="${new_path/%.exe/}"
43657
43658    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43659    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43660  fi
43661
43662    else
43663      # We're on a unix platform. Hooray! :)
43664      # First separate the path from the arguments. This will split at the first
43665      # space.
43666      complete="$OBJDUMP"
43667      path="${complete%% *}"
43668      tmp="$complete EOL"
43669      arguments="${tmp#* }"
43670
43671      # Cannot rely on the command "which" here since it doesn't always work.
43672      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43673      if test -z "$is_absolute_path"; then
43674        # Path to executable is not absolute. Find it.
43675        IFS_save="$IFS"
43676        IFS=:
43677        for p in $PATH; do
43678          if test -f "$p/$path" && test -x "$p/$path"; then
43679            new_path="$p/$path"
43680            break
43681          fi
43682        done
43683        IFS="$IFS_save"
43684      else
43685        # This is an absolute path, we can use it without further modifications.
43686        new_path="$path"
43687      fi
43688
43689      if test "x$new_path" = x; then
43690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43691$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43692        has_space=`$ECHO "$complete" | $GREP " "`
43693        if test "x$has_space" != x; then
43694          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43695$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43696        fi
43697        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43698      fi
43699    fi
43700
43701    # Now join together the path and the arguments once again
43702    if test "x$arguments" != xEOL; then
43703      new_complete="$new_path ${arguments% *}"
43704    else
43705      new_complete="$new_path"
43706    fi
43707
43708    if test "x$complete" != "x$new_complete"; then
43709      OBJDUMP="$new_complete"
43710      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43711$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43712    fi
43713  fi
43714
43715  fi
43716
43717
43718  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43719  # to remain in place. Otherwise the compiler will not work in some siutations
43720  # in later configure checks.
43721  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43722    PATH="$OLD_PATH"
43723  fi
43724
43725  # Restore the flags to the user specified values.
43726  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43727  CFLAGS="$ORG_CFLAGS"
43728  CXXFLAGS="$ORG_CXXFLAGS"
43729
43730
43731# Finally do some processing after the detection phase
43732
43733  if test "x$COMPILE_TYPE" = "xcross"; then
43734    # Now we need to find a C/C++ compiler that can build executables for the
43735    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43736    # used once. Also, we need to do this without adding a tools dir to the
43737    # path, otherwise we might pick up cross-compilers which don't use standard
43738    # naming.
43739
43740    OLDPATH="$PATH"
43741
43742
43743# Check whether --with-build-devkit was given.
43744if test "${with_build_devkit+set}" = set; then :
43745  withval=$with_build_devkit;
43746fi
43747
43748    if test "x$with_build_devkit" = "xyes"; then
43749      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43750    elif test -n "$with_build_devkit"; then
43751      if test ! -d "$with_build_devkit"; then
43752        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43753      else
43754
43755  # Only process if variable expands to non-empty
43756
43757  if test "x$with_build_devkit" != x; then
43758    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43759
43760  # Input might be given as Windows format, start by converting to
43761  # unix format.
43762  path="$with_build_devkit"
43763  new_path=`$CYGPATH -u "$path"`
43764
43765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43768  # "foo.exe" is OK but "foo" is an error.
43769  #
43770  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43771  # It is also a way to make sure we got the proper file name for the real test later on.
43772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43773  if test "x$test_shortpath" = x; then
43774    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43775$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43776    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43777  fi
43778
43779  # Call helper function which possibly converts this using DOS-style short mode.
43780  # If so, the updated path is stored in $new_path.
43781
43782  input_path="$new_path"
43783  # Check if we need to convert this using DOS-style short mode. If the path
43784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43785  # take no chances and rewrite it.
43786  # Note: m4 eats our [], so we need to use [ and ] instead.
43787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43788  if test "x$has_forbidden_chars" != x; then
43789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43793      # Going to short mode and back again did indeed matter. Since short mode is
43794      # case insensitive, let's make it lowercase to improve readability.
43795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43796      # Now convert it back to Unix-style (cygpath)
43797      input_path=`$CYGPATH -u "$shortmode_path"`
43798      new_path="$input_path"
43799    fi
43800  fi
43801
43802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43803  if test "x$test_cygdrive_prefix" = x; then
43804    # As a simple fix, exclude /usr/bin since it's not a real path.
43805    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43807      # a path prefixed by /cygdrive for fixpath to work.
43808      new_path="$CYGWIN_ROOT_PATH$input_path"
43809    fi
43810  fi
43811
43812
43813  if test "x$path" != "x$new_path"; then
43814    with_build_devkit="$new_path"
43815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43816$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43817  fi
43818
43819    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43820
43821  path="$with_build_devkit"
43822  has_colon=`$ECHO $path | $GREP ^.:`
43823  new_path="$path"
43824  if test "x$has_colon" = x; then
43825    # Not in mixed or Windows style, start by that.
43826    new_path=`cmd //c echo $path`
43827  fi
43828
43829
43830  input_path="$new_path"
43831  # Check if we need to convert this using DOS-style short mode. If the path
43832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43833  # take no chances and rewrite it.
43834  # Note: m4 eats our [], so we need to use [ and ] instead.
43835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43836  if test "x$has_forbidden_chars" != x; then
43837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43839  fi
43840
43841
43842  windows_path="$new_path"
43843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43844    unix_path=`$CYGPATH -u "$windows_path"`
43845    new_path="$unix_path"
43846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43848    new_path="$unix_path"
43849  fi
43850
43851  if test "x$path" != "x$new_path"; then
43852    with_build_devkit="$new_path"
43853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43854$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43855  fi
43856
43857  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43858  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43859
43860    else
43861      # We're on a unix platform. Hooray! :)
43862      path="$with_build_devkit"
43863      has_space=`$ECHO "$path" | $GREP " "`
43864      if test "x$has_space" != x; then
43865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43866$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43867        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43868      fi
43869
43870      # Use eval to expand a potential ~
43871      eval path="$path"
43872      if test ! -f "$path" && test ! -d "$path"; then
43873        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43874      fi
43875
43876      if test -d "$path"; then
43877        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43878      else
43879        dir="`$DIRNAME "$path"`"
43880        base="`$BASENAME "$path"`"
43881        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43882      fi
43883    fi
43884  fi
43885
43886        BUILD_DEVKIT_ROOT="$with_build_devkit"
43887        # Check for a meta data info file in the root of the devkit
43888        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43889          # Process devkit.info so that existing devkit variables are not
43890          # modified by this
43891          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43892              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43893              -e "s/\$host/\$build/g" \
43894              $BUILD_DEVKIT_ROOT/devkit.info \
43895              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43896          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43897          # This potentially sets the following:
43898          # A descriptive name of the devkit
43899
43900  if test "x$BUILD_DEVKIT_NAME" = x; then
43901    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43902  fi
43903
43904          # Corresponds to --with-extra-path
43905
43906  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43907    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43908  fi
43909
43910          # Corresponds to --with-toolchain-path
43911
43912  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43913    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43914  fi
43915
43916          # Corresponds to --with-sysroot
43917
43918  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43919    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43920  fi
43921
43922          # Skip the Window specific parts
43923        fi
43924
43925        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43926$as_echo_n "checking for build platform devkit... " >&6; }
43927        if test "x$BUILD_DEVKIT_NAME" != x; then
43928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43929$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43930        else
43931          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43932$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43933        fi
43934
43935        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43936
43937  if test "x$BUILD_SYSROOT" != "x"; then
43938    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43939      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43940        # Solaris Studio does not have a concept of sysroot. Instead we must
43941        # make sure the default include and lib dirs are appended to each
43942        # compile and link command line. Must also add -I-xbuiltin to enable
43943        # inlining of system functions and intrinsics.
43944        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43945        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43946            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43947      fi
43948    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43949      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43950      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43951    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43952      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43953      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43954    fi
43955    # Propagate the sysroot args to hotspot
43956    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43957    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43958    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43959    # The global CFLAGS and LDFLAGS variables need these for configure to function
43960    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43961    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43962    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43963    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43964  fi
43965
43966  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43967    # We also need -iframework<path>/System/Library/Frameworks
43968    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43969    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43970    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43971    # set this here so it doesn't have to be peppered throughout the forest
43972    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43973    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43974  fi
43975
43976
43977
43978
43979
43980         # Fallback default of just /bin if DEVKIT_PATH is not defined
43981        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43982          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43983        fi
43984        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43985      fi
43986    fi
43987
43988    # FIXME: we should list the discovered compilers as an exclude pattern!
43989    # If we do that, we can do this detection before POST_DETECTION, and still
43990    # find the build compilers in the tools dir, if needed.
43991
43992
43993
43994  # Publish this variable in the help.
43995
43996
43997  if [ -z "${BUILD_CC+x}" ]; then
43998    # The variable is not set by user, try to locate tool using the code snippet
43999    for ac_prog in cl cc gcc
44000do
44001  # Extract the first word of "$ac_prog", so it can be a program name with args.
44002set dummy $ac_prog; ac_word=$2
44003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44004$as_echo_n "checking for $ac_word... " >&6; }
44005if ${ac_cv_path_BUILD_CC+:} false; then :
44006  $as_echo_n "(cached) " >&6
44007else
44008  case $BUILD_CC in
44009  [\\/]* | ?:[\\/]*)
44010  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44011  ;;
44012  *)
44013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44014for as_dir in $PATH
44015do
44016  IFS=$as_save_IFS
44017  test -z "$as_dir" && as_dir=.
44018    for ac_exec_ext in '' $ac_executable_extensions; do
44019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44020    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44022    break 2
44023  fi
44024done
44025  done
44026IFS=$as_save_IFS
44027
44028  ;;
44029esac
44030fi
44031BUILD_CC=$ac_cv_path_BUILD_CC
44032if test -n "$BUILD_CC"; then
44033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44034$as_echo "$BUILD_CC" >&6; }
44035else
44036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44037$as_echo "no" >&6; }
44038fi
44039
44040
44041  test -n "$BUILD_CC" && break
44042done
44043
44044  else
44045    # The variable is set, but is it from the command line or the environment?
44046
44047    # Try to remove the string !BUILD_CC! from our list.
44048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44050      # If it failed, the variable was not from the command line. Ignore it,
44051      # but warn the user (except for BASH, which is always set by the calling BASH).
44052      if test "xBUILD_CC" != xBASH; then
44053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44054$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44055      fi
44056      # Try to locate tool using the code snippet
44057      for ac_prog in cl cc gcc
44058do
44059  # Extract the first word of "$ac_prog", so it can be a program name with args.
44060set dummy $ac_prog; ac_word=$2
44061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44062$as_echo_n "checking for $ac_word... " >&6; }
44063if ${ac_cv_path_BUILD_CC+:} false; then :
44064  $as_echo_n "(cached) " >&6
44065else
44066  case $BUILD_CC in
44067  [\\/]* | ?:[\\/]*)
44068  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44069  ;;
44070  *)
44071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44072for as_dir in $PATH
44073do
44074  IFS=$as_save_IFS
44075  test -z "$as_dir" && as_dir=.
44076    for ac_exec_ext in '' $ac_executable_extensions; do
44077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44078    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44080    break 2
44081  fi
44082done
44083  done
44084IFS=$as_save_IFS
44085
44086  ;;
44087esac
44088fi
44089BUILD_CC=$ac_cv_path_BUILD_CC
44090if test -n "$BUILD_CC"; then
44091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44092$as_echo "$BUILD_CC" >&6; }
44093else
44094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44095$as_echo "no" >&6; }
44096fi
44097
44098
44099  test -n "$BUILD_CC" && break
44100done
44101
44102    else
44103      # If it succeeded, then it was overridden by the user. We will use it
44104      # for the tool.
44105
44106      # First remove it from the list of overridden variables, so we can test
44107      # for unknown variables in the end.
44108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44109
44110      # Check if we try to supply an empty value
44111      if test "x$BUILD_CC" = x; then
44112        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44113$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44115$as_echo_n "checking for BUILD_CC... " >&6; }
44116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44117$as_echo "disabled" >&6; }
44118      else
44119        # Check if the provided tool contains a complete path.
44120        tool_specified="$BUILD_CC"
44121        tool_basename="${tool_specified##*/}"
44122        if test "x$tool_basename" = "x$tool_specified"; then
44123          # A command without a complete path is provided, search $PATH.
44124          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44125$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44126          # Extract the first word of "$tool_basename", so it can be a program name with args.
44127set dummy $tool_basename; ac_word=$2
44128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44129$as_echo_n "checking for $ac_word... " >&6; }
44130if ${ac_cv_path_BUILD_CC+:} false; then :
44131  $as_echo_n "(cached) " >&6
44132else
44133  case $BUILD_CC in
44134  [\\/]* | ?:[\\/]*)
44135  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44136  ;;
44137  *)
44138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44139for as_dir in $PATH
44140do
44141  IFS=$as_save_IFS
44142  test -z "$as_dir" && as_dir=.
44143    for ac_exec_ext in '' $ac_executable_extensions; do
44144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44145    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44147    break 2
44148  fi
44149done
44150  done
44151IFS=$as_save_IFS
44152
44153  ;;
44154esac
44155fi
44156BUILD_CC=$ac_cv_path_BUILD_CC
44157if test -n "$BUILD_CC"; then
44158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44159$as_echo "$BUILD_CC" >&6; }
44160else
44161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44162$as_echo "no" >&6; }
44163fi
44164
44165
44166          if test "x$BUILD_CC" = x; then
44167            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44168          fi
44169        else
44170          # Otherwise we believe it is a complete path. Use it as it is.
44171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44172$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44173          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44174$as_echo_n "checking for BUILD_CC... " >&6; }
44175          if test ! -x "$tool_specified"; then
44176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44177$as_echo "not found" >&6; }
44178            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44179          fi
44180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44181$as_echo "$tool_specified" >&6; }
44182        fi
44183      fi
44184    fi
44185
44186  fi
44187
44188
44189
44190  if test "x$BUILD_CC" = x; then
44191    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44192  fi
44193
44194
44195
44196  # Only process if variable expands to non-empty
44197
44198  if test "x$BUILD_CC" != x; then
44199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44200
44201  # First separate the path from the arguments. This will split at the first
44202  # space.
44203  complete="$BUILD_CC"
44204  path="${complete%% *}"
44205  tmp="$complete EOL"
44206  arguments="${tmp#* }"
44207
44208  # Input might be given as Windows format, start by converting to
44209  # unix format.
44210  new_path=`$CYGPATH -u "$path"`
44211
44212  # Now try to locate executable using which
44213  new_path=`$WHICH "$new_path" 2> /dev/null`
44214  # bat and cmd files are not always considered executable in cygwin causing which
44215  # to not find them
44216  if test "x$new_path" = x \
44217      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44218      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44219    new_path=`$CYGPATH -u "$path"`
44220  fi
44221  if test "x$new_path" = x; then
44222    # Oops. Which didn't find the executable.
44223    # The splitting of arguments from the executable at a space might have been incorrect,
44224    # since paths with space are more likely in Windows. Give it another try with the whole
44225    # argument.
44226    path="$complete"
44227    arguments="EOL"
44228    new_path=`$CYGPATH -u "$path"`
44229    new_path=`$WHICH "$new_path" 2> /dev/null`
44230    # bat and cmd files are not always considered executable in cygwin causing which
44231    # to not find them
44232    if test "x$new_path" = x \
44233        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44234        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44235      new_path=`$CYGPATH -u "$path"`
44236    fi
44237    if test "x$new_path" = x; then
44238      # It's still not found. Now this is an unrecoverable error.
44239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44240$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44241      has_space=`$ECHO "$complete" | $GREP " "`
44242      if test "x$has_space" != x; then
44243        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44244$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44245      fi
44246      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44247    fi
44248  fi
44249
44250  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44251  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44252  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44253  # "foo.exe" is OK but "foo" is an error.
44254  #
44255  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44256  # It is also a way to make sure we got the proper file name for the real test later on.
44257  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44258  if test "x$test_shortpath" = x; then
44259    # Short path failed, file does not exist as specified.
44260    # Try adding .exe or .cmd
44261    if test -f "${new_path}.exe"; then
44262      input_to_shortpath="${new_path}.exe"
44263    elif test -f "${new_path}.cmd"; then
44264      input_to_shortpath="${new_path}.cmd"
44265    else
44266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44267$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44268      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44269$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44270      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44271    fi
44272  else
44273    input_to_shortpath="$new_path"
44274  fi
44275
44276  # Call helper function which possibly converts this using DOS-style short mode.
44277  # If so, the updated path is stored in $new_path.
44278  new_path="$input_to_shortpath"
44279
44280  input_path="$input_to_shortpath"
44281  # Check if we need to convert this using DOS-style short mode. If the path
44282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44283  # take no chances and rewrite it.
44284  # Note: m4 eats our [], so we need to use [ and ] instead.
44285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44286  if test "x$has_forbidden_chars" != x; then
44287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44291      # Going to short mode and back again did indeed matter. Since short mode is
44292      # case insensitive, let's make it lowercase to improve readability.
44293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44294      # Now convert it back to Unix-style (cygpath)
44295      input_path=`$CYGPATH -u "$shortmode_path"`
44296      new_path="$input_path"
44297    fi
44298  fi
44299
44300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44301  if test "x$test_cygdrive_prefix" = x; then
44302    # As a simple fix, exclude /usr/bin since it's not a real path.
44303    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44305      # a path prefixed by /cygdrive for fixpath to work.
44306      new_path="$CYGWIN_ROOT_PATH$input_path"
44307    fi
44308  fi
44309
44310  # remove trailing .exe if any
44311  new_path="${new_path/%.exe/}"
44312
44313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44314
44315  # First separate the path from the arguments. This will split at the first
44316  # space.
44317  complete="$BUILD_CC"
44318  path="${complete%% *}"
44319  tmp="$complete EOL"
44320  arguments="${tmp#* }"
44321
44322  # Input might be given as Windows format, start by converting to
44323  # unix format.
44324  new_path="$path"
44325
44326  windows_path="$new_path"
44327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44328    unix_path=`$CYGPATH -u "$windows_path"`
44329    new_path="$unix_path"
44330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44332    new_path="$unix_path"
44333  fi
44334
44335
44336  # Now try to locate executable using which
44337  new_path=`$WHICH "$new_path" 2> /dev/null`
44338
44339  if test "x$new_path" = x; then
44340    # Oops. Which didn't find the executable.
44341    # The splitting of arguments from the executable at a space might have been incorrect,
44342    # since paths with space are more likely in Windows. Give it another try with the whole
44343    # argument.
44344    path="$complete"
44345    arguments="EOL"
44346    new_path="$path"
44347
44348  windows_path="$new_path"
44349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44350    unix_path=`$CYGPATH -u "$windows_path"`
44351    new_path="$unix_path"
44352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44354    new_path="$unix_path"
44355  fi
44356
44357
44358    new_path=`$WHICH "$new_path" 2> /dev/null`
44359    # bat and cmd files are not always considered executable in MSYS causing which
44360    # to not find them
44361    if test "x$new_path" = x \
44362        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44363        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44364      new_path="$path"
44365
44366  windows_path="$new_path"
44367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44368    unix_path=`$CYGPATH -u "$windows_path"`
44369    new_path="$unix_path"
44370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44372    new_path="$unix_path"
44373  fi
44374
44375    fi
44376
44377    if test "x$new_path" = x; then
44378      # It's still not found. Now this is an unrecoverable error.
44379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44380$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44381      has_space=`$ECHO "$complete" | $GREP " "`
44382      if test "x$has_space" != x; then
44383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44385      fi
44386      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44387    fi
44388  fi
44389
44390  # Now new_path has a complete unix path to the binary
44391  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44392    # Keep paths in /bin as-is, but remove trailing .exe if any
44393    new_path="${new_path/%.exe/}"
44394    # Do not save /bin paths to all_fixpath_prefixes!
44395  else
44396    # Not in mixed or Windows style, start by that.
44397    new_path=`cmd //c echo $new_path`
44398
44399  input_path="$new_path"
44400  # Check if we need to convert this using DOS-style short mode. If the path
44401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44402  # take no chances and rewrite it.
44403  # Note: m4 eats our [], so we need to use [ and ] instead.
44404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44405  if test "x$has_forbidden_chars" != x; then
44406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44408  fi
44409
44410    # Output is in $new_path
44411
44412  windows_path="$new_path"
44413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44414    unix_path=`$CYGPATH -u "$windows_path"`
44415    new_path="$unix_path"
44416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44418    new_path="$unix_path"
44419  fi
44420
44421    # remove trailing .exe if any
44422    new_path="${new_path/%.exe/}"
44423
44424    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44425    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44426  fi
44427
44428    else
44429      # We're on a unix platform. Hooray! :)
44430      # First separate the path from the arguments. This will split at the first
44431      # space.
44432      complete="$BUILD_CC"
44433      path="${complete%% *}"
44434      tmp="$complete EOL"
44435      arguments="${tmp#* }"
44436
44437      # Cannot rely on the command "which" here since it doesn't always work.
44438      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44439      if test -z "$is_absolute_path"; then
44440        # Path to executable is not absolute. Find it.
44441        IFS_save="$IFS"
44442        IFS=:
44443        for p in $PATH; do
44444          if test -f "$p/$path" && test -x "$p/$path"; then
44445            new_path="$p/$path"
44446            break
44447          fi
44448        done
44449        IFS="$IFS_save"
44450      else
44451        # This is an absolute path, we can use it without further modifications.
44452        new_path="$path"
44453      fi
44454
44455      if test "x$new_path" = x; then
44456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44457$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44458        has_space=`$ECHO "$complete" | $GREP " "`
44459        if test "x$has_space" != x; then
44460          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44461$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44462        fi
44463        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44464      fi
44465    fi
44466
44467    # Now join together the path and the arguments once again
44468    if test "x$arguments" != xEOL; then
44469      new_complete="$new_path ${arguments% *}"
44470    else
44471      new_complete="$new_path"
44472    fi
44473
44474    if test "x$complete" != "x$new_complete"; then
44475      BUILD_CC="$new_complete"
44476      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44477$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44478    fi
44479  fi
44480
44481
44482
44483
44484  # Publish this variable in the help.
44485
44486
44487  if [ -z "${BUILD_CXX+x}" ]; then
44488    # The variable is not set by user, try to locate tool using the code snippet
44489    for ac_prog in cl CC g++
44490do
44491  # Extract the first word of "$ac_prog", so it can be a program name with args.
44492set dummy $ac_prog; ac_word=$2
44493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44494$as_echo_n "checking for $ac_word... " >&6; }
44495if ${ac_cv_path_BUILD_CXX+:} false; then :
44496  $as_echo_n "(cached) " >&6
44497else
44498  case $BUILD_CXX in
44499  [\\/]* | ?:[\\/]*)
44500  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44501  ;;
44502  *)
44503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44504for as_dir in $PATH
44505do
44506  IFS=$as_save_IFS
44507  test -z "$as_dir" && as_dir=.
44508    for ac_exec_ext in '' $ac_executable_extensions; do
44509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44510    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44512    break 2
44513  fi
44514done
44515  done
44516IFS=$as_save_IFS
44517
44518  ;;
44519esac
44520fi
44521BUILD_CXX=$ac_cv_path_BUILD_CXX
44522if test -n "$BUILD_CXX"; then
44523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44524$as_echo "$BUILD_CXX" >&6; }
44525else
44526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44527$as_echo "no" >&6; }
44528fi
44529
44530
44531  test -n "$BUILD_CXX" && break
44532done
44533
44534  else
44535    # The variable is set, but is it from the command line or the environment?
44536
44537    # Try to remove the string !BUILD_CXX! from our list.
44538    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44539    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44540      # If it failed, the variable was not from the command line. Ignore it,
44541      # but warn the user (except for BASH, which is always set by the calling BASH).
44542      if test "xBUILD_CXX" != xBASH; then
44543        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44544$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44545      fi
44546      # Try to locate tool using the code snippet
44547      for ac_prog in cl CC g++
44548do
44549  # Extract the first word of "$ac_prog", so it can be a program name with args.
44550set dummy $ac_prog; ac_word=$2
44551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44552$as_echo_n "checking for $ac_word... " >&6; }
44553if ${ac_cv_path_BUILD_CXX+:} false; then :
44554  $as_echo_n "(cached) " >&6
44555else
44556  case $BUILD_CXX in
44557  [\\/]* | ?:[\\/]*)
44558  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44559  ;;
44560  *)
44561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44562for as_dir in $PATH
44563do
44564  IFS=$as_save_IFS
44565  test -z "$as_dir" && as_dir=.
44566    for ac_exec_ext in '' $ac_executable_extensions; do
44567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44568    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44570    break 2
44571  fi
44572done
44573  done
44574IFS=$as_save_IFS
44575
44576  ;;
44577esac
44578fi
44579BUILD_CXX=$ac_cv_path_BUILD_CXX
44580if test -n "$BUILD_CXX"; then
44581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44582$as_echo "$BUILD_CXX" >&6; }
44583else
44584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44585$as_echo "no" >&6; }
44586fi
44587
44588
44589  test -n "$BUILD_CXX" && break
44590done
44591
44592    else
44593      # If it succeeded, then it was overridden by the user. We will use it
44594      # for the tool.
44595
44596      # First remove it from the list of overridden variables, so we can test
44597      # for unknown variables in the end.
44598      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44599
44600      # Check if we try to supply an empty value
44601      if test "x$BUILD_CXX" = x; then
44602        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44603$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44604        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44605$as_echo_n "checking for BUILD_CXX... " >&6; }
44606        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44607$as_echo "disabled" >&6; }
44608      else
44609        # Check if the provided tool contains a complete path.
44610        tool_specified="$BUILD_CXX"
44611        tool_basename="${tool_specified##*/}"
44612        if test "x$tool_basename" = "x$tool_specified"; then
44613          # A command without a complete path is provided, search $PATH.
44614          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44615$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44616          # Extract the first word of "$tool_basename", so it can be a program name with args.
44617set dummy $tool_basename; ac_word=$2
44618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44619$as_echo_n "checking for $ac_word... " >&6; }
44620if ${ac_cv_path_BUILD_CXX+:} false; then :
44621  $as_echo_n "(cached) " >&6
44622else
44623  case $BUILD_CXX in
44624  [\\/]* | ?:[\\/]*)
44625  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44626  ;;
44627  *)
44628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44629for as_dir in $PATH
44630do
44631  IFS=$as_save_IFS
44632  test -z "$as_dir" && as_dir=.
44633    for ac_exec_ext in '' $ac_executable_extensions; do
44634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44635    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44637    break 2
44638  fi
44639done
44640  done
44641IFS=$as_save_IFS
44642
44643  ;;
44644esac
44645fi
44646BUILD_CXX=$ac_cv_path_BUILD_CXX
44647if test -n "$BUILD_CXX"; then
44648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44649$as_echo "$BUILD_CXX" >&6; }
44650else
44651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44652$as_echo "no" >&6; }
44653fi
44654
44655
44656          if test "x$BUILD_CXX" = x; then
44657            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44658          fi
44659        else
44660          # Otherwise we believe it is a complete path. Use it as it is.
44661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44662$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44663          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44664$as_echo_n "checking for BUILD_CXX... " >&6; }
44665          if test ! -x "$tool_specified"; then
44666            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44667$as_echo "not found" >&6; }
44668            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44669          fi
44670          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44671$as_echo "$tool_specified" >&6; }
44672        fi
44673      fi
44674    fi
44675
44676  fi
44677
44678
44679
44680  if test "x$BUILD_CXX" = x; then
44681    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44682  fi
44683
44684
44685
44686  # Only process if variable expands to non-empty
44687
44688  if test "x$BUILD_CXX" != x; then
44689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44690
44691  # First separate the path from the arguments. This will split at the first
44692  # space.
44693  complete="$BUILD_CXX"
44694  path="${complete%% *}"
44695  tmp="$complete EOL"
44696  arguments="${tmp#* }"
44697
44698  # Input might be given as Windows format, start by converting to
44699  # unix format.
44700  new_path=`$CYGPATH -u "$path"`
44701
44702  # Now try to locate executable using which
44703  new_path=`$WHICH "$new_path" 2> /dev/null`
44704  # bat and cmd files are not always considered executable in cygwin causing which
44705  # to not find them
44706  if test "x$new_path" = x \
44707      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44708      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44709    new_path=`$CYGPATH -u "$path"`
44710  fi
44711  if test "x$new_path" = x; then
44712    # Oops. Which didn't find the executable.
44713    # The splitting of arguments from the executable at a space might have been incorrect,
44714    # since paths with space are more likely in Windows. Give it another try with the whole
44715    # argument.
44716    path="$complete"
44717    arguments="EOL"
44718    new_path=`$CYGPATH -u "$path"`
44719    new_path=`$WHICH "$new_path" 2> /dev/null`
44720    # bat and cmd files are not always considered executable in cygwin causing which
44721    # to not find them
44722    if test "x$new_path" = x \
44723        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44724        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44725      new_path=`$CYGPATH -u "$path"`
44726    fi
44727    if test "x$new_path" = x; then
44728      # It's still not found. Now this is an unrecoverable error.
44729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44730$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44731      has_space=`$ECHO "$complete" | $GREP " "`
44732      if test "x$has_space" != x; then
44733        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44734$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44735      fi
44736      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44737    fi
44738  fi
44739
44740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44743  # "foo.exe" is OK but "foo" is an error.
44744  #
44745  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44746  # It is also a way to make sure we got the proper file name for the real test later on.
44747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44748  if test "x$test_shortpath" = x; then
44749    # Short path failed, file does not exist as specified.
44750    # Try adding .exe or .cmd
44751    if test -f "${new_path}.exe"; then
44752      input_to_shortpath="${new_path}.exe"
44753    elif test -f "${new_path}.cmd"; then
44754      input_to_shortpath="${new_path}.cmd"
44755    else
44756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44757$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44758      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44759$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44760      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44761    fi
44762  else
44763    input_to_shortpath="$new_path"
44764  fi
44765
44766  # Call helper function which possibly converts this using DOS-style short mode.
44767  # If so, the updated path is stored in $new_path.
44768  new_path="$input_to_shortpath"
44769
44770  input_path="$input_to_shortpath"
44771  # Check if we need to convert this using DOS-style short mode. If the path
44772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44773  # take no chances and rewrite it.
44774  # Note: m4 eats our [], so we need to use [ and ] instead.
44775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44776  if test "x$has_forbidden_chars" != x; then
44777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44781      # Going to short mode and back again did indeed matter. Since short mode is
44782      # case insensitive, let's make it lowercase to improve readability.
44783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44784      # Now convert it back to Unix-style (cygpath)
44785      input_path=`$CYGPATH -u "$shortmode_path"`
44786      new_path="$input_path"
44787    fi
44788  fi
44789
44790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44791  if test "x$test_cygdrive_prefix" = x; then
44792    # As a simple fix, exclude /usr/bin since it's not a real path.
44793    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44795      # a path prefixed by /cygdrive for fixpath to work.
44796      new_path="$CYGWIN_ROOT_PATH$input_path"
44797    fi
44798  fi
44799
44800  # remove trailing .exe if any
44801  new_path="${new_path/%.exe/}"
44802
44803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44804
44805  # First separate the path from the arguments. This will split at the first
44806  # space.
44807  complete="$BUILD_CXX"
44808  path="${complete%% *}"
44809  tmp="$complete EOL"
44810  arguments="${tmp#* }"
44811
44812  # Input might be given as Windows format, start by converting to
44813  # unix format.
44814  new_path="$path"
44815
44816  windows_path="$new_path"
44817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44818    unix_path=`$CYGPATH -u "$windows_path"`
44819    new_path="$unix_path"
44820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44822    new_path="$unix_path"
44823  fi
44824
44825
44826  # Now try to locate executable using which
44827  new_path=`$WHICH "$new_path" 2> /dev/null`
44828
44829  if test "x$new_path" = x; then
44830    # Oops. Which didn't find the executable.
44831    # The splitting of arguments from the executable at a space might have been incorrect,
44832    # since paths with space are more likely in Windows. Give it another try with the whole
44833    # argument.
44834    path="$complete"
44835    arguments="EOL"
44836    new_path="$path"
44837
44838  windows_path="$new_path"
44839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44840    unix_path=`$CYGPATH -u "$windows_path"`
44841    new_path="$unix_path"
44842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44844    new_path="$unix_path"
44845  fi
44846
44847
44848    new_path=`$WHICH "$new_path" 2> /dev/null`
44849    # bat and cmd files are not always considered executable in MSYS causing which
44850    # to not find them
44851    if test "x$new_path" = x \
44852        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44853        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44854      new_path="$path"
44855
44856  windows_path="$new_path"
44857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44858    unix_path=`$CYGPATH -u "$windows_path"`
44859    new_path="$unix_path"
44860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44862    new_path="$unix_path"
44863  fi
44864
44865    fi
44866
44867    if test "x$new_path" = x; then
44868      # It's still not found. Now this is an unrecoverable error.
44869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44870$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44871      has_space=`$ECHO "$complete" | $GREP " "`
44872      if test "x$has_space" != x; then
44873        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44874$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44875      fi
44876      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44877    fi
44878  fi
44879
44880  # Now new_path has a complete unix path to the binary
44881  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44882    # Keep paths in /bin as-is, but remove trailing .exe if any
44883    new_path="${new_path/%.exe/}"
44884    # Do not save /bin paths to all_fixpath_prefixes!
44885  else
44886    # Not in mixed or Windows style, start by that.
44887    new_path=`cmd //c echo $new_path`
44888
44889  input_path="$new_path"
44890  # Check if we need to convert this using DOS-style short mode. If the path
44891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44892  # take no chances and rewrite it.
44893  # Note: m4 eats our [], so we need to use [ and ] instead.
44894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44895  if test "x$has_forbidden_chars" != x; then
44896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44898  fi
44899
44900    # Output is in $new_path
44901
44902  windows_path="$new_path"
44903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44904    unix_path=`$CYGPATH -u "$windows_path"`
44905    new_path="$unix_path"
44906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44908    new_path="$unix_path"
44909  fi
44910
44911    # remove trailing .exe if any
44912    new_path="${new_path/%.exe/}"
44913
44914    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44915    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44916  fi
44917
44918    else
44919      # We're on a unix platform. Hooray! :)
44920      # First separate the path from the arguments. This will split at the first
44921      # space.
44922      complete="$BUILD_CXX"
44923      path="${complete%% *}"
44924      tmp="$complete EOL"
44925      arguments="${tmp#* }"
44926
44927      # Cannot rely on the command "which" here since it doesn't always work.
44928      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44929      if test -z "$is_absolute_path"; then
44930        # Path to executable is not absolute. Find it.
44931        IFS_save="$IFS"
44932        IFS=:
44933        for p in $PATH; do
44934          if test -f "$p/$path" && test -x "$p/$path"; then
44935            new_path="$p/$path"
44936            break
44937          fi
44938        done
44939        IFS="$IFS_save"
44940      else
44941        # This is an absolute path, we can use it without further modifications.
44942        new_path="$path"
44943      fi
44944
44945      if test "x$new_path" = x; then
44946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44947$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44948        has_space=`$ECHO "$complete" | $GREP " "`
44949        if test "x$has_space" != x; then
44950          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44951$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44952        fi
44953        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44954      fi
44955    fi
44956
44957    # Now join together the path and the arguments once again
44958    if test "x$arguments" != xEOL; then
44959      new_complete="$new_path ${arguments% *}"
44960    else
44961      new_complete="$new_path"
44962    fi
44963
44964    if test "x$complete" != "x$new_complete"; then
44965      BUILD_CXX="$new_complete"
44966      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44967$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44968    fi
44969  fi
44970
44971
44972
44973  # Publish this variable in the help.
44974
44975
44976  if [ -z "${BUILD_NM+x}" ]; then
44977    # The variable is not set by user, try to locate tool using the code snippet
44978    for ac_prog in nm gcc-nm
44979do
44980  # Extract the first word of "$ac_prog", so it can be a program name with args.
44981set dummy $ac_prog; ac_word=$2
44982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44983$as_echo_n "checking for $ac_word... " >&6; }
44984if ${ac_cv_path_BUILD_NM+:} false; then :
44985  $as_echo_n "(cached) " >&6
44986else
44987  case $BUILD_NM in
44988  [\\/]* | ?:[\\/]*)
44989  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44990  ;;
44991  *)
44992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44993for as_dir in $PATH
44994do
44995  IFS=$as_save_IFS
44996  test -z "$as_dir" && as_dir=.
44997    for ac_exec_ext in '' $ac_executable_extensions; do
44998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44999    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45001    break 2
45002  fi
45003done
45004  done
45005IFS=$as_save_IFS
45006
45007  ;;
45008esac
45009fi
45010BUILD_NM=$ac_cv_path_BUILD_NM
45011if test -n "$BUILD_NM"; then
45012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45013$as_echo "$BUILD_NM" >&6; }
45014else
45015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45016$as_echo "no" >&6; }
45017fi
45018
45019
45020  test -n "$BUILD_NM" && break
45021done
45022
45023  else
45024    # The variable is set, but is it from the command line or the environment?
45025
45026    # Try to remove the string !BUILD_NM! from our list.
45027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45029      # If it failed, the variable was not from the command line. Ignore it,
45030      # but warn the user (except for BASH, which is always set by the calling BASH).
45031      if test "xBUILD_NM" != xBASH; then
45032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45033$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45034      fi
45035      # Try to locate tool using the code snippet
45036      for ac_prog in nm gcc-nm
45037do
45038  # Extract the first word of "$ac_prog", so it can be a program name with args.
45039set dummy $ac_prog; ac_word=$2
45040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45041$as_echo_n "checking for $ac_word... " >&6; }
45042if ${ac_cv_path_BUILD_NM+:} false; then :
45043  $as_echo_n "(cached) " >&6
45044else
45045  case $BUILD_NM in
45046  [\\/]* | ?:[\\/]*)
45047  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45048  ;;
45049  *)
45050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45051for as_dir in $PATH
45052do
45053  IFS=$as_save_IFS
45054  test -z "$as_dir" && as_dir=.
45055    for ac_exec_ext in '' $ac_executable_extensions; do
45056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45057    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45059    break 2
45060  fi
45061done
45062  done
45063IFS=$as_save_IFS
45064
45065  ;;
45066esac
45067fi
45068BUILD_NM=$ac_cv_path_BUILD_NM
45069if test -n "$BUILD_NM"; then
45070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45071$as_echo "$BUILD_NM" >&6; }
45072else
45073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45074$as_echo "no" >&6; }
45075fi
45076
45077
45078  test -n "$BUILD_NM" && break
45079done
45080
45081    else
45082      # If it succeeded, then it was overridden by the user. We will use it
45083      # for the tool.
45084
45085      # First remove it from the list of overridden variables, so we can test
45086      # for unknown variables in the end.
45087      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45088
45089      # Check if we try to supply an empty value
45090      if test "x$BUILD_NM" = x; then
45091        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45092$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45094$as_echo_n "checking for BUILD_NM... " >&6; }
45095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45096$as_echo "disabled" >&6; }
45097      else
45098        # Check if the provided tool contains a complete path.
45099        tool_specified="$BUILD_NM"
45100        tool_basename="${tool_specified##*/}"
45101        if test "x$tool_basename" = "x$tool_specified"; then
45102          # A command without a complete path is provided, search $PATH.
45103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45104$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45105          # Extract the first word of "$tool_basename", so it can be a program name with args.
45106set dummy $tool_basename; ac_word=$2
45107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45108$as_echo_n "checking for $ac_word... " >&6; }
45109if ${ac_cv_path_BUILD_NM+:} false; then :
45110  $as_echo_n "(cached) " >&6
45111else
45112  case $BUILD_NM in
45113  [\\/]* | ?:[\\/]*)
45114  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45115  ;;
45116  *)
45117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45118for as_dir in $PATH
45119do
45120  IFS=$as_save_IFS
45121  test -z "$as_dir" && as_dir=.
45122    for ac_exec_ext in '' $ac_executable_extensions; do
45123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45124    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45126    break 2
45127  fi
45128done
45129  done
45130IFS=$as_save_IFS
45131
45132  ;;
45133esac
45134fi
45135BUILD_NM=$ac_cv_path_BUILD_NM
45136if test -n "$BUILD_NM"; then
45137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45138$as_echo "$BUILD_NM" >&6; }
45139else
45140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45141$as_echo "no" >&6; }
45142fi
45143
45144
45145          if test "x$BUILD_NM" = x; then
45146            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45147          fi
45148        else
45149          # Otherwise we believe it is a complete path. Use it as it is.
45150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45151$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45152          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45153$as_echo_n "checking for BUILD_NM... " >&6; }
45154          if test ! -x "$tool_specified"; then
45155            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45156$as_echo "not found" >&6; }
45157            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45158          fi
45159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45160$as_echo "$tool_specified" >&6; }
45161        fi
45162      fi
45163    fi
45164
45165  fi
45166
45167
45168
45169  # Only process if variable expands to non-empty
45170
45171  if test "x$BUILD_NM" != x; then
45172    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45173
45174  # First separate the path from the arguments. This will split at the first
45175  # space.
45176  complete="$BUILD_NM"
45177  path="${complete%% *}"
45178  tmp="$complete EOL"
45179  arguments="${tmp#* }"
45180
45181  # Input might be given as Windows format, start by converting to
45182  # unix format.
45183  new_path=`$CYGPATH -u "$path"`
45184
45185  # Now try to locate executable using which
45186  new_path=`$WHICH "$new_path" 2> /dev/null`
45187  # bat and cmd files are not always considered executable in cygwin causing which
45188  # to not find them
45189  if test "x$new_path" = x \
45190      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45191      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45192    new_path=`$CYGPATH -u "$path"`
45193  fi
45194  if test "x$new_path" = x; then
45195    # Oops. Which didn't find the executable.
45196    # The splitting of arguments from the executable at a space might have been incorrect,
45197    # since paths with space are more likely in Windows. Give it another try with the whole
45198    # argument.
45199    path="$complete"
45200    arguments="EOL"
45201    new_path=`$CYGPATH -u "$path"`
45202    new_path=`$WHICH "$new_path" 2> /dev/null`
45203    # bat and cmd files are not always considered executable in cygwin causing which
45204    # to not find them
45205    if test "x$new_path" = x \
45206        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45207        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45208      new_path=`$CYGPATH -u "$path"`
45209    fi
45210    if test "x$new_path" = x; then
45211      # It's still not found. Now this is an unrecoverable error.
45212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45213$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45214      has_space=`$ECHO "$complete" | $GREP " "`
45215      if test "x$has_space" != x; then
45216        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45217$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45218      fi
45219      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45220    fi
45221  fi
45222
45223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45226  # "foo.exe" is OK but "foo" is an error.
45227  #
45228  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45229  # It is also a way to make sure we got the proper file name for the real test later on.
45230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45231  if test "x$test_shortpath" = x; then
45232    # Short path failed, file does not exist as specified.
45233    # Try adding .exe or .cmd
45234    if test -f "${new_path}.exe"; then
45235      input_to_shortpath="${new_path}.exe"
45236    elif test -f "${new_path}.cmd"; then
45237      input_to_shortpath="${new_path}.cmd"
45238    else
45239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45240$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45241      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45242$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45243      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45244    fi
45245  else
45246    input_to_shortpath="$new_path"
45247  fi
45248
45249  # Call helper function which possibly converts this using DOS-style short mode.
45250  # If so, the updated path is stored in $new_path.
45251  new_path="$input_to_shortpath"
45252
45253  input_path="$input_to_shortpath"
45254  # Check if we need to convert this using DOS-style short mode. If the path
45255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45256  # take no chances and rewrite it.
45257  # Note: m4 eats our [], so we need to use [ and ] instead.
45258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45259  if test "x$has_forbidden_chars" != x; then
45260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45264      # Going to short mode and back again did indeed matter. Since short mode is
45265      # case insensitive, let's make it lowercase to improve readability.
45266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45267      # Now convert it back to Unix-style (cygpath)
45268      input_path=`$CYGPATH -u "$shortmode_path"`
45269      new_path="$input_path"
45270    fi
45271  fi
45272
45273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45274  if test "x$test_cygdrive_prefix" = x; then
45275    # As a simple fix, exclude /usr/bin since it's not a real path.
45276    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45278      # a path prefixed by /cygdrive for fixpath to work.
45279      new_path="$CYGWIN_ROOT_PATH$input_path"
45280    fi
45281  fi
45282
45283  # remove trailing .exe if any
45284  new_path="${new_path/%.exe/}"
45285
45286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45287
45288  # First separate the path from the arguments. This will split at the first
45289  # space.
45290  complete="$BUILD_NM"
45291  path="${complete%% *}"
45292  tmp="$complete EOL"
45293  arguments="${tmp#* }"
45294
45295  # Input might be given as Windows format, start by converting to
45296  # unix format.
45297  new_path="$path"
45298
45299  windows_path="$new_path"
45300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45301    unix_path=`$CYGPATH -u "$windows_path"`
45302    new_path="$unix_path"
45303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45305    new_path="$unix_path"
45306  fi
45307
45308
45309  # Now try to locate executable using which
45310  new_path=`$WHICH "$new_path" 2> /dev/null`
45311
45312  if test "x$new_path" = x; then
45313    # Oops. Which didn't find the executable.
45314    # The splitting of arguments from the executable at a space might have been incorrect,
45315    # since paths with space are more likely in Windows. Give it another try with the whole
45316    # argument.
45317    path="$complete"
45318    arguments="EOL"
45319    new_path="$path"
45320
45321  windows_path="$new_path"
45322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45323    unix_path=`$CYGPATH -u "$windows_path"`
45324    new_path="$unix_path"
45325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45327    new_path="$unix_path"
45328  fi
45329
45330
45331    new_path=`$WHICH "$new_path" 2> /dev/null`
45332    # bat and cmd files are not always considered executable in MSYS causing which
45333    # to not find them
45334    if test "x$new_path" = x \
45335        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45336        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45337      new_path="$path"
45338
45339  windows_path="$new_path"
45340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45341    unix_path=`$CYGPATH -u "$windows_path"`
45342    new_path="$unix_path"
45343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45345    new_path="$unix_path"
45346  fi
45347
45348    fi
45349
45350    if test "x$new_path" = x; then
45351      # It's still not found. Now this is an unrecoverable error.
45352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45353$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45354      has_space=`$ECHO "$complete" | $GREP " "`
45355      if test "x$has_space" != x; then
45356        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45357$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45358      fi
45359      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45360    fi
45361  fi
45362
45363  # Now new_path has a complete unix path to the binary
45364  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45365    # Keep paths in /bin as-is, but remove trailing .exe if any
45366    new_path="${new_path/%.exe/}"
45367    # Do not save /bin paths to all_fixpath_prefixes!
45368  else
45369    # Not in mixed or Windows style, start by that.
45370    new_path=`cmd //c echo $new_path`
45371
45372  input_path="$new_path"
45373  # Check if we need to convert this using DOS-style short mode. If the path
45374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45375  # take no chances and rewrite it.
45376  # Note: m4 eats our [], so we need to use [ and ] instead.
45377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45378  if test "x$has_forbidden_chars" != x; then
45379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45381  fi
45382
45383    # Output is in $new_path
45384
45385  windows_path="$new_path"
45386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45387    unix_path=`$CYGPATH -u "$windows_path"`
45388    new_path="$unix_path"
45389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45391    new_path="$unix_path"
45392  fi
45393
45394    # remove trailing .exe if any
45395    new_path="${new_path/%.exe/}"
45396
45397    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45398    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45399  fi
45400
45401    else
45402      # We're on a unix platform. Hooray! :)
45403      # First separate the path from the arguments. This will split at the first
45404      # space.
45405      complete="$BUILD_NM"
45406      path="${complete%% *}"
45407      tmp="$complete EOL"
45408      arguments="${tmp#* }"
45409
45410      # Cannot rely on the command "which" here since it doesn't always work.
45411      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45412      if test -z "$is_absolute_path"; then
45413        # Path to executable is not absolute. Find it.
45414        IFS_save="$IFS"
45415        IFS=:
45416        for p in $PATH; do
45417          if test -f "$p/$path" && test -x "$p/$path"; then
45418            new_path="$p/$path"
45419            break
45420          fi
45421        done
45422        IFS="$IFS_save"
45423      else
45424        # This is an absolute path, we can use it without further modifications.
45425        new_path="$path"
45426      fi
45427
45428      if test "x$new_path" = x; then
45429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45430$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45431        has_space=`$ECHO "$complete" | $GREP " "`
45432        if test "x$has_space" != x; then
45433          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45434$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45435        fi
45436        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45437      fi
45438    fi
45439
45440    # Now join together the path and the arguments once again
45441    if test "x$arguments" != xEOL; then
45442      new_complete="$new_path ${arguments% *}"
45443    else
45444      new_complete="$new_path"
45445    fi
45446
45447    if test "x$complete" != "x$new_complete"; then
45448      BUILD_NM="$new_complete"
45449      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45450$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45451    fi
45452  fi
45453
45454
45455
45456  # Publish this variable in the help.
45457
45458
45459  if [ -z "${BUILD_AR+x}" ]; then
45460    # The variable is not set by user, try to locate tool using the code snippet
45461    for ac_prog in ar gcc-ar
45462do
45463  # Extract the first word of "$ac_prog", so it can be a program name with args.
45464set dummy $ac_prog; ac_word=$2
45465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45466$as_echo_n "checking for $ac_word... " >&6; }
45467if ${ac_cv_path_BUILD_AR+:} false; then :
45468  $as_echo_n "(cached) " >&6
45469else
45470  case $BUILD_AR in
45471  [\\/]* | ?:[\\/]*)
45472  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45473  ;;
45474  *)
45475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45476for as_dir in $PATH
45477do
45478  IFS=$as_save_IFS
45479  test -z "$as_dir" && as_dir=.
45480    for ac_exec_ext in '' $ac_executable_extensions; do
45481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45482    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45484    break 2
45485  fi
45486done
45487  done
45488IFS=$as_save_IFS
45489
45490  ;;
45491esac
45492fi
45493BUILD_AR=$ac_cv_path_BUILD_AR
45494if test -n "$BUILD_AR"; then
45495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45496$as_echo "$BUILD_AR" >&6; }
45497else
45498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45499$as_echo "no" >&6; }
45500fi
45501
45502
45503  test -n "$BUILD_AR" && break
45504done
45505
45506  else
45507    # The variable is set, but is it from the command line or the environment?
45508
45509    # Try to remove the string !BUILD_AR! from our list.
45510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45512      # If it failed, the variable was not from the command line. Ignore it,
45513      # but warn the user (except for BASH, which is always set by the calling BASH).
45514      if test "xBUILD_AR" != xBASH; then
45515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45516$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45517      fi
45518      # Try to locate tool using the code snippet
45519      for ac_prog in ar gcc-ar
45520do
45521  # Extract the first word of "$ac_prog", so it can be a program name with args.
45522set dummy $ac_prog; ac_word=$2
45523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45524$as_echo_n "checking for $ac_word... " >&6; }
45525if ${ac_cv_path_BUILD_AR+:} false; then :
45526  $as_echo_n "(cached) " >&6
45527else
45528  case $BUILD_AR in
45529  [\\/]* | ?:[\\/]*)
45530  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45531  ;;
45532  *)
45533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45534for as_dir in $PATH
45535do
45536  IFS=$as_save_IFS
45537  test -z "$as_dir" && as_dir=.
45538    for ac_exec_ext in '' $ac_executable_extensions; do
45539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45540    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45542    break 2
45543  fi
45544done
45545  done
45546IFS=$as_save_IFS
45547
45548  ;;
45549esac
45550fi
45551BUILD_AR=$ac_cv_path_BUILD_AR
45552if test -n "$BUILD_AR"; then
45553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45554$as_echo "$BUILD_AR" >&6; }
45555else
45556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45557$as_echo "no" >&6; }
45558fi
45559
45560
45561  test -n "$BUILD_AR" && break
45562done
45563
45564    else
45565      # If it succeeded, then it was overridden by the user. We will use it
45566      # for the tool.
45567
45568      # First remove it from the list of overridden variables, so we can test
45569      # for unknown variables in the end.
45570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45571
45572      # Check if we try to supply an empty value
45573      if test "x$BUILD_AR" = x; then
45574        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45575$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45577$as_echo_n "checking for BUILD_AR... " >&6; }
45578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45579$as_echo "disabled" >&6; }
45580      else
45581        # Check if the provided tool contains a complete path.
45582        tool_specified="$BUILD_AR"
45583        tool_basename="${tool_specified##*/}"
45584        if test "x$tool_basename" = "x$tool_specified"; then
45585          # A command without a complete path is provided, search $PATH.
45586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45587$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45588          # Extract the first word of "$tool_basename", so it can be a program name with args.
45589set dummy $tool_basename; ac_word=$2
45590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45591$as_echo_n "checking for $ac_word... " >&6; }
45592if ${ac_cv_path_BUILD_AR+:} false; then :
45593  $as_echo_n "(cached) " >&6
45594else
45595  case $BUILD_AR in
45596  [\\/]* | ?:[\\/]*)
45597  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45598  ;;
45599  *)
45600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45601for as_dir in $PATH
45602do
45603  IFS=$as_save_IFS
45604  test -z "$as_dir" && as_dir=.
45605    for ac_exec_ext in '' $ac_executable_extensions; do
45606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45607    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45609    break 2
45610  fi
45611done
45612  done
45613IFS=$as_save_IFS
45614
45615  ;;
45616esac
45617fi
45618BUILD_AR=$ac_cv_path_BUILD_AR
45619if test -n "$BUILD_AR"; then
45620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45621$as_echo "$BUILD_AR" >&6; }
45622else
45623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45624$as_echo "no" >&6; }
45625fi
45626
45627
45628          if test "x$BUILD_AR" = x; then
45629            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45630          fi
45631        else
45632          # Otherwise we believe it is a complete path. Use it as it is.
45633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45634$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45635          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45636$as_echo_n "checking for BUILD_AR... " >&6; }
45637          if test ! -x "$tool_specified"; then
45638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45639$as_echo "not found" >&6; }
45640            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45641          fi
45642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45643$as_echo "$tool_specified" >&6; }
45644        fi
45645      fi
45646    fi
45647
45648  fi
45649
45650
45651
45652  # Only process if variable expands to non-empty
45653
45654  if test "x$BUILD_AR" != x; then
45655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45656
45657  # First separate the path from the arguments. This will split at the first
45658  # space.
45659  complete="$BUILD_AR"
45660  path="${complete%% *}"
45661  tmp="$complete EOL"
45662  arguments="${tmp#* }"
45663
45664  # Input might be given as Windows format, start by converting to
45665  # unix format.
45666  new_path=`$CYGPATH -u "$path"`
45667
45668  # Now try to locate executable using which
45669  new_path=`$WHICH "$new_path" 2> /dev/null`
45670  # bat and cmd files are not always considered executable in cygwin causing which
45671  # to not find them
45672  if test "x$new_path" = x \
45673      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45674      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45675    new_path=`$CYGPATH -u "$path"`
45676  fi
45677  if test "x$new_path" = x; then
45678    # Oops. Which didn't find the executable.
45679    # The splitting of arguments from the executable at a space might have been incorrect,
45680    # since paths with space are more likely in Windows. Give it another try with the whole
45681    # argument.
45682    path="$complete"
45683    arguments="EOL"
45684    new_path=`$CYGPATH -u "$path"`
45685    new_path=`$WHICH "$new_path" 2> /dev/null`
45686    # bat and cmd files are not always considered executable in cygwin causing which
45687    # to not find them
45688    if test "x$new_path" = x \
45689        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45690        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45691      new_path=`$CYGPATH -u "$path"`
45692    fi
45693    if test "x$new_path" = x; then
45694      # It's still not found. Now this is an unrecoverable error.
45695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45696$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45697      has_space=`$ECHO "$complete" | $GREP " "`
45698      if test "x$has_space" != x; then
45699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45701      fi
45702      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45703    fi
45704  fi
45705
45706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45709  # "foo.exe" is OK but "foo" is an error.
45710  #
45711  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45712  # It is also a way to make sure we got the proper file name for the real test later on.
45713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45714  if test "x$test_shortpath" = x; then
45715    # Short path failed, file does not exist as specified.
45716    # Try adding .exe or .cmd
45717    if test -f "${new_path}.exe"; then
45718      input_to_shortpath="${new_path}.exe"
45719    elif test -f "${new_path}.cmd"; then
45720      input_to_shortpath="${new_path}.cmd"
45721    else
45722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45723$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45724      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45725$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45726      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45727    fi
45728  else
45729    input_to_shortpath="$new_path"
45730  fi
45731
45732  # Call helper function which possibly converts this using DOS-style short mode.
45733  # If so, the updated path is stored in $new_path.
45734  new_path="$input_to_shortpath"
45735
45736  input_path="$input_to_shortpath"
45737  # Check if we need to convert this using DOS-style short mode. If the path
45738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45739  # take no chances and rewrite it.
45740  # Note: m4 eats our [], so we need to use [ and ] instead.
45741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45742  if test "x$has_forbidden_chars" != x; then
45743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45747      # Going to short mode and back again did indeed matter. Since short mode is
45748      # case insensitive, let's make it lowercase to improve readability.
45749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45750      # Now convert it back to Unix-style (cygpath)
45751      input_path=`$CYGPATH -u "$shortmode_path"`
45752      new_path="$input_path"
45753    fi
45754  fi
45755
45756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45757  if test "x$test_cygdrive_prefix" = x; then
45758    # As a simple fix, exclude /usr/bin since it's not a real path.
45759    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45761      # a path prefixed by /cygdrive for fixpath to work.
45762      new_path="$CYGWIN_ROOT_PATH$input_path"
45763    fi
45764  fi
45765
45766  # remove trailing .exe if any
45767  new_path="${new_path/%.exe/}"
45768
45769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45770
45771  # First separate the path from the arguments. This will split at the first
45772  # space.
45773  complete="$BUILD_AR"
45774  path="${complete%% *}"
45775  tmp="$complete EOL"
45776  arguments="${tmp#* }"
45777
45778  # Input might be given as Windows format, start by converting to
45779  # unix format.
45780  new_path="$path"
45781
45782  windows_path="$new_path"
45783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45784    unix_path=`$CYGPATH -u "$windows_path"`
45785    new_path="$unix_path"
45786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45788    new_path="$unix_path"
45789  fi
45790
45791
45792  # Now try to locate executable using which
45793  new_path=`$WHICH "$new_path" 2> /dev/null`
45794
45795  if test "x$new_path" = x; then
45796    # Oops. Which didn't find the executable.
45797    # The splitting of arguments from the executable at a space might have been incorrect,
45798    # since paths with space are more likely in Windows. Give it another try with the whole
45799    # argument.
45800    path="$complete"
45801    arguments="EOL"
45802    new_path="$path"
45803
45804  windows_path="$new_path"
45805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45806    unix_path=`$CYGPATH -u "$windows_path"`
45807    new_path="$unix_path"
45808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45810    new_path="$unix_path"
45811  fi
45812
45813
45814    new_path=`$WHICH "$new_path" 2> /dev/null`
45815    # bat and cmd files are not always considered executable in MSYS causing which
45816    # to not find them
45817    if test "x$new_path" = x \
45818        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45819        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45820      new_path="$path"
45821
45822  windows_path="$new_path"
45823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45824    unix_path=`$CYGPATH -u "$windows_path"`
45825    new_path="$unix_path"
45826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45828    new_path="$unix_path"
45829  fi
45830
45831    fi
45832
45833    if test "x$new_path" = x; then
45834      # It's still not found. Now this is an unrecoverable error.
45835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45836$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45837      has_space=`$ECHO "$complete" | $GREP " "`
45838      if test "x$has_space" != x; then
45839        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45840$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45841      fi
45842      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45843    fi
45844  fi
45845
45846  # Now new_path has a complete unix path to the binary
45847  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45848    # Keep paths in /bin as-is, but remove trailing .exe if any
45849    new_path="${new_path/%.exe/}"
45850    # Do not save /bin paths to all_fixpath_prefixes!
45851  else
45852    # Not in mixed or Windows style, start by that.
45853    new_path=`cmd //c echo $new_path`
45854
45855  input_path="$new_path"
45856  # Check if we need to convert this using DOS-style short mode. If the path
45857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45858  # take no chances and rewrite it.
45859  # Note: m4 eats our [], so we need to use [ and ] instead.
45860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45861  if test "x$has_forbidden_chars" != x; then
45862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45863    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45864  fi
45865
45866    # Output is in $new_path
45867
45868  windows_path="$new_path"
45869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45870    unix_path=`$CYGPATH -u "$windows_path"`
45871    new_path="$unix_path"
45872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45874    new_path="$unix_path"
45875  fi
45876
45877    # remove trailing .exe if any
45878    new_path="${new_path/%.exe/}"
45879
45880    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45881    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45882  fi
45883
45884    else
45885      # We're on a unix platform. Hooray! :)
45886      # First separate the path from the arguments. This will split at the first
45887      # space.
45888      complete="$BUILD_AR"
45889      path="${complete%% *}"
45890      tmp="$complete EOL"
45891      arguments="${tmp#* }"
45892
45893      # Cannot rely on the command "which" here since it doesn't always work.
45894      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45895      if test -z "$is_absolute_path"; then
45896        # Path to executable is not absolute. Find it.
45897        IFS_save="$IFS"
45898        IFS=:
45899        for p in $PATH; do
45900          if test -f "$p/$path" && test -x "$p/$path"; then
45901            new_path="$p/$path"
45902            break
45903          fi
45904        done
45905        IFS="$IFS_save"
45906      else
45907        # This is an absolute path, we can use it without further modifications.
45908        new_path="$path"
45909      fi
45910
45911      if test "x$new_path" = x; then
45912        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45913$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45914        has_space=`$ECHO "$complete" | $GREP " "`
45915        if test "x$has_space" != x; then
45916          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45917$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45918        fi
45919        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45920      fi
45921    fi
45922
45923    # Now join together the path and the arguments once again
45924    if test "x$arguments" != xEOL; then
45925      new_complete="$new_path ${arguments% *}"
45926    else
45927      new_complete="$new_path"
45928    fi
45929
45930    if test "x$complete" != "x$new_complete"; then
45931      BUILD_AR="$new_complete"
45932      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45933$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45934    fi
45935  fi
45936
45937
45938
45939  # Publish this variable in the help.
45940
45941
45942  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45943    # The variable is not set by user, try to locate tool using the code snippet
45944    for ac_prog in objcopy
45945do
45946  # Extract the first word of "$ac_prog", so it can be a program name with args.
45947set dummy $ac_prog; ac_word=$2
45948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45949$as_echo_n "checking for $ac_word... " >&6; }
45950if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45951  $as_echo_n "(cached) " >&6
45952else
45953  case $BUILD_OBJCOPY in
45954  [\\/]* | ?:[\\/]*)
45955  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45956  ;;
45957  *)
45958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45959for as_dir in $PATH
45960do
45961  IFS=$as_save_IFS
45962  test -z "$as_dir" && as_dir=.
45963    for ac_exec_ext in '' $ac_executable_extensions; do
45964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45965    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45967    break 2
45968  fi
45969done
45970  done
45971IFS=$as_save_IFS
45972
45973  ;;
45974esac
45975fi
45976BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45977if test -n "$BUILD_OBJCOPY"; then
45978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45979$as_echo "$BUILD_OBJCOPY" >&6; }
45980else
45981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45982$as_echo "no" >&6; }
45983fi
45984
45985
45986  test -n "$BUILD_OBJCOPY" && break
45987done
45988
45989  else
45990    # The variable is set, but is it from the command line or the environment?
45991
45992    # Try to remove the string !BUILD_OBJCOPY! from our list.
45993    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45994    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45995      # If it failed, the variable was not from the command line. Ignore it,
45996      # but warn the user (except for BASH, which is always set by the calling BASH).
45997      if test "xBUILD_OBJCOPY" != xBASH; then
45998        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45999$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46000      fi
46001      # Try to locate tool using the code snippet
46002      for ac_prog in objcopy
46003do
46004  # Extract the first word of "$ac_prog", so it can be a program name with args.
46005set dummy $ac_prog; ac_word=$2
46006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46007$as_echo_n "checking for $ac_word... " >&6; }
46008if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46009  $as_echo_n "(cached) " >&6
46010else
46011  case $BUILD_OBJCOPY in
46012  [\\/]* | ?:[\\/]*)
46013  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46014  ;;
46015  *)
46016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46017for as_dir in $PATH
46018do
46019  IFS=$as_save_IFS
46020  test -z "$as_dir" && as_dir=.
46021    for ac_exec_ext in '' $ac_executable_extensions; do
46022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46023    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46025    break 2
46026  fi
46027done
46028  done
46029IFS=$as_save_IFS
46030
46031  ;;
46032esac
46033fi
46034BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46035if test -n "$BUILD_OBJCOPY"; then
46036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46037$as_echo "$BUILD_OBJCOPY" >&6; }
46038else
46039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46040$as_echo "no" >&6; }
46041fi
46042
46043
46044  test -n "$BUILD_OBJCOPY" && break
46045done
46046
46047    else
46048      # If it succeeded, then it was overridden by the user. We will use it
46049      # for the tool.
46050
46051      # First remove it from the list of overridden variables, so we can test
46052      # for unknown variables in the end.
46053      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46054
46055      # Check if we try to supply an empty value
46056      if test "x$BUILD_OBJCOPY" = x; then
46057        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46058$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46060$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46062$as_echo "disabled" >&6; }
46063      else
46064        # Check if the provided tool contains a complete path.
46065        tool_specified="$BUILD_OBJCOPY"
46066        tool_basename="${tool_specified##*/}"
46067        if test "x$tool_basename" = "x$tool_specified"; then
46068          # A command without a complete path is provided, search $PATH.
46069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46070$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46071          # Extract the first word of "$tool_basename", so it can be a program name with args.
46072set dummy $tool_basename; ac_word=$2
46073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46074$as_echo_n "checking for $ac_word... " >&6; }
46075if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46076  $as_echo_n "(cached) " >&6
46077else
46078  case $BUILD_OBJCOPY in
46079  [\\/]* | ?:[\\/]*)
46080  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46081  ;;
46082  *)
46083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46084for as_dir in $PATH
46085do
46086  IFS=$as_save_IFS
46087  test -z "$as_dir" && as_dir=.
46088    for ac_exec_ext in '' $ac_executable_extensions; do
46089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46090    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46092    break 2
46093  fi
46094done
46095  done
46096IFS=$as_save_IFS
46097
46098  ;;
46099esac
46100fi
46101BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46102if test -n "$BUILD_OBJCOPY"; then
46103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46104$as_echo "$BUILD_OBJCOPY" >&6; }
46105else
46106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46107$as_echo "no" >&6; }
46108fi
46109
46110
46111          if test "x$BUILD_OBJCOPY" = x; then
46112            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46113          fi
46114        else
46115          # Otherwise we believe it is a complete path. Use it as it is.
46116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46117$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46118          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46119$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46120          if test ! -x "$tool_specified"; then
46121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46122$as_echo "not found" >&6; }
46123            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46124          fi
46125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46126$as_echo "$tool_specified" >&6; }
46127        fi
46128      fi
46129    fi
46130
46131  fi
46132
46133
46134
46135  # Only process if variable expands to non-empty
46136
46137  if test "x$BUILD_OBJCOPY" != x; then
46138    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46139
46140  # First separate the path from the arguments. This will split at the first
46141  # space.
46142  complete="$BUILD_OBJCOPY"
46143  path="${complete%% *}"
46144  tmp="$complete EOL"
46145  arguments="${tmp#* }"
46146
46147  # Input might be given as Windows format, start by converting to
46148  # unix format.
46149  new_path=`$CYGPATH -u "$path"`
46150
46151  # Now try to locate executable using which
46152  new_path=`$WHICH "$new_path" 2> /dev/null`
46153  # bat and cmd files are not always considered executable in cygwin causing which
46154  # to not find them
46155  if test "x$new_path" = x \
46156      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46157      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46158    new_path=`$CYGPATH -u "$path"`
46159  fi
46160  if test "x$new_path" = x; then
46161    # Oops. Which didn't find the executable.
46162    # The splitting of arguments from the executable at a space might have been incorrect,
46163    # since paths with space are more likely in Windows. Give it another try with the whole
46164    # argument.
46165    path="$complete"
46166    arguments="EOL"
46167    new_path=`$CYGPATH -u "$path"`
46168    new_path=`$WHICH "$new_path" 2> /dev/null`
46169    # bat and cmd files are not always considered executable in cygwin causing which
46170    # to not find them
46171    if test "x$new_path" = x \
46172        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46173        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46174      new_path=`$CYGPATH -u "$path"`
46175    fi
46176    if test "x$new_path" = x; then
46177      # It's still not found. Now this is an unrecoverable error.
46178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46179$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46180      has_space=`$ECHO "$complete" | $GREP " "`
46181      if test "x$has_space" != x; then
46182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46184      fi
46185      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46186    fi
46187  fi
46188
46189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46192  # "foo.exe" is OK but "foo" is an error.
46193  #
46194  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46195  # It is also a way to make sure we got the proper file name for the real test later on.
46196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46197  if test "x$test_shortpath" = x; then
46198    # Short path failed, file does not exist as specified.
46199    # Try adding .exe or .cmd
46200    if test -f "${new_path}.exe"; then
46201      input_to_shortpath="${new_path}.exe"
46202    elif test -f "${new_path}.cmd"; then
46203      input_to_shortpath="${new_path}.cmd"
46204    else
46205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46206$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46207      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46208$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46209      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46210    fi
46211  else
46212    input_to_shortpath="$new_path"
46213  fi
46214
46215  # Call helper function which possibly converts this using DOS-style short mode.
46216  # If so, the updated path is stored in $new_path.
46217  new_path="$input_to_shortpath"
46218
46219  input_path="$input_to_shortpath"
46220  # Check if we need to convert this using DOS-style short mode. If the path
46221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46222  # take no chances and rewrite it.
46223  # Note: m4 eats our [], so we need to use [ and ] instead.
46224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46225  if test "x$has_forbidden_chars" != x; then
46226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46230      # Going to short mode and back again did indeed matter. Since short mode is
46231      # case insensitive, let's make it lowercase to improve readability.
46232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46233      # Now convert it back to Unix-style (cygpath)
46234      input_path=`$CYGPATH -u "$shortmode_path"`
46235      new_path="$input_path"
46236    fi
46237  fi
46238
46239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46240  if test "x$test_cygdrive_prefix" = x; then
46241    # As a simple fix, exclude /usr/bin since it's not a real path.
46242    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46244      # a path prefixed by /cygdrive for fixpath to work.
46245      new_path="$CYGWIN_ROOT_PATH$input_path"
46246    fi
46247  fi
46248
46249  # remove trailing .exe if any
46250  new_path="${new_path/%.exe/}"
46251
46252    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46253
46254  # First separate the path from the arguments. This will split at the first
46255  # space.
46256  complete="$BUILD_OBJCOPY"
46257  path="${complete%% *}"
46258  tmp="$complete EOL"
46259  arguments="${tmp#* }"
46260
46261  # Input might be given as Windows format, start by converting to
46262  # unix format.
46263  new_path="$path"
46264
46265  windows_path="$new_path"
46266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46267    unix_path=`$CYGPATH -u "$windows_path"`
46268    new_path="$unix_path"
46269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46271    new_path="$unix_path"
46272  fi
46273
46274
46275  # Now try to locate executable using which
46276  new_path=`$WHICH "$new_path" 2> /dev/null`
46277
46278  if test "x$new_path" = x; then
46279    # Oops. Which didn't find the executable.
46280    # The splitting of arguments from the executable at a space might have been incorrect,
46281    # since paths with space are more likely in Windows. Give it another try with the whole
46282    # argument.
46283    path="$complete"
46284    arguments="EOL"
46285    new_path="$path"
46286
46287  windows_path="$new_path"
46288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46289    unix_path=`$CYGPATH -u "$windows_path"`
46290    new_path="$unix_path"
46291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46293    new_path="$unix_path"
46294  fi
46295
46296
46297    new_path=`$WHICH "$new_path" 2> /dev/null`
46298    # bat and cmd files are not always considered executable in MSYS causing which
46299    # to not find them
46300    if test "x$new_path" = x \
46301        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46302        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46303      new_path="$path"
46304
46305  windows_path="$new_path"
46306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46307    unix_path=`$CYGPATH -u "$windows_path"`
46308    new_path="$unix_path"
46309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46311    new_path="$unix_path"
46312  fi
46313
46314    fi
46315
46316    if test "x$new_path" = x; then
46317      # It's still not found. Now this is an unrecoverable error.
46318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46319$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46320      has_space=`$ECHO "$complete" | $GREP " "`
46321      if test "x$has_space" != x; then
46322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46324      fi
46325      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46326    fi
46327  fi
46328
46329  # Now new_path has a complete unix path to the binary
46330  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46331    # Keep paths in /bin as-is, but remove trailing .exe if any
46332    new_path="${new_path/%.exe/}"
46333    # Do not save /bin paths to all_fixpath_prefixes!
46334  else
46335    # Not in mixed or Windows style, start by that.
46336    new_path=`cmd //c echo $new_path`
46337
46338  input_path="$new_path"
46339  # Check if we need to convert this using DOS-style short mode. If the path
46340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46341  # take no chances and rewrite it.
46342  # Note: m4 eats our [], so we need to use [ and ] instead.
46343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46344  if test "x$has_forbidden_chars" != x; then
46345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46346    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46347  fi
46348
46349    # Output is in $new_path
46350
46351  windows_path="$new_path"
46352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46353    unix_path=`$CYGPATH -u "$windows_path"`
46354    new_path="$unix_path"
46355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46357    new_path="$unix_path"
46358  fi
46359
46360    # remove trailing .exe if any
46361    new_path="${new_path/%.exe/}"
46362
46363    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46364    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46365  fi
46366
46367    else
46368      # We're on a unix platform. Hooray! :)
46369      # First separate the path from the arguments. This will split at the first
46370      # space.
46371      complete="$BUILD_OBJCOPY"
46372      path="${complete%% *}"
46373      tmp="$complete EOL"
46374      arguments="${tmp#* }"
46375
46376      # Cannot rely on the command "which" here since it doesn't always work.
46377      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46378      if test -z "$is_absolute_path"; then
46379        # Path to executable is not absolute. Find it.
46380        IFS_save="$IFS"
46381        IFS=:
46382        for p in $PATH; do
46383          if test -f "$p/$path" && test -x "$p/$path"; then
46384            new_path="$p/$path"
46385            break
46386          fi
46387        done
46388        IFS="$IFS_save"
46389      else
46390        # This is an absolute path, we can use it without further modifications.
46391        new_path="$path"
46392      fi
46393
46394      if test "x$new_path" = x; then
46395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46396$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46397        has_space=`$ECHO "$complete" | $GREP " "`
46398        if test "x$has_space" != x; then
46399          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46400$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46401        fi
46402        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46403      fi
46404    fi
46405
46406    # Now join together the path and the arguments once again
46407    if test "x$arguments" != xEOL; then
46408      new_complete="$new_path ${arguments% *}"
46409    else
46410      new_complete="$new_path"
46411    fi
46412
46413    if test "x$complete" != "x$new_complete"; then
46414      BUILD_OBJCOPY="$new_complete"
46415      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46416$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46417    fi
46418  fi
46419
46420
46421
46422  # Publish this variable in the help.
46423
46424
46425  if [ -z "${BUILD_STRIP+x}" ]; then
46426    # The variable is not set by user, try to locate tool using the code snippet
46427    for ac_prog in strip
46428do
46429  # Extract the first word of "$ac_prog", so it can be a program name with args.
46430set dummy $ac_prog; ac_word=$2
46431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46432$as_echo_n "checking for $ac_word... " >&6; }
46433if ${ac_cv_path_BUILD_STRIP+:} false; then :
46434  $as_echo_n "(cached) " >&6
46435else
46436  case $BUILD_STRIP in
46437  [\\/]* | ?:[\\/]*)
46438  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46439  ;;
46440  *)
46441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46442for as_dir in $PATH
46443do
46444  IFS=$as_save_IFS
46445  test -z "$as_dir" && as_dir=.
46446    for ac_exec_ext in '' $ac_executable_extensions; do
46447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46448    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46450    break 2
46451  fi
46452done
46453  done
46454IFS=$as_save_IFS
46455
46456  ;;
46457esac
46458fi
46459BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46460if test -n "$BUILD_STRIP"; then
46461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46462$as_echo "$BUILD_STRIP" >&6; }
46463else
46464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46465$as_echo "no" >&6; }
46466fi
46467
46468
46469  test -n "$BUILD_STRIP" && break
46470done
46471
46472  else
46473    # The variable is set, but is it from the command line or the environment?
46474
46475    # Try to remove the string !BUILD_STRIP! from our list.
46476    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46477    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46478      # If it failed, the variable was not from the command line. Ignore it,
46479      # but warn the user (except for BASH, which is always set by the calling BASH).
46480      if test "xBUILD_STRIP" != xBASH; then
46481        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46482$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46483      fi
46484      # Try to locate tool using the code snippet
46485      for ac_prog in strip
46486do
46487  # Extract the first word of "$ac_prog", so it can be a program name with args.
46488set dummy $ac_prog; ac_word=$2
46489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46490$as_echo_n "checking for $ac_word... " >&6; }
46491if ${ac_cv_path_BUILD_STRIP+:} false; then :
46492  $as_echo_n "(cached) " >&6
46493else
46494  case $BUILD_STRIP in
46495  [\\/]* | ?:[\\/]*)
46496  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46497  ;;
46498  *)
46499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46500for as_dir in $PATH
46501do
46502  IFS=$as_save_IFS
46503  test -z "$as_dir" && as_dir=.
46504    for ac_exec_ext in '' $ac_executable_extensions; do
46505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46506    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46508    break 2
46509  fi
46510done
46511  done
46512IFS=$as_save_IFS
46513
46514  ;;
46515esac
46516fi
46517BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46518if test -n "$BUILD_STRIP"; then
46519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46520$as_echo "$BUILD_STRIP" >&6; }
46521else
46522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46523$as_echo "no" >&6; }
46524fi
46525
46526
46527  test -n "$BUILD_STRIP" && break
46528done
46529
46530    else
46531      # If it succeeded, then it was overridden by the user. We will use it
46532      # for the tool.
46533
46534      # First remove it from the list of overridden variables, so we can test
46535      # for unknown variables in the end.
46536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46537
46538      # Check if we try to supply an empty value
46539      if test "x$BUILD_STRIP" = x; then
46540        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46541$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46543$as_echo_n "checking for BUILD_STRIP... " >&6; }
46544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46545$as_echo "disabled" >&6; }
46546      else
46547        # Check if the provided tool contains a complete path.
46548        tool_specified="$BUILD_STRIP"
46549        tool_basename="${tool_specified##*/}"
46550        if test "x$tool_basename" = "x$tool_specified"; then
46551          # A command without a complete path is provided, search $PATH.
46552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46553$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46554          # Extract the first word of "$tool_basename", so it can be a program name with args.
46555set dummy $tool_basename; ac_word=$2
46556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46557$as_echo_n "checking for $ac_word... " >&6; }
46558if ${ac_cv_path_BUILD_STRIP+:} false; then :
46559  $as_echo_n "(cached) " >&6
46560else
46561  case $BUILD_STRIP in
46562  [\\/]* | ?:[\\/]*)
46563  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46564  ;;
46565  *)
46566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46567for as_dir in $PATH
46568do
46569  IFS=$as_save_IFS
46570  test -z "$as_dir" && as_dir=.
46571    for ac_exec_ext in '' $ac_executable_extensions; do
46572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46573    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46575    break 2
46576  fi
46577done
46578  done
46579IFS=$as_save_IFS
46580
46581  ;;
46582esac
46583fi
46584BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46585if test -n "$BUILD_STRIP"; then
46586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46587$as_echo "$BUILD_STRIP" >&6; }
46588else
46589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46590$as_echo "no" >&6; }
46591fi
46592
46593
46594          if test "x$BUILD_STRIP" = x; then
46595            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46596          fi
46597        else
46598          # Otherwise we believe it is a complete path. Use it as it is.
46599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46600$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46602$as_echo_n "checking for BUILD_STRIP... " >&6; }
46603          if test ! -x "$tool_specified"; then
46604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46605$as_echo "not found" >&6; }
46606            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46607          fi
46608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46609$as_echo "$tool_specified" >&6; }
46610        fi
46611      fi
46612    fi
46613
46614  fi
46615
46616
46617
46618  # Only process if variable expands to non-empty
46619
46620  if test "x$BUILD_STRIP" != x; then
46621    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46622
46623  # First separate the path from the arguments. This will split at the first
46624  # space.
46625  complete="$BUILD_STRIP"
46626  path="${complete%% *}"
46627  tmp="$complete EOL"
46628  arguments="${tmp#* }"
46629
46630  # Input might be given as Windows format, start by converting to
46631  # unix format.
46632  new_path=`$CYGPATH -u "$path"`
46633
46634  # Now try to locate executable using which
46635  new_path=`$WHICH "$new_path" 2> /dev/null`
46636  # bat and cmd files are not always considered executable in cygwin causing which
46637  # to not find them
46638  if test "x$new_path" = x \
46639      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46640      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46641    new_path=`$CYGPATH -u "$path"`
46642  fi
46643  if test "x$new_path" = x; then
46644    # Oops. Which didn't find the executable.
46645    # The splitting of arguments from the executable at a space might have been incorrect,
46646    # since paths with space are more likely in Windows. Give it another try with the whole
46647    # argument.
46648    path="$complete"
46649    arguments="EOL"
46650    new_path=`$CYGPATH -u "$path"`
46651    new_path=`$WHICH "$new_path" 2> /dev/null`
46652    # bat and cmd files are not always considered executable in cygwin causing which
46653    # to not find them
46654    if test "x$new_path" = x \
46655        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46656        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46657      new_path=`$CYGPATH -u "$path"`
46658    fi
46659    if test "x$new_path" = x; then
46660      # It's still not found. Now this is an unrecoverable error.
46661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46662$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46663      has_space=`$ECHO "$complete" | $GREP " "`
46664      if test "x$has_space" != x; then
46665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46667      fi
46668      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46669    fi
46670  fi
46671
46672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46675  # "foo.exe" is OK but "foo" is an error.
46676  #
46677  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46678  # It is also a way to make sure we got the proper file name for the real test later on.
46679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46680  if test "x$test_shortpath" = x; then
46681    # Short path failed, file does not exist as specified.
46682    # Try adding .exe or .cmd
46683    if test -f "${new_path}.exe"; then
46684      input_to_shortpath="${new_path}.exe"
46685    elif test -f "${new_path}.cmd"; then
46686      input_to_shortpath="${new_path}.cmd"
46687    else
46688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46689$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46690      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46691$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46692      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46693    fi
46694  else
46695    input_to_shortpath="$new_path"
46696  fi
46697
46698  # Call helper function which possibly converts this using DOS-style short mode.
46699  # If so, the updated path is stored in $new_path.
46700  new_path="$input_to_shortpath"
46701
46702  input_path="$input_to_shortpath"
46703  # Check if we need to convert this using DOS-style short mode. If the path
46704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46705  # take no chances and rewrite it.
46706  # Note: m4 eats our [], so we need to use [ and ] instead.
46707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46708  if test "x$has_forbidden_chars" != x; then
46709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46713      # Going to short mode and back again did indeed matter. Since short mode is
46714      # case insensitive, let's make it lowercase to improve readability.
46715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46716      # Now convert it back to Unix-style (cygpath)
46717      input_path=`$CYGPATH -u "$shortmode_path"`
46718      new_path="$input_path"
46719    fi
46720  fi
46721
46722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46723  if test "x$test_cygdrive_prefix" = x; then
46724    # As a simple fix, exclude /usr/bin since it's not a real path.
46725    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46727      # a path prefixed by /cygdrive for fixpath to work.
46728      new_path="$CYGWIN_ROOT_PATH$input_path"
46729    fi
46730  fi
46731
46732  # remove trailing .exe if any
46733  new_path="${new_path/%.exe/}"
46734
46735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46736
46737  # First separate the path from the arguments. This will split at the first
46738  # space.
46739  complete="$BUILD_STRIP"
46740  path="${complete%% *}"
46741  tmp="$complete EOL"
46742  arguments="${tmp#* }"
46743
46744  # Input might be given as Windows format, start by converting to
46745  # unix format.
46746  new_path="$path"
46747
46748  windows_path="$new_path"
46749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46750    unix_path=`$CYGPATH -u "$windows_path"`
46751    new_path="$unix_path"
46752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46754    new_path="$unix_path"
46755  fi
46756
46757
46758  # Now try to locate executable using which
46759  new_path=`$WHICH "$new_path" 2> /dev/null`
46760
46761  if test "x$new_path" = x; then
46762    # Oops. Which didn't find the executable.
46763    # The splitting of arguments from the executable at a space might have been incorrect,
46764    # since paths with space are more likely in Windows. Give it another try with the whole
46765    # argument.
46766    path="$complete"
46767    arguments="EOL"
46768    new_path="$path"
46769
46770  windows_path="$new_path"
46771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46772    unix_path=`$CYGPATH -u "$windows_path"`
46773    new_path="$unix_path"
46774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46776    new_path="$unix_path"
46777  fi
46778
46779
46780    new_path=`$WHICH "$new_path" 2> /dev/null`
46781    # bat and cmd files are not always considered executable in MSYS causing which
46782    # to not find them
46783    if test "x$new_path" = x \
46784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46786      new_path="$path"
46787
46788  windows_path="$new_path"
46789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46790    unix_path=`$CYGPATH -u "$windows_path"`
46791    new_path="$unix_path"
46792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46794    new_path="$unix_path"
46795  fi
46796
46797    fi
46798
46799    if test "x$new_path" = x; then
46800      # It's still not found. Now this is an unrecoverable error.
46801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46802$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46803      has_space=`$ECHO "$complete" | $GREP " "`
46804      if test "x$has_space" != x; then
46805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46807      fi
46808      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46809    fi
46810  fi
46811
46812  # Now new_path has a complete unix path to the binary
46813  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46814    # Keep paths in /bin as-is, but remove trailing .exe if any
46815    new_path="${new_path/%.exe/}"
46816    # Do not save /bin paths to all_fixpath_prefixes!
46817  else
46818    # Not in mixed or Windows style, start by that.
46819    new_path=`cmd //c echo $new_path`
46820
46821  input_path="$new_path"
46822  # Check if we need to convert this using DOS-style short mode. If the path
46823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46824  # take no chances and rewrite it.
46825  # Note: m4 eats our [], so we need to use [ and ] instead.
46826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46827  if test "x$has_forbidden_chars" != x; then
46828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46830  fi
46831
46832    # Output is in $new_path
46833
46834  windows_path="$new_path"
46835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46836    unix_path=`$CYGPATH -u "$windows_path"`
46837    new_path="$unix_path"
46838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46840    new_path="$unix_path"
46841  fi
46842
46843    # remove trailing .exe if any
46844    new_path="${new_path/%.exe/}"
46845
46846    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46847    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46848  fi
46849
46850    else
46851      # We're on a unix platform. Hooray! :)
46852      # First separate the path from the arguments. This will split at the first
46853      # space.
46854      complete="$BUILD_STRIP"
46855      path="${complete%% *}"
46856      tmp="$complete EOL"
46857      arguments="${tmp#* }"
46858
46859      # Cannot rely on the command "which" here since it doesn't always work.
46860      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46861      if test -z "$is_absolute_path"; then
46862        # Path to executable is not absolute. Find it.
46863        IFS_save="$IFS"
46864        IFS=:
46865        for p in $PATH; do
46866          if test -f "$p/$path" && test -x "$p/$path"; then
46867            new_path="$p/$path"
46868            break
46869          fi
46870        done
46871        IFS="$IFS_save"
46872      else
46873        # This is an absolute path, we can use it without further modifications.
46874        new_path="$path"
46875      fi
46876
46877      if test "x$new_path" = x; then
46878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46879$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46880        has_space=`$ECHO "$complete" | $GREP " "`
46881        if test "x$has_space" != x; then
46882          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46883$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46884        fi
46885        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46886      fi
46887    fi
46888
46889    # Now join together the path and the arguments once again
46890    if test "x$arguments" != xEOL; then
46891      new_complete="$new_path ${arguments% *}"
46892    else
46893      new_complete="$new_path"
46894    fi
46895
46896    if test "x$complete" != "x$new_complete"; then
46897      BUILD_STRIP="$new_complete"
46898      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46899$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46900    fi
46901  fi
46902
46903    # Assume the C compiler is the assembler
46904    BUILD_AS="$BUILD_CC -c"
46905    # Just like for the target compiler, use the compiler as linker
46906    BUILD_LD="$BUILD_CC"
46907    BUILD_LDCXX="$BUILD_CXX"
46908
46909    PATH="$OLDPATH"
46910
46911
46912  COMPILER=$BUILD_CC
46913  COMPILER_NAME=BuildC
46914
46915  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46916    # cc -V output typically looks like
46917    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46918    # or
46919    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
46920    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46921    # Check that this is likely to be the Solaris Studio cc.
46922    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
46923    if test $? -ne 0; then
46924      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46925      { $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
46926$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46927      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46928$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46929      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46930$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46931      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46932    fi
46933    # Remove usage instructions (if present), and
46934    # collapse compiler output into a single line
46935    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46936        $SED -e 's/ *[Uu]sage:.*//'`
46937    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46938        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46939  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46940    # xlc -qversion output typically looks like
46941    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46942    #     Version: 11.01.0000.0015
46943    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46944    # Check that this is likely to be the IBM XL C compiler.
46945    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46946    if test $? -ne 0; then
46947      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46948      { $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
46949$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46950      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46951$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46952      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46953$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46954      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46955    fi
46956    # Collapse compiler output into a single line
46957    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46958    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46959        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46960  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46961    # There is no specific version flag, but all output starts with a version string.
46962    # First line typically looks something like:
46963    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
46964    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46965    # Check that this is likely to be Microsoft CL.EXE.
46966    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
46967    if test $? -ne 0; then
46968      { $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
46969$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46970      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46971$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46972      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46973    fi
46974    # Collapse compiler output into a single line
46975    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46976    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46977        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
46978  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
46979    # gcc --version output typically looks like
46980    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
46981    #     Copyright (C) 2013 Free Software Foundation, Inc.
46982    #     This is free software; see the source for copying conditions.  There is NO
46983    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
46984    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46985    # Check that this is likely to be GCC.
46986    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
46987    if test $? -ne 0; then
46988      { $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
46989$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46990      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
46991$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
46992      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46993    fi
46994    # Remove Copyright and legalese from version string, and
46995    # collapse into a single line
46996    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46997        $SED -e 's/ *Copyright .*//'`
46998    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46999        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47000  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47001    # clang --version output typically looks like
47002    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47003    #    clang version 3.3 (tags/RELEASE_33/final)
47004    # or
47005    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47006    #    Target: x86_64-pc-linux-gnu
47007    #    Thread model: posix
47008    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47009    # Check that this is likely to be clang
47010    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47011    if test $? -ne 0; then
47012      { $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
47013$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47014      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47015$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47016      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47017    fi
47018    # Collapse compiler output into a single line
47019    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47020    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47021        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47022  else
47023      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47024  fi
47025  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47026  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47027  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47028  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47029
47030  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47031$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47032
47033
47034  COMPILER=$BUILD_CXX
47035  COMPILER_NAME=BuildC++
47036
47037  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47038    # cc -V output typically looks like
47039    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47040    # or
47041    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47042    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47043    # Check that this is likely to be the Solaris Studio cc.
47044    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47045    if test $? -ne 0; then
47046      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47047      { $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
47048$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47049      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47050$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47051      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47052$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47053      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47054    fi
47055    # Remove usage instructions (if present), and
47056    # collapse compiler output into a single line
47057    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47058        $SED -e 's/ *[Uu]sage:.*//'`
47059    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47060        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47061  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47062    # xlc -qversion output typically looks like
47063    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47064    #     Version: 11.01.0000.0015
47065    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47066    # Check that this is likely to be the IBM XL C compiler.
47067    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47068    if test $? -ne 0; then
47069      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47070      { $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
47071$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47072      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47073$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47074      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47075$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47076      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47077    fi
47078    # Collapse compiler output into a single line
47079    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47080    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47081        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47082  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47083    # There is no specific version flag, but all output starts with a version string.
47084    # First line typically looks something like:
47085    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47086    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47087    # Check that this is likely to be Microsoft CL.EXE.
47088    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47089    if test $? -ne 0; then
47090      { $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
47091$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47092      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47093$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47094      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47095    fi
47096    # Collapse compiler output into a single line
47097    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47098    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47099        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47100  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47101    # gcc --version output typically looks like
47102    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47103    #     Copyright (C) 2013 Free Software Foundation, Inc.
47104    #     This is free software; see the source for copying conditions.  There is NO
47105    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47106    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47107    # Check that this is likely to be GCC.
47108    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47109    if test $? -ne 0; then
47110      { $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
47111$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47112      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47113$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47114      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47115    fi
47116    # Remove Copyright and legalese from version string, and
47117    # collapse into a single line
47118    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47119        $SED -e 's/ *Copyright .*//'`
47120    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47121        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47122  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47123    # clang --version output typically looks like
47124    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47125    #    clang version 3.3 (tags/RELEASE_33/final)
47126    # or
47127    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47128    #    Target: x86_64-pc-linux-gnu
47129    #    Thread model: posix
47130    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47131    # Check that this is likely to be clang
47132    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47133    if test $? -ne 0; then
47134      { $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
47135$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47136      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47137$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47138      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47139    fi
47140    # Collapse compiler output into a single line
47141    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47142    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47143        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47144  else
47145      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47146  fi
47147  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47148  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47149  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47150  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47151
47152  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47153$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47154
47155
47156  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47157    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
47158$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47159    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47160$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47161  fi
47162
47163  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47164  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47165    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47166$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47167  fi
47168
47169  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47170    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47171$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47172  fi
47173
47174  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47175
47176  else
47177    # If we are not cross compiling, use the normal target compilers for
47178    # building the build platform executables.
47179    BUILD_CC="$CC"
47180    BUILD_CXX="$CXX"
47181    BUILD_LD="$LD"
47182    BUILD_LDCXX="$LDCXX"
47183    BUILD_NM="$NM"
47184    BUILD_AS="$AS"
47185    BUILD_OBJCOPY="$OBJCOPY"
47186    BUILD_STRIP="$STRIP"
47187    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47188    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47189    BUILD_AR="$AR"
47190
47191
47192  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47193    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47194$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47195    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47196$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47197  fi
47198
47199  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47200  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47201    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47202$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47203  fi
47204
47205  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47206    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47207$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47208  fi
47209
47210  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47211
47212  fi
47213
47214
47215
47216
47217
47218
47219
47220
47221
47222
47223
47224
47225
47226
47227  # The package path is used only on macosx?
47228  # FIXME: clean this up, and/or move it elsewhere.
47229  PACKAGE_PATH=/opt/local
47230
47231
47232  # Check for extra potential brokenness.
47233  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47234    # On Windows, double-check that we got the right compiler.
47235    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47236    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47237    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47238      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47239        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
47240      fi
47241    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47242      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47243        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47244      fi
47245    fi
47246  fi
47247
47248  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47249    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47250    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47251    # This is later checked when setting flags.
47252
47253    # "-Og" suppported for GCC 4.8 and later
47254    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268
47269
47270
47271
47272
47273
47274
47275
47276
47277
47278
47279
47280
47281
47282
47283
47284
47285
47286
47287
47288
47289
47290
47291
47292
47293
47294
47295
47296
47297
47298
47299
47300
47301
47302    # Execute function body
47303
47304
47305
47306
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
47329
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351    # Execute function body
47352
47353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47354$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47355  supports=yes
47356
47357  saved_cflags="$CFLAGS"
47358  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47359  ac_ext=c
47360ac_cpp='$CPP $CPPFLAGS'
47361ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47362ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47363ac_compiler_gnu=$ac_cv_c_compiler_gnu
47364
47365  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47366/* end confdefs.h.  */
47367int i;
47368_ACEOF
47369if ac_fn_c_try_compile "$LINENO"; then :
47370
47371else
47372  supports=no
47373fi
47374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47375  ac_ext=cpp
47376ac_cpp='$CXXCPP $CPPFLAGS'
47377ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47378ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47379ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47380
47381  CFLAGS="$saved_cflags"
47382
47383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47384$as_echo "$supports" >&6; }
47385  if test "x$supports" = "xyes" ; then
47386    :
47387    C_COMP_SUPPORTS="yes"
47388  else
47389    :
47390    C_COMP_SUPPORTS="no"
47391  fi
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451    # Execute function body
47452
47453  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47454$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47455  supports=yes
47456
47457  saved_cxxflags="$CXXFLAGS"
47458  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47459  ac_ext=cpp
47460ac_cpp='$CXXCPP $CPPFLAGS'
47461ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47462ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47463ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47464
47465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47466/* end confdefs.h.  */
47467int i;
47468_ACEOF
47469if ac_fn_cxx_try_compile "$LINENO"; then :
47470
47471else
47472  supports=no
47473fi
47474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47475  ac_ext=cpp
47476ac_cpp='$CXXCPP $CPPFLAGS'
47477ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47478ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47479ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47480
47481  CXXFLAGS="$saved_cxxflags"
47482
47483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47484$as_echo "$supports" >&6; }
47485  if test "x$supports" = "xyes" ; then
47486    :
47487    CXX_COMP_SUPPORTS="yes"
47488  else
47489    :
47490    CXX_COMP_SUPPORTS="no"
47491  fi
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47506$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47507  supports=no
47508  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47509
47510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47511$as_echo "$supports" >&6; }
47512  if test "x$supports" = "xyes" ; then
47513    :
47514    HAS_CFLAG_OPTIMIZE_DEBUG=true
47515  else
47516    :
47517    HAS_CFLAG_OPTIMIZE_DEBUG=false
47518  fi
47519
47520
47521
47522
47523
47524
47525
47526    # "-z relro" supported in GNU binutils 2.17 and later
47527    LINKER_RELRO_FLAG="-Wl,-z,relro"
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557
47558
47559
47560
47561
47562
47563
47564
47565
47566
47567
47568
47569
47570
47571
47572
47573
47574
47575    # Execute function body
47576
47577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47578$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47579  supports=yes
47580
47581  saved_ldflags="$LDFLAGS"
47582  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47583  ac_ext=c
47584ac_cpp='$CPP $CPPFLAGS'
47585ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47586ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47587ac_compiler_gnu=$ac_cv_c_compiler_gnu
47588
47589  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47590/* end confdefs.h.  */
47591
47592int
47593main ()
47594{
47595
47596  ;
47597  return 0;
47598}
47599_ACEOF
47600if ac_fn_c_try_link "$LINENO"; then :
47601
47602else
47603  supports=no
47604fi
47605rm -f core conftest.err conftest.$ac_objext \
47606    conftest$ac_exeext conftest.$ac_ext
47607  ac_ext=cpp
47608ac_cpp='$CXXCPP $CPPFLAGS'
47609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47612
47613  LDFLAGS="$saved_ldflags"
47614
47615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47616$as_echo "$supports" >&6; }
47617  if test "x$supports" = "xyes" ; then
47618    :
47619    HAS_LINKER_RELRO=true
47620  else
47621    :
47622    HAS_LINKER_RELRO=false
47623  fi
47624
47625
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637    # "-z now" supported in GNU binutils 2.11 and later
47638    LINKER_NOW_FLAG="-Wl,-z,now"
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686    # Execute function body
47687
47688  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47689$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47690  supports=yes
47691
47692  saved_ldflags="$LDFLAGS"
47693  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47694  ac_ext=c
47695ac_cpp='$CPP $CPPFLAGS'
47696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47698ac_compiler_gnu=$ac_cv_c_compiler_gnu
47699
47700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47701/* end confdefs.h.  */
47702
47703int
47704main ()
47705{
47706
47707  ;
47708  return 0;
47709}
47710_ACEOF
47711if ac_fn_c_try_link "$LINENO"; then :
47712
47713else
47714  supports=no
47715fi
47716rm -f core conftest.err conftest.$ac_objext \
47717    conftest$ac_exeext conftest.$ac_ext
47718  ac_ext=cpp
47719ac_cpp='$CXXCPP $CPPFLAGS'
47720ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47721ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47722ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47723
47724  LDFLAGS="$saved_ldflags"
47725
47726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47727$as_echo "$supports" >&6; }
47728  if test "x$supports" = "xyes" ; then
47729    :
47730    HAS_LINKER_NOW=true
47731  else
47732    :
47733    HAS_LINKER_NOW=false
47734  fi
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747  fi
47748
47749  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47750  # in executable.'
47751  USING_BROKEN_SUSE_LD=no
47752  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47754$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47755    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47756    $ECHO "int main() { }" > main.c
47757    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47759$as_echo "no" >&6; }
47760      USING_BROKEN_SUSE_LD=no
47761    else
47762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47763$as_echo "yes" >&6; }
47764      USING_BROKEN_SUSE_LD=yes
47765    fi
47766    $RM version-script.map main.c a.out
47767  fi
47768
47769
47770  # Setup hotspot lecagy names for toolchains
47771  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47772  if test "x$TOOLCHAIN_TYPE" = xclang; then
47773    HOTSPOT_TOOLCHAIN_TYPE=gcc
47774  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47775    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47776  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47777    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47778  fi
47779
47780
47781
47782# Setup the JTReg Regression Test Harness.
47783
47784
47785# Check whether --with-jtreg was given.
47786if test "${with_jtreg+set}" = set; then :
47787  withval=$with_jtreg;
47788else
47789  with_jtreg=no
47790fi
47791
47792
47793  if test "x$with_jtreg" = xno; then
47794    # jtreg disabled
47795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47796$as_echo_n "checking for jtreg... " >&6; }
47797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47798$as_echo "no" >&6; }
47799  else
47800    if test "x$with_jtreg" != xyes; then
47801      # with path specified.
47802      JT_HOME="$with_jtreg"
47803    fi
47804
47805    if test "x$JT_HOME" != x; then
47806      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47807$as_echo_n "checking for jtreg... " >&6; }
47808
47809      # use JT_HOME enviroment var.
47810
47811  # Only process if variable expands to non-empty
47812
47813  if test "x$JT_HOME" != x; then
47814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47815
47816  # Input might be given as Windows format, start by converting to
47817  # unix format.
47818  path="$JT_HOME"
47819  new_path=`$CYGPATH -u "$path"`
47820
47821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47824  # "foo.exe" is OK but "foo" is an error.
47825  #
47826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47827  # It is also a way to make sure we got the proper file name for the real test later on.
47828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47829  if test "x$test_shortpath" = x; then
47830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47831$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47832    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47833  fi
47834
47835  # Call helper function which possibly converts this using DOS-style short mode.
47836  # If so, the updated path is stored in $new_path.
47837
47838  input_path="$new_path"
47839  # Check if we need to convert this using DOS-style short mode. If the path
47840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47841  # take no chances and rewrite it.
47842  # Note: m4 eats our [], so we need to use [ and ] instead.
47843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47844  if test "x$has_forbidden_chars" != x; then
47845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47849      # Going to short mode and back again did indeed matter. Since short mode is
47850      # case insensitive, let's make it lowercase to improve readability.
47851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47852      # Now convert it back to Unix-style (cygpath)
47853      input_path=`$CYGPATH -u "$shortmode_path"`
47854      new_path="$input_path"
47855    fi
47856  fi
47857
47858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47859  if test "x$test_cygdrive_prefix" = x; then
47860    # As a simple fix, exclude /usr/bin since it's not a real path.
47861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47863      # a path prefixed by /cygdrive for fixpath to work.
47864      new_path="$CYGWIN_ROOT_PATH$input_path"
47865    fi
47866  fi
47867
47868
47869  if test "x$path" != "x$new_path"; then
47870    JT_HOME="$new_path"
47871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47872$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47873  fi
47874
47875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47876
47877  path="$JT_HOME"
47878  has_colon=`$ECHO $path | $GREP ^.:`
47879  new_path="$path"
47880  if test "x$has_colon" = x; then
47881    # Not in mixed or Windows style, start by that.
47882    new_path=`cmd //c echo $path`
47883  fi
47884
47885
47886  input_path="$new_path"
47887  # Check if we need to convert this using DOS-style short mode. If the path
47888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47889  # take no chances and rewrite it.
47890  # Note: m4 eats our [], so we need to use [ and ] instead.
47891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47892  if test "x$has_forbidden_chars" != x; then
47893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47895  fi
47896
47897
47898  windows_path="$new_path"
47899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47900    unix_path=`$CYGPATH -u "$windows_path"`
47901    new_path="$unix_path"
47902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47904    new_path="$unix_path"
47905  fi
47906
47907  if test "x$path" != "x$new_path"; then
47908    JT_HOME="$new_path"
47909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47910$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47911  fi
47912
47913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47915
47916    else
47917      # We're on a unix platform. Hooray! :)
47918      path="$JT_HOME"
47919      has_space=`$ECHO "$path" | $GREP " "`
47920      if test "x$has_space" != x; then
47921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47922$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47924      fi
47925
47926      # Use eval to expand a potential ~
47927      eval path="$path"
47928      if test ! -f "$path" && test ! -d "$path"; then
47929        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47930      fi
47931
47932      if test -d "$path"; then
47933        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47934      else
47935        dir="`$DIRNAME "$path"`"
47936        base="`$BASENAME "$path"`"
47937        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47938      fi
47939    fi
47940  fi
47941
47942
47943      # jtreg win32 script works for everybody
47944      JTREGEXE="$JT_HOME/bin/jtreg"
47945
47946      if test ! -f "$JTREGEXE"; then
47947        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47948      fi
47949
47950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47951$as_echo "$JTREGEXE" >&6; }
47952    else
47953      # try to find jtreg on path
47954
47955
47956
47957  # Publish this variable in the help.
47958
47959
47960  if [ -z "${JTREGEXE+x}" ]; then
47961    # The variable is not set by user, try to locate tool using the code snippet
47962    for ac_prog in jtreg
47963do
47964  # Extract the first word of "$ac_prog", so it can be a program name with args.
47965set dummy $ac_prog; ac_word=$2
47966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47967$as_echo_n "checking for $ac_word... " >&6; }
47968if ${ac_cv_path_JTREGEXE+:} false; then :
47969  $as_echo_n "(cached) " >&6
47970else
47971  case $JTREGEXE in
47972  [\\/]* | ?:[\\/]*)
47973  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47974  ;;
47975  *)
47976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47977for as_dir in $PATH
47978do
47979  IFS=$as_save_IFS
47980  test -z "$as_dir" && as_dir=.
47981    for ac_exec_ext in '' $ac_executable_extensions; do
47982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47983    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47985    break 2
47986  fi
47987done
47988  done
47989IFS=$as_save_IFS
47990
47991  ;;
47992esac
47993fi
47994JTREGEXE=$ac_cv_path_JTREGEXE
47995if test -n "$JTREGEXE"; then
47996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47997$as_echo "$JTREGEXE" >&6; }
47998else
47999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48000$as_echo "no" >&6; }
48001fi
48002
48003
48004  test -n "$JTREGEXE" && break
48005done
48006
48007  else
48008    # The variable is set, but is it from the command line or the environment?
48009
48010    # Try to remove the string !JTREGEXE! from our list.
48011    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48012    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48013      # If it failed, the variable was not from the command line. Ignore it,
48014      # but warn the user (except for BASH, which is always set by the calling BASH).
48015      if test "xJTREGEXE" != xBASH; then
48016        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48017$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48018      fi
48019      # Try to locate tool using the code snippet
48020      for ac_prog in jtreg
48021do
48022  # Extract the first word of "$ac_prog", so it can be a program name with args.
48023set dummy $ac_prog; ac_word=$2
48024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48025$as_echo_n "checking for $ac_word... " >&6; }
48026if ${ac_cv_path_JTREGEXE+:} false; then :
48027  $as_echo_n "(cached) " >&6
48028else
48029  case $JTREGEXE in
48030  [\\/]* | ?:[\\/]*)
48031  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48032  ;;
48033  *)
48034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48035for as_dir in $PATH
48036do
48037  IFS=$as_save_IFS
48038  test -z "$as_dir" && as_dir=.
48039    for ac_exec_ext in '' $ac_executable_extensions; do
48040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48041    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48043    break 2
48044  fi
48045done
48046  done
48047IFS=$as_save_IFS
48048
48049  ;;
48050esac
48051fi
48052JTREGEXE=$ac_cv_path_JTREGEXE
48053if test -n "$JTREGEXE"; then
48054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48055$as_echo "$JTREGEXE" >&6; }
48056else
48057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48058$as_echo "no" >&6; }
48059fi
48060
48061
48062  test -n "$JTREGEXE" && break
48063done
48064
48065    else
48066      # If it succeeded, then it was overridden by the user. We will use it
48067      # for the tool.
48068
48069      # First remove it from the list of overridden variables, so we can test
48070      # for unknown variables in the end.
48071      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48072
48073      # Check if we try to supply an empty value
48074      if test "x$JTREGEXE" = x; then
48075        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48076$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48078$as_echo_n "checking for JTREGEXE... " >&6; }
48079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48080$as_echo "disabled" >&6; }
48081      else
48082        # Check if the provided tool contains a complete path.
48083        tool_specified="$JTREGEXE"
48084        tool_basename="${tool_specified##*/}"
48085        if test "x$tool_basename" = "x$tool_specified"; then
48086          # A command without a complete path is provided, search $PATH.
48087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48088$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48089          # Extract the first word of "$tool_basename", so it can be a program name with args.
48090set dummy $tool_basename; ac_word=$2
48091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48092$as_echo_n "checking for $ac_word... " >&6; }
48093if ${ac_cv_path_JTREGEXE+:} false; then :
48094  $as_echo_n "(cached) " >&6
48095else
48096  case $JTREGEXE in
48097  [\\/]* | ?:[\\/]*)
48098  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48099  ;;
48100  *)
48101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48102for as_dir in $PATH
48103do
48104  IFS=$as_save_IFS
48105  test -z "$as_dir" && as_dir=.
48106    for ac_exec_ext in '' $ac_executable_extensions; do
48107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48108    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48110    break 2
48111  fi
48112done
48113  done
48114IFS=$as_save_IFS
48115
48116  ;;
48117esac
48118fi
48119JTREGEXE=$ac_cv_path_JTREGEXE
48120if test -n "$JTREGEXE"; then
48121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48122$as_echo "$JTREGEXE" >&6; }
48123else
48124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48125$as_echo "no" >&6; }
48126fi
48127
48128
48129          if test "x$JTREGEXE" = x; then
48130            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48131          fi
48132        else
48133          # Otherwise we believe it is a complete path. Use it as it is.
48134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48135$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48136          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48137$as_echo_n "checking for JTREGEXE... " >&6; }
48138          if test ! -x "$tool_specified"; then
48139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48140$as_echo "not found" >&6; }
48141            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48142          fi
48143          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48144$as_echo "$tool_specified" >&6; }
48145        fi
48146      fi
48147    fi
48148
48149  fi
48150
48151
48152
48153  if test "x$JTREGEXE" = x; then
48154    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48155  fi
48156
48157
48158      JT_HOME="`$DIRNAME $JTREGEXE`"
48159    fi
48160  fi
48161
48162
48163
48164
48165
48166
48167  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48168  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48169  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48170  #                              commands produced by the link step (currently AIX only)
48171  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48172    COMPILER_TARGET_BITS_FLAG="-q"
48173    COMPILER_COMMAND_FILE_FLAG="-f"
48174    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48175  else
48176    COMPILER_TARGET_BITS_FLAG="-m"
48177    COMPILER_COMMAND_FILE_FLAG="@"
48178    COMPILER_BINDCMD_FILE_FLAG=""
48179
48180    # The solstudio linker does not support @-files.
48181    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48182      COMPILER_COMMAND_FILE_FLAG=
48183    fi
48184
48185    # Check if @file is supported by gcc
48186    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48187      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48188$as_echo_n "checking if @file is supported by gcc... " >&6; }
48189      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48190      $ECHO "" "--version" > command.file
48191      if $CXX @command.file 2>&5 >&5; then
48192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48193$as_echo "yes" >&6; }
48194        COMPILER_COMMAND_FILE_FLAG="@"
48195      else
48196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48197$as_echo "no" >&6; }
48198        COMPILER_COMMAND_FILE_FLAG=
48199      fi
48200      $RM command.file
48201    fi
48202  fi
48203
48204
48205
48206
48207  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48208  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48209    ARFLAGS="-r"
48210  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48211    ARFLAGS="-X64"
48212  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48213    # lib.exe is used as AR to create static libraries.
48214    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48215  else
48216    ARFLAGS=""
48217  fi
48218
48219
48220  ## Setup strip.
48221  # FIXME: should this really be per platform, or should it be per toolchain type?
48222  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48223  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48224  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48225    STRIPFLAGS="-g"
48226  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48227    STRIPFLAGS="-x"
48228  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48229    STRIPFLAGS="-S"
48230  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48231    STRIPFLAGS="-X32_64"
48232  fi
48233
48234
48235
48236  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48237    CC_OUT_OPTION=-Fo
48238    EXE_OUT_OPTION=-out:
48239    LD_OUT_OPTION=-out:
48240    AR_OUT_OPTION=-out:
48241  else
48242    # The option used to specify the target .o,.a or .so file.
48243    # When compiling, how to specify the to be created object file.
48244    CC_OUT_OPTION='-o$(SPACE)'
48245    # When linking, how to specify the to be created executable.
48246    EXE_OUT_OPTION='-o$(SPACE)'
48247    # When linking, how to specify the to be created dynamically linkable library.
48248    LD_OUT_OPTION='-o$(SPACE)'
48249    # When archiving, how to specify the to be create static archive for object files.
48250    AR_OUT_OPTION='rcs$(SPACE)'
48251  fi
48252
48253
48254
48255
48256
48257  # On Windows, we need to set RC flags.
48258  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48259    RC_FLAGS="-nologo -l0x409"
48260    JVM_RCFLAGS="-nologo"
48261    if test "x$DEBUG_LEVEL" = xrelease; then
48262      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48263      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48264    fi
48265
48266    # The version variables used to create RC_FLAGS may be overridden
48267    # in a custom configure script, or possibly the command line.
48268    # Let those variables be expanded at make time in spec.gmk.
48269    # The \$ are escaped to the shell, and the $(...) variables
48270    # are evaluated by make.
48271    RC_FLAGS="$RC_FLAGS \
48272        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48273        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48274        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48275        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48276        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48277        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48278        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48279
48280    JVM_RCFLAGS="$JVM_RCFLAGS \
48281        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48282        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48283        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48284        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48285        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48286        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48287        -D\"HS_FNAME=jvm.dll\" \
48288        -D\"HS_INTERNAL_NAME=jvm\""
48289  fi
48290
48291
48292
48293  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48294    # silence copyright notice and other headers.
48295    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48296  fi
48297
48298
48299# Now we can test some aspects on the target using configure macros.
48300
48301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48302$as_echo_n "checking for ANSI C header files... " >&6; }
48303if ${ac_cv_header_stdc+:} false; then :
48304  $as_echo_n "(cached) " >&6
48305else
48306  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48307/* end confdefs.h.  */
48308#include <stdlib.h>
48309#include <stdarg.h>
48310#include <string.h>
48311#include <float.h>
48312
48313int
48314main ()
48315{
48316
48317  ;
48318  return 0;
48319}
48320_ACEOF
48321if ac_fn_cxx_try_compile "$LINENO"; then :
48322  ac_cv_header_stdc=yes
48323else
48324  ac_cv_header_stdc=no
48325fi
48326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48327
48328if test $ac_cv_header_stdc = yes; then
48329  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48331/* end confdefs.h.  */
48332#include <string.h>
48333
48334_ACEOF
48335if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48336  $EGREP "memchr" >/dev/null 2>&1; then :
48337
48338else
48339  ac_cv_header_stdc=no
48340fi
48341rm -f conftest*
48342
48343fi
48344
48345if test $ac_cv_header_stdc = yes; then
48346  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48348/* end confdefs.h.  */
48349#include <stdlib.h>
48350
48351_ACEOF
48352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48353  $EGREP "free" >/dev/null 2>&1; then :
48354
48355else
48356  ac_cv_header_stdc=no
48357fi
48358rm -f conftest*
48359
48360fi
48361
48362if test $ac_cv_header_stdc = yes; then
48363  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48364  if test "$cross_compiling" = yes; then :
48365  :
48366else
48367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48368/* end confdefs.h.  */
48369#include <ctype.h>
48370#include <stdlib.h>
48371#if ((' ' & 0x0FF) == 0x020)
48372# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48373# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48374#else
48375# define ISLOWER(c) \
48376		   (('a' <= (c) && (c) <= 'i') \
48377		     || ('j' <= (c) && (c) <= 'r') \
48378		     || ('s' <= (c) && (c) <= 'z'))
48379# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48380#endif
48381
48382#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48383int
48384main ()
48385{
48386  int i;
48387  for (i = 0; i < 256; i++)
48388    if (XOR (islower (i), ISLOWER (i))
48389	|| toupper (i) != TOUPPER (i))
48390      return 2;
48391  return 0;
48392}
48393_ACEOF
48394if ac_fn_cxx_try_run "$LINENO"; then :
48395
48396else
48397  ac_cv_header_stdc=no
48398fi
48399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48400  conftest.$ac_objext conftest.beam conftest.$ac_ext
48401fi
48402
48403fi
48404fi
48405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48406$as_echo "$ac_cv_header_stdc" >&6; }
48407if test $ac_cv_header_stdc = yes; then
48408
48409$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48410
48411fi
48412
48413# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48414for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48415		  inttypes.h stdint.h unistd.h
48416do :
48417  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48418ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48419"
48420if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48421  cat >>confdefs.h <<_ACEOF
48422#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48423_ACEOF
48424
48425fi
48426
48427done
48428
48429
48430
48431  ###############################################################################
48432  #
48433  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48434  # (The JVM can use 32 or 64 bit Java pointers but that decision
48435  # is made at runtime.)
48436  #
48437
48438  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48439    # Always specify -m flag on Solaris
48440    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48441
48442  # When we add flags to the "official" CFLAGS etc, we need to
48443  # keep track of these additions in ADDED_CFLAGS etc. These
48444  # will later be checked to make sure only controlled additions
48445  # have been made to CFLAGS etc.
48446  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48447  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48448  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48449
48450  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48451  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48452  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48453
48454  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48455  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48456  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48457
48458  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48459  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48460  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48461
48462  elif test "x$COMPILE_TYPE" = xreduced; then
48463    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48464      # Specify -m if running reduced on unix platforms
48465
48466  # When we add flags to the "official" CFLAGS etc, we need to
48467  # keep track of these additions in ADDED_CFLAGS etc. These
48468  # will later be checked to make sure only controlled additions
48469  # have been made to CFLAGS etc.
48470  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48471  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48472  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48473
48474  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48475  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48476  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48477
48478  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48479  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48480  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48481
48482  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48483  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48484  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48485
48486    fi
48487  fi
48488  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48489    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48490    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48491    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48492  fi
48493
48494  # Make compilation sanity check
48495  for ac_header in stdio.h
48496do :
48497  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48498if test "x$ac_cv_header_stdio_h" = xyes; then :
48499  cat >>confdefs.h <<_ACEOF
48500#define HAVE_STDIO_H 1
48501_ACEOF
48502
48503else
48504
48505    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48506$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48507    if test "x$COMPILE_TYPE" = xreduced; then
48508
48509  # Print a helpful message on how to acquire the necessary build dependency.
48510  # reduced is the help tag: freetype, cups, alsa etc
48511  MISSING_DEPENDENCY=reduced
48512
48513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48514    cygwin_help $MISSING_DEPENDENCY
48515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48516    msys_help $MISSING_DEPENDENCY
48517  else
48518    PKGHANDLER_COMMAND=
48519
48520    case $PKGHANDLER in
48521      apt-get)
48522        apt_help     $MISSING_DEPENDENCY ;;
48523      yum)
48524        yum_help     $MISSING_DEPENDENCY ;;
48525      port)
48526        port_help    $MISSING_DEPENDENCY ;;
48527      pkgutil)
48528        pkgutil_help $MISSING_DEPENDENCY ;;
48529      pkgadd)
48530        pkgadd_help  $MISSING_DEPENDENCY ;;
48531    esac
48532
48533    if test "x$PKGHANDLER_COMMAND" != x; then
48534      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48535    fi
48536  fi
48537
48538      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48539$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48540    elif test "x$COMPILE_TYPE" = xcross; then
48541      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48542$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48543    fi
48544    as_fn_error $? "Cannot continue." "$LINENO" 5
48545
48546fi
48547
48548done
48549
48550
48551  # The cast to long int works around a bug in the HP C Compiler
48552# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48553# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48554# This bug is HP SR number 8606223364.
48555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48556$as_echo_n "checking size of int *... " >&6; }
48557if ${ac_cv_sizeof_int_p+:} false; then :
48558  $as_echo_n "(cached) " >&6
48559else
48560  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48561
48562else
48563  if test "$ac_cv_type_int_p" = yes; then
48564     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48565$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48566as_fn_error 77 "cannot compute sizeof (int *)
48567See \`config.log' for more details" "$LINENO" 5; }
48568   else
48569     ac_cv_sizeof_int_p=0
48570   fi
48571fi
48572
48573fi
48574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48575$as_echo "$ac_cv_sizeof_int_p" >&6; }
48576
48577
48578
48579cat >>confdefs.h <<_ACEOF
48580#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48581_ACEOF
48582
48583
48584
48585  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48586  if test "x$ac_cv_sizeof_int_p" = x; then
48587    # The test failed, lets stick to the assumed value.
48588    { $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
48589$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48590  else
48591    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48592
48593    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48594      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48595      # Let's try to implicitely set the compilers target architecture and retry the test
48596      { $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
48597$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;}
48598      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48599$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48600
48601  # When we add flags to the "official" CFLAGS etc, we need to
48602  # keep track of these additions in ADDED_CFLAGS etc. These
48603  # will later be checked to make sure only controlled additions
48604  # have been made to CFLAGS etc.
48605  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48606  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48607  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48608
48609  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48610  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48611  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48612
48613  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48614  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48615  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48616
48617  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48618  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48619  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48620
48621
48622      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48623      unset ac_cv_sizeof_int_p
48624      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48625      cat >>confdefs.h <<_ACEOF
48626#undef SIZEOF_INT_P
48627_ACEOF
48628
48629      # The cast to long int works around a bug in the HP C Compiler
48630# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48631# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48632# This bug is HP SR number 8606223364.
48633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48634$as_echo_n "checking size of int *... " >&6; }
48635if ${ac_cv_sizeof_int_p+:} false; then :
48636  $as_echo_n "(cached) " >&6
48637else
48638  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48639
48640else
48641  if test "$ac_cv_type_int_p" = yes; then
48642     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48644as_fn_error 77 "cannot compute sizeof (int *)
48645See \`config.log' for more details" "$LINENO" 5; }
48646   else
48647     ac_cv_sizeof_int_p=0
48648   fi
48649fi
48650
48651fi
48652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48653$as_echo "$ac_cv_sizeof_int_p" >&6; }
48654
48655
48656
48657cat >>confdefs.h <<_ACEOF
48658#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48659_ACEOF
48660
48661
48662
48663      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48664
48665      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48666        { $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
48667$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;}
48668        if test "x$COMPILE_TYPE" = xreduced; then
48669
48670  # Print a helpful message on how to acquire the necessary build dependency.
48671  # reduced is the help tag: freetype, cups, alsa etc
48672  MISSING_DEPENDENCY=reduced
48673
48674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48675    cygwin_help $MISSING_DEPENDENCY
48676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48677    msys_help $MISSING_DEPENDENCY
48678  else
48679    PKGHANDLER_COMMAND=
48680
48681    case $PKGHANDLER in
48682      apt-get)
48683        apt_help     $MISSING_DEPENDENCY ;;
48684      yum)
48685        yum_help     $MISSING_DEPENDENCY ;;
48686      port)
48687        port_help    $MISSING_DEPENDENCY ;;
48688      pkgutil)
48689        pkgutil_help $MISSING_DEPENDENCY ;;
48690      pkgadd)
48691        pkgadd_help  $MISSING_DEPENDENCY ;;
48692    esac
48693
48694    if test "x$PKGHANDLER_COMMAND" != x; then
48695      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48696    fi
48697  fi
48698
48699          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48700$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48701        elif test "x$COMPILE_TYPE" = xcross; then
48702          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48703$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48704        fi
48705        as_fn_error $? "Cannot continue." "$LINENO" 5
48706      fi
48707    fi
48708  fi
48709
48710  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48711$as_echo_n "checking for target address size... " >&6; }
48712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48713$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48714
48715
48716  ###############################################################################
48717  #
48718  # Is the target little of big endian?
48719  #
48720   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48721$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48722if ${ac_cv_c_bigendian+:} false; then :
48723  $as_echo_n "(cached) " >&6
48724else
48725  ac_cv_c_bigendian=unknown
48726    # See if we're dealing with a universal compiler.
48727    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48728/* end confdefs.h.  */
48729#ifndef __APPLE_CC__
48730	       not a universal capable compiler
48731	     #endif
48732	     typedef int dummy;
48733
48734_ACEOF
48735if ac_fn_cxx_try_compile "$LINENO"; then :
48736
48737	# Check for potential -arch flags.  It is not universal unless
48738	# there are at least two -arch flags with different values.
48739	ac_arch=
48740	ac_prev=
48741	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48742	 if test -n "$ac_prev"; then
48743	   case $ac_word in
48744	     i?86 | x86_64 | ppc | ppc64)
48745	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48746		 ac_arch=$ac_word
48747	       else
48748		 ac_cv_c_bigendian=universal
48749		 break
48750	       fi
48751	       ;;
48752	   esac
48753	   ac_prev=
48754	 elif test "x$ac_word" = "x-arch"; then
48755	   ac_prev=arch
48756	 fi
48757       done
48758fi
48759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48760    if test $ac_cv_c_bigendian = unknown; then
48761      # See if sys/param.h defines the BYTE_ORDER macro.
48762      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48763/* end confdefs.h.  */
48764#include <sys/types.h>
48765	     #include <sys/param.h>
48766
48767int
48768main ()
48769{
48770#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48771		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48772		     && LITTLE_ENDIAN)
48773	      bogus endian macros
48774	     #endif
48775
48776  ;
48777  return 0;
48778}
48779_ACEOF
48780if ac_fn_cxx_try_compile "$LINENO"; then :
48781  # It does; now see whether it defined to BIG_ENDIAN or not.
48782	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48783/* end confdefs.h.  */
48784#include <sys/types.h>
48785		#include <sys/param.h>
48786
48787int
48788main ()
48789{
48790#if BYTE_ORDER != BIG_ENDIAN
48791		 not big endian
48792		#endif
48793
48794  ;
48795  return 0;
48796}
48797_ACEOF
48798if ac_fn_cxx_try_compile "$LINENO"; then :
48799  ac_cv_c_bigendian=yes
48800else
48801  ac_cv_c_bigendian=no
48802fi
48803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48804fi
48805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48806    fi
48807    if test $ac_cv_c_bigendian = unknown; then
48808      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48809      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48810/* end confdefs.h.  */
48811#include <limits.h>
48812
48813int
48814main ()
48815{
48816#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48817	      bogus endian macros
48818	     #endif
48819
48820  ;
48821  return 0;
48822}
48823_ACEOF
48824if ac_fn_cxx_try_compile "$LINENO"; then :
48825  # It does; now see whether it defined to _BIG_ENDIAN or not.
48826	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48827/* end confdefs.h.  */
48828#include <limits.h>
48829
48830int
48831main ()
48832{
48833#ifndef _BIG_ENDIAN
48834		 not big endian
48835		#endif
48836
48837  ;
48838  return 0;
48839}
48840_ACEOF
48841if ac_fn_cxx_try_compile "$LINENO"; then :
48842  ac_cv_c_bigendian=yes
48843else
48844  ac_cv_c_bigendian=no
48845fi
48846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48847fi
48848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48849    fi
48850    if test $ac_cv_c_bigendian = unknown; then
48851      # Compile a test program.
48852      if test "$cross_compiling" = yes; then :
48853  # Try to guess by grepping values from an object file.
48854	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48855/* end confdefs.h.  */
48856short int ascii_mm[] =
48857		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48858		short int ascii_ii[] =
48859		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48860		int use_ascii (int i) {
48861		  return ascii_mm[i] + ascii_ii[i];
48862		}
48863		short int ebcdic_ii[] =
48864		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48865		short int ebcdic_mm[] =
48866		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48867		int use_ebcdic (int i) {
48868		  return ebcdic_mm[i] + ebcdic_ii[i];
48869		}
48870		extern int foo;
48871
48872int
48873main ()
48874{
48875return use_ascii (foo) == use_ebcdic (foo);
48876  ;
48877  return 0;
48878}
48879_ACEOF
48880if ac_fn_cxx_try_compile "$LINENO"; then :
48881  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48882	      ac_cv_c_bigendian=yes
48883	    fi
48884	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48885	      if test "$ac_cv_c_bigendian" = unknown; then
48886		ac_cv_c_bigendian=no
48887	      else
48888		# finding both strings is unlikely to happen, but who knows?
48889		ac_cv_c_bigendian=unknown
48890	      fi
48891	    fi
48892fi
48893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48894else
48895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48896/* end confdefs.h.  */
48897$ac_includes_default
48898int
48899main ()
48900{
48901
48902	     /* Are we little or big endian?  From Harbison&Steele.  */
48903	     union
48904	     {
48905	       long int l;
48906	       char c[sizeof (long int)];
48907	     } u;
48908	     u.l = 1;
48909	     return u.c[sizeof (long int) - 1] == 1;
48910
48911  ;
48912  return 0;
48913}
48914_ACEOF
48915if ac_fn_cxx_try_run "$LINENO"; then :
48916  ac_cv_c_bigendian=no
48917else
48918  ac_cv_c_bigendian=yes
48919fi
48920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48921  conftest.$ac_objext conftest.beam conftest.$ac_ext
48922fi
48923
48924    fi
48925fi
48926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48927$as_echo "$ac_cv_c_bigendian" >&6; }
48928 case $ac_cv_c_bigendian in #(
48929   yes)
48930     ENDIAN="big";; #(
48931   no)
48932     ENDIAN="little" ;; #(
48933   universal)
48934     ENDIAN="universal_endianness"
48935     ;; #(
48936   *)
48937     ENDIAN="unknown" ;;
48938 esac
48939
48940
48941  if test "x$ENDIAN" = xuniversal_endianness; then
48942    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48943  fi
48944  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48945    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
48946  fi
48947
48948
48949# Configure flags for the tools
48950
48951  ###############################################################################
48952  #
48953  # How to compile shared libraries.
48954  #
48955
48956  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48957    PICFLAG="-fPIC"
48958    C_FLAG_REORDER=''
48959    CXX_FLAG_REORDER=''
48960
48961    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48962      # Linking is different on MacOSX
48963      if test "x$STATIC_BUILD" = xtrue; then
48964        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
48965      else
48966        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48967        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48968      fi
48969      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48970      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48971      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48972      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48973    else
48974      # Default works for linux, might work on other platforms as well.
48975      SHARED_LIBRARY_FLAGS='-shared'
48976      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
48977      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48978      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48979      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48980    fi
48981  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48982    C_FLAG_REORDER=''
48983    CXX_FLAG_REORDER=''
48984
48985    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48986      # Linking is different on MacOSX
48987      PICFLAG=''
48988      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48989      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48990      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48991      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48992      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48993
48994      if test "x$STATIC_BUILD" = xfalse; then
48995        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
48996      fi
48997    else
48998      # Default works for linux, might work on other platforms as well.
48999      PICFLAG='-fPIC'
49000      SHARED_LIBRARY_FLAGS='-shared'
49001      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49002      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49003      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49004      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49005    fi
49006  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49007    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49008      PICFLAG="-xcode=pic32"
49009    else
49010      PICFLAG="-KPIC"
49011    fi
49012    C_FLAG_REORDER='-xF'
49013    CXX_FLAG_REORDER='-xF'
49014    SHARED_LIBRARY_FLAGS="-G"
49015    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49016    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49017    SET_SHARED_LIBRARY_NAME='-h $1'
49018    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49019  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49020    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49021    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49022    # will have to patch this single instruction with a call to some out-of-order code which
49023    # does the load from the TOC. This is of course slow. But in that case we also would have
49024    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49025    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49026    # can be patched directly by the linker and does not require a jump to out-of-order code.
49027    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49028    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49029    # loads for accessing a global variable). But there are rumors that this may be seen as a
49030    # 'performance feature' because of improved code locality of the symbols used in a
49031    # compilation unit.
49032    PICFLAG="-qpic"
49033    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49034    C_FLAG_REORDER=''
49035    CXX_FLAG_REORDER=''
49036    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49037    SET_EXECUTABLE_ORIGIN=""
49038    SET_SHARED_LIBRARY_ORIGIN=''
49039    SET_SHARED_LIBRARY_NAME=''
49040    SET_SHARED_LIBRARY_MAPFILE=''
49041  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49042    PICFLAG=""
49043    C_FLAG_REORDER=''
49044    CXX_FLAG_REORDER=''
49045    SHARED_LIBRARY_FLAGS="-dll"
49046    SET_EXECUTABLE_ORIGIN=''
49047    SET_SHARED_LIBRARY_ORIGIN=''
49048    SET_SHARED_LIBRARY_NAME=''
49049    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49050  fi
49051
49052
49053
49054
49055
49056
49057
49058
49059
49060  # The (cross) compiler is now configured, we can now test capabilities
49061  # of the target platform.
49062
49063
49064
49065  ###############################################################################
49066  #
49067  # Setup the opt flags for different compilers
49068  # and different operating systems.
49069  #
49070
49071  # FIXME: this was indirectly the old default, but just inherited.
49072  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49073  #   C_FLAG_DEPS="-MMD -MF"
49074  # fi
49075
49076  # Generate make dependency files
49077  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49078    C_FLAG_DEPS="-MMD -MF"
49079  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49080    C_FLAG_DEPS="-MMD -MF"
49081  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49082    C_FLAG_DEPS="-xMMD -xMF"
49083  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49084    C_FLAG_DEPS="-qmakedep=gcc -MF"
49085  fi
49086  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49087
49088
49089
49090  # Debug symbols
49091  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49092    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49093      # reduce from default "-g2" option to save space
49094      CFLAGS_DEBUG_SYMBOLS="-g1"
49095      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49096    else
49097      CFLAGS_DEBUG_SYMBOLS="-g"
49098      CXXFLAGS_DEBUG_SYMBOLS="-g"
49099    fi
49100  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49101    CFLAGS_DEBUG_SYMBOLS="-g"
49102    CXXFLAGS_DEBUG_SYMBOLS="-g"
49103  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49104    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49105    # -g0 enables debug symbols without disabling inlining.
49106    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49107  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49108    CFLAGS_DEBUG_SYMBOLS="-g"
49109    CXXFLAGS_DEBUG_SYMBOLS="-g"
49110  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49111    CFLAGS_DEBUG_SYMBOLS="-Zi"
49112    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49113  fi
49114
49115
49116
49117  # Debug symbols for JVM_CFLAGS
49118  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49119    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49120    if test "x$DEBUG_LEVEL" = xslowdebug; then
49121      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49122    else
49123      # -g0 does not disable inlining, which -g does.
49124      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49125    fi
49126  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49127    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49128  else
49129    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49130  fi
49131
49132
49133  # bounds, memory and behavior checking options
49134  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49135    case $DEBUG_LEVEL in
49136    release )
49137      # no adjustment
49138      ;;
49139    fastdebug )
49140      # no adjustment
49141      ;;
49142    slowdebug )
49143      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49144      # get's added conditionally on whether we produce debug symbols or not.
49145      # This is most likely not really correct.
49146
49147      # Add runtime stack smashing and undefined behavior checks.
49148      # Not all versions of gcc support -fstack-protector
49149      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49150
49151
49152
49153
49154
49155
49156
49157
49158
49159
49160
49161
49162
49163
49164
49165
49166
49167
49168
49169
49170
49171
49172
49173
49174
49175
49176
49177
49178
49179
49180
49181
49182
49183
49184
49185
49186
49187
49188
49189
49190
49191
49192    # Execute function body
49193
49194
49195
49196
49197
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234
49235
49236
49237
49238
49239
49240
49241    # Execute function body
49242
49243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49244$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49245  supports=yes
49246
49247  saved_cflags="$CFLAGS"
49248  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49249  ac_ext=c
49250ac_cpp='$CPP $CPPFLAGS'
49251ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49252ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49253ac_compiler_gnu=$ac_cv_c_compiler_gnu
49254
49255  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49256/* end confdefs.h.  */
49257int i;
49258_ACEOF
49259if ac_fn_c_try_compile "$LINENO"; then :
49260
49261else
49262  supports=no
49263fi
49264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49265  ac_ext=cpp
49266ac_cpp='$CXXCPP $CPPFLAGS'
49267ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49268ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49269ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49270
49271  CFLAGS="$saved_cflags"
49272
49273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49274$as_echo "$supports" >&6; }
49275  if test "x$supports" = "xyes" ; then
49276    :
49277    C_COMP_SUPPORTS="yes"
49278  else
49279    :
49280    C_COMP_SUPPORTS="no"
49281  fi
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341    # Execute function body
49342
49343  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49344$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49345  supports=yes
49346
49347  saved_cxxflags="$CXXFLAGS"
49348  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49349  ac_ext=cpp
49350ac_cpp='$CXXCPP $CPPFLAGS'
49351ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49352ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49353ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49354
49355  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49356/* end confdefs.h.  */
49357int i;
49358_ACEOF
49359if ac_fn_cxx_try_compile "$LINENO"; then :
49360
49361else
49362  supports=no
49363fi
49364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49365  ac_ext=cpp
49366ac_cpp='$CXXCPP $CPPFLAGS'
49367ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49368ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49369ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49370
49371  CXXFLAGS="$saved_cxxflags"
49372
49373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49374$as_echo "$supports" >&6; }
49375  if test "x$supports" = "xyes" ; then
49376    :
49377    CXX_COMP_SUPPORTS="yes"
49378  else
49379    :
49380    CXX_COMP_SUPPORTS="no"
49381  fi
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49396$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49397  supports=no
49398  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49399
49400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49401$as_echo "$supports" >&6; }
49402  if test "x$supports" = "xyes" ; then
49403    :
49404
49405  else
49406    :
49407    STACK_PROTECTOR_CFLAG=""
49408  fi
49409
49410
49411
49412
49413
49414
49415
49416      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49417      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49418      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49419        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49420      fi
49421      ;;
49422    esac
49423  fi
49424
49425  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49426    if test "x$DEBUG_LEVEL" != xrelease; then
49427      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49428        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49429      fi
49430    fi
49431  fi
49432
49433  # Optimization levels
49434  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49435    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49436
49437    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49438      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49439      C_O_FLAG_HIGHEST_JVM="-xO4"
49440      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49441      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49442      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49443      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49444      C_O_FLAG_DEBUG_JVM=""
49445      C_O_FLAG_NONE="-xregs=no%frameptr"
49446      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49447      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49448      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49449      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49450      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49451      CXX_O_FLAG_DEBUG_JVM=""
49452      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49453      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49454        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49455        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49456      fi
49457    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49458      C_O_FLAG_HIGHEST_JVM="-xO4"
49459      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49460      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49461      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49462      C_O_FLAG_DEBUG=""
49463      C_O_FLAG_DEBUG_JVM=""
49464      C_O_FLAG_NONE=""
49465      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49466      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49467      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49468      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49469      CXX_O_FLAG_DEBUG=""
49470      CXX_O_FLAG_DEBUG_JVM=""
49471      CXX_O_FLAG_NONE=""
49472    fi
49473  else
49474    # The remaining toolchains share opt flags between CC and CXX;
49475    # setup for C and duplicate afterwards.
49476    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49477      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49478        # On MacOSX we optimize for size, something
49479        # we should do for all platforms?
49480        C_O_FLAG_HIGHEST_JVM="-Os"
49481        C_O_FLAG_HIGHEST="-Os"
49482        C_O_FLAG_HI="-Os"
49483        C_O_FLAG_NORM="-Os"
49484        C_O_FLAG_SIZE="-Os"
49485      else
49486        C_O_FLAG_HIGHEST_JVM="-O3"
49487        C_O_FLAG_HIGHEST="-O3"
49488        C_O_FLAG_HI="-O3"
49489        C_O_FLAG_NORM="-O2"
49490        C_O_FLAG_SIZE="-Os"
49491      fi
49492      C_O_FLAG_DEBUG="-O0"
49493      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49494        C_O_FLAG_DEBUG_JVM=""
49495      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49496        C_O_FLAG_DEBUG_JVM="-O0"
49497      fi
49498      C_O_FLAG_NONE="-O0"
49499    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49500      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49501        # On MacOSX we optimize for size, something
49502        # we should do for all platforms?
49503        C_O_FLAG_HIGHEST_JVM="-Os"
49504        C_O_FLAG_HIGHEST="-Os"
49505        C_O_FLAG_HI="-Os"
49506        C_O_FLAG_NORM="-Os"
49507        C_O_FLAG_SIZE="-Os"
49508      else
49509        C_O_FLAG_HIGHEST_JVM="-O3"
49510        C_O_FLAG_HIGHEST="-O3"
49511        C_O_FLAG_HI="-O3"
49512        C_O_FLAG_NORM="-O2"
49513        C_O_FLAG_SIZE="-Os"
49514      fi
49515      C_O_FLAG_DEBUG="-O0"
49516      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49517        C_O_FLAG_DEBUG_JVM=""
49518      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49519        C_O_FLAG_DEBUG_JVM="-O0"
49520      fi
49521      C_O_FLAG_NONE="-O0"
49522    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49523      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49524      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49525      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49526      C_O_FLAG_NORM="-O2"
49527      C_O_FLAG_DEBUG="-qnoopt"
49528      # FIXME: Value below not verified.
49529      C_O_FLAG_DEBUG_JVM=""
49530      C_O_FLAG_NONE="-qnoopt"
49531    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49532      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49533      C_O_FLAG_HIGHEST="-O2"
49534      C_O_FLAG_HI="-O1"
49535      C_O_FLAG_NORM="-O1"
49536      C_O_FLAG_DEBUG="-Od"
49537      C_O_FLAG_DEBUG_JVM=""
49538      C_O_FLAG_NONE="-Od"
49539      C_O_FLAG_SIZE="-Os"
49540    fi
49541    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49542    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49543    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49544    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49545    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49546    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49547    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49548    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49549  fi
49550
49551  # Adjust optimization flags according to debug level.
49552  case $DEBUG_LEVEL in
49553    release )
49554      # no adjustment
49555      ;;
49556    fastdebug )
49557      # Not quite so much optimization
49558      C_O_FLAG_HI="$C_O_FLAG_NORM"
49559      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49560      ;;
49561    slowdebug )
49562      # Disable optimization
49563      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49564      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49565      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49566      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49567      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49568      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49569      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49570      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49571      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49572      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49573      ;;
49574  esac
49575
49576
49577
49578
49579
49580
49581
49582
49583
49584
49585
49586
49587
49588
49589
49590
49591
49592
49593
49594  # Special extras...
49595  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49596    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49597      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49598      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49599    fi
49600    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49601    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49602  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49603    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49604    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49605  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49606    CXXSTD_CXXFLAG="-std=gnu++98"
49607
49608
49609
49610
49611
49612
49613
49614
49615
49616
49617
49618
49619
49620
49621
49622
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637
49638
49639
49640
49641
49642
49643
49644
49645
49646
49647
49648
49649    # Execute function body
49650
49651  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49652$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49653  supports=yes
49654
49655  saved_cxxflags="$CXXFLAGS"
49656  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49657  ac_ext=cpp
49658ac_cpp='$CXXCPP $CPPFLAGS'
49659ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49660ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49661ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49662
49663  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49664/* end confdefs.h.  */
49665int i;
49666_ACEOF
49667if ac_fn_cxx_try_compile "$LINENO"; then :
49668
49669else
49670  supports=no
49671fi
49672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49673  ac_ext=cpp
49674ac_cpp='$CXXCPP $CPPFLAGS'
49675ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49676ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49677ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49678
49679  CXXFLAGS="$saved_cxxflags"
49680
49681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49682$as_echo "$supports" >&6; }
49683  if test "x$supports" = "xyes" ; then
49684    :
49685
49686  else
49687    :
49688    CXXSTD_CXXFLAG=""
49689  fi
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49703    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49704
49705  fi
49706  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49707    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49708    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49709  fi
49710
49711  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49712    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49713    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49714  fi
49715
49716  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49717  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49718  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49719
49720  ###############################################################################
49721  #
49722  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49723  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49724  #
49725
49726  # Setup compiler/platform specific flags into
49727  #    CFLAGS_JDK    - C Compiler flags
49728  #    CXXFLAGS_JDK  - C++ Compiler flags
49729  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49730  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49731    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49732    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49733    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49734    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49735      # Force compatibility with i586 on 32 bit intel platforms.
49736      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49737      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49738    fi
49739    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49740        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49741    case $OPENJDK_TARGET_CPU_ARCH in
49742      arm )
49743        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49744        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49745        ;;
49746      ppc )
49747        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49748        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49749        ;;
49750      s390 )
49751        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49752        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49753        ;;
49754      * )
49755        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49756        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49757        ;;
49758    esac
49759
49760
49761
49762
49763
49764
49765
49766
49767
49768
49769
49770
49771
49772
49773
49774
49775
49776
49777
49778
49779
49780
49781
49782
49783
49784
49785
49786
49787
49788
49789
49790
49791
49792
49793
49794
49795
49796
49797
49798
49799
49800
49801
49802
49803
49804
49805
49806
49807
49808
49809
49810
49811
49812
49813    # Execute function body
49814
49815  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49816  REFERENCE_VERSION=6
49817
49818  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
49819    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
49820  fi
49821
49822  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49823    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49824  fi
49825
49826  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49827  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
49828
49829  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49830    :
49831
49832  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49833  # runs afoul of the more aggressive versions of these optimisations.
49834  # Notably, value range propagation now assumes that the this pointer of C++
49835  # member functions is non-null.
49836  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49837        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49838        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49839$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49840  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49841  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49842
49843  else
49844    :
49845
49846  fi
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49862    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49863
49864    # Restrict the debug information created by Clang to avoid
49865    # too big object files and speed the build up a little bit
49866    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49867    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49868    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49869      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49870        # Force compatibility with i586 on 32 bit intel platforms.
49871        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49872        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49873      fi
49874      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49875      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49876          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49877      case $OPENJDK_TARGET_CPU_ARCH in
49878        ppc )
49879          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49880          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49881          ;;
49882        * )
49883          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49884          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49885          ;;
49886      esac
49887    fi
49888  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49889    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49890    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49891    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49892      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49893    fi
49894
49895    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49896    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49897  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49898    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49899    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49900    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49901  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49902    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49903        -MD -Zc:wchar_t- -W3 -wd4800 \
49904        -DWIN32_LEAN_AND_MEAN \
49905        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49906        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49907        -DWIN32 -DIAL"
49908    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49909      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49910    else
49911      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49912    fi
49913    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49914    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49915    # studio.
49916    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49917      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49918      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49919      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49920    fi
49921  fi
49922
49923  ###############################################################################
49924
49925  # Adjust flags according to debug level.
49926  case $DEBUG_LEVEL in
49927    fastdebug | slowdebug )
49928      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49929      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49930      ;;
49931    release )
49932      ;;
49933    * )
49934      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49935      ;;
49936  esac
49937
49938  # Set some common defines. These works for all compilers, but assume
49939  # -D is universally accepted.
49940
49941  # Setup endianness
49942  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49943    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49944    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49945    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49946    #   Note: -Dmacro         is the same as    #define macro 1
49947    #         -Dmacro=        is the same as    #define macro
49948    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49949      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49950    else
49951      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49952    fi
49953  else
49954    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49955    # are defined in the system?
49956    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49957      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49958    else
49959      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49960    fi
49961  fi
49962
49963  # Setup target OS define. Use OS target name but in upper case.
49964  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
49965  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
49966
49967  # Setup target CPU
49968  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49969      $OPENJDK_TARGET_ADD_LP64 \
49970      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
49971
49972  # Setup debug/release defines
49973  if test "x$DEBUG_LEVEL" = xrelease; then
49974    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
49975    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49976      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
49977    fi
49978  else
49979    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
49980  fi
49981
49982  # Set some additional per-OS defines.
49983  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49984    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
49985    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
49986        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
49987  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49988    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
49989    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
49990        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
49991  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49992    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
49993    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
49994    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
49995    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
49996        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
49997        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
49998        -fno-omit-frame-pointer"
49999  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50000    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50001    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50002    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50003        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50004        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50005  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50006    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50007  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50008    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50009    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50010  fi
50011
50012  # Set some additional per-CPU defines.
50013  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50014    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50015  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50016    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50017  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50018    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50019      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50020      # fixes `relocation truncated to fit' error for gcc 4.1.
50021      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50022      # Use ppc64 instructions, but schedule for power5
50023      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50024    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50025      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50026    fi
50027  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50028    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50029      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50030      # Little endian machine uses ELFv2 ABI.
50031      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50032      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50033      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50034    fi
50035  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50036    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50037      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50038    fi
50039  fi
50040
50041  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50042    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50043  fi
50044
50045  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50046    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50047      # Solaris does not have _LP64=1 in the old build.
50048      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50049      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50050    fi
50051  fi
50052
50053  # Set JVM_CFLAGS warning handling
50054  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50055    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50056        -Wunused-value -Woverloaded-virtual"
50057
50058    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50059
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072
50073
50074
50075
50076
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088
50089
50090
50091
50092
50093
50094
50095
50096
50097
50098
50099
50100
50101
50102
50103
50104
50105
50106
50107
50108
50109
50110
50111
50112
50113    # Execute function body
50114
50115  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50116  REFERENCE_VERSION=4.8
50117
50118  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50119    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50120  fi
50121
50122  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50123    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50124  fi
50125
50126  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50127  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50128
50129  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50130    :
50131
50132            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50133            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50134
50135
50136  else
50137    :
50138
50139  fi
50140
50141
50142
50143
50144
50145
50146
50147
50148
50149
50150
50151
50152
50153
50154    fi
50155    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50156      # Non-zero builds have stricter warnings
50157      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50158    else
50159      if test "x$TOOLCHAIN_TYPE" = xclang; then
50160        # Some versions of llvm do not like -Wundef
50161        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50162      fi
50163    fi
50164  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50165    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50166        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50167  fi
50168
50169  # Additional macosx handling
50170  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50171    # Setting these parameters makes it an error to link to macosx APIs that are
50172    # newer than the given OS version and makes the linked binaries compatible
50173    # even if built on a newer version of the OS.
50174    # The expected format is X.Y.Z
50175    MACOSX_VERSION_MIN=10.7.0
50176
50177
50178    # The macro takes the version with no dots, ex: 1070
50179    # Let the flags variables get resolved in make for easier override on make
50180    # command line.
50181    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50182    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50183  fi
50184
50185  # Setup some hard coded includes
50186  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50187      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50188      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50189      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50190      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50191      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50192      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50193
50194  # The shared libraries are compiled using the picflag.
50195  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50196      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50197  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50198      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50199
50200  # Executable flags
50201  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50202  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50203
50204
50205
50206
50207
50208
50209  # Setup LDFLAGS et al.
50210  #
50211
50212  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50213    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50214    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50215    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50216    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50217      LDFLAGS_SAFESH="-safeseh"
50218      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50219      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50220      # NOTE: Old build added -machine. Probably not needed.
50221      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50222    else
50223      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50224    fi
50225  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50226      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50227      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50228        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50229        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50230    fi
50231  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50232    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50233    # We have previously set HAS_GNU_HASH if this is the case
50234    if test -n "$HAS_GNU_HASH"; then
50235      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50236      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50237      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50238    fi
50239      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50240        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50241    fi
50242    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50243      # And since we now know that the linker is gnu, then add -z defs, to forbid
50244      # undefined symbols in object files.
50245      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50246      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50247      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50248      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50249      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50250      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50251        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50252      fi
50253      case $DEBUG_LEVEL in
50254        release )
50255          # tell linker to optimize libraries.
50256          # Should this be supplied to the OSS linker as well?
50257          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50258          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50259          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50260          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50261            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50262          fi
50263          ;;
50264        slowdebug )
50265          # Hotspot always let the linker optimize
50266          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50267          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50268            # do relocations at load
50269            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50270            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50271            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50272          fi
50273          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50274            # mark relocations read only
50275            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50276            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50277            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50278          fi
50279          ;;
50280        fastdebug )
50281          # Hotspot always let the linker optimize
50282          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50283          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50284            # mark relocations read only
50285            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50286            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50287            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50288          fi
50289          ;;
50290        * )
50291          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50292          ;;
50293        esac
50294    fi
50295  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50296    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50297    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50298    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50299    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50300    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50301    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50302      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50303    fi
50304  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50305    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50306    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50307    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50308  fi
50309
50310  # Customize LDFLAGS for executables
50311
50312  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50313
50314  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50315    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50316      LDFLAGS_STACK_SIZE=1048576
50317    else
50318      LDFLAGS_STACK_SIZE=327680
50319    fi
50320    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50321  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50322    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50323  fi
50324
50325  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50326
50327  # Customize LDFLAGS for libs
50328  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50329
50330  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50331  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50332    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50333        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50334    JDKLIB_LIBS=""
50335  else
50336    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50337        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50338
50339    if test "xTARGET" = "xTARGET"; then
50340      # On some platforms (mac) the linker warns about non existing -L dirs.
50341      # For any of the variants server, client or minimal, the dir matches the
50342      # variant name. The "main" variant should be used for linking. For the
50343      # rest, the dir is just server.
50344      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50345          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50346        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50347            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50348      else
50349        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50350            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50351      fi
50352    elif test "xTARGET" = "xBUILD"; then
50353      # When building a buildjdk, it's always only the server variant
50354      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50355          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50356    fi
50357
50358    JDKLIB_LIBS="-ljava -ljvm"
50359    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50360      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50361    fi
50362
50363  fi
50364
50365LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50366
50367  # Set JVM_LIBS (per os)
50368  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50369    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50370  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50371    # FIXME: This hard-coded path is not really proper.
50372    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50373      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50374    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50375      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50376    fi
50377    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50378        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50379  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50380    JVM_LIBS="$JVM_LIBS -lm"
50381  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50382    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50383  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50384    JVM_LIBS="$JVM_LIBS -lm"
50385  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50386    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50387        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50388        wsock32.lib winmm.lib version.lib psapi.lib"
50389    fi
50390
50391  # Set JVM_ASFLAGS
50392  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50393    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50394      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50395    fi
50396  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50397    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50398  fi
50399
50400  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50401
50402
50403
50404
50405
50406
50407
50408
50409
50410
50411
50412
50413
50414
50415
50416  # Special extras...
50417  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50418    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50419      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50420      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50421    fi
50422    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50423    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50424  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50425    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50426    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50427  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50428    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50429
50430
50431
50432
50433
50434
50435
50436
50437
50438
50439
50440
50441
50442
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453
50454
50455
50456
50457
50458
50459
50460
50461
50462
50463
50464
50465
50466
50467
50468
50469
50470
50471    # Execute function body
50472
50473  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50474$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50475  supports=yes
50476
50477  saved_cxxflags="$CXXFLAGS"
50478  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50479  ac_ext=cpp
50480ac_cpp='$CXXCPP $CPPFLAGS'
50481ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50482ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50483ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50484
50485  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50486/* end confdefs.h.  */
50487int i;
50488_ACEOF
50489if ac_fn_cxx_try_compile "$LINENO"; then :
50490
50491else
50492  supports=no
50493fi
50494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50495  ac_ext=cpp
50496ac_cpp='$CXXCPP $CPPFLAGS'
50497ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50498ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50499ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50500
50501  CXXFLAGS="$saved_cxxflags"
50502
50503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50504$as_echo "$supports" >&6; }
50505  if test "x$supports" = "xyes" ; then
50506    :
50507
50508  else
50509    :
50510    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50511  fi
50512
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522
50523
50524    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50525    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50526
50527  fi
50528  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50529    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50530    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50531  fi
50532
50533  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50534    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50535    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50536  fi
50537
50538  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50539  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50540  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50541
50542  ###############################################################################
50543  #
50544  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50545  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50546  #
50547
50548  # Setup compiler/platform specific flags into
50549  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50550  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50551  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50552  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50553    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50554    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50555    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50556    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50557      # Force compatibility with i586 on 32 bit intel platforms.
50558      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50559      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50560    fi
50561    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50562        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50563    case $OPENJDK_BUILD_CPU_ARCH in
50564      arm )
50565        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50566        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50567        ;;
50568      ppc )
50569        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50570        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50571        ;;
50572      s390 )
50573        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50574        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50575        ;;
50576      * )
50577        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50578        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50579        ;;
50580    esac
50581
50582
50583
50584
50585
50586
50587
50588
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604
50605
50606
50607
50608
50609
50610
50611
50612
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633
50634
50635    # Execute function body
50636
50637  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50638  REFERENCE_VERSION=6
50639
50640  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50641    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50642  fi
50643
50644  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50645    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50646  fi
50647
50648  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50649  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50650
50651  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50652    :
50653
50654  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50655  # runs afoul of the more aggressive versions of these optimisations.
50656  # Notably, value range propagation now assumes that the this pointer of C++
50657  # member functions is non-null.
50658  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50659        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50660        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50661$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50662  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50663  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50664
50665  else
50666    :
50667
50668  fi
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50684    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50685
50686    # Restrict the debug information created by Clang to avoid
50687    # too big object files and speed the build up a little bit
50688    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50689    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50690    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50691      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50692        # Force compatibility with i586 on 32 bit intel platforms.
50693        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50694        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50695      fi
50696      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50697      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50698          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50699      case $OPENJDK_BUILD_CPU_ARCH in
50700        ppc )
50701          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50702          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50703          ;;
50704        * )
50705          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50706          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50707          ;;
50708      esac
50709    fi
50710  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50711    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50712    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50713    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50714      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50715    fi
50716
50717    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50718    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50719  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50720    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50721    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50722    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50723  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50724    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50725        -MD -Zc:wchar_t- -W3 -wd4800 \
50726        -DWIN32_LEAN_AND_MEAN \
50727        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50728        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50729        -DWIN32 -DIAL"
50730    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50731      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50732    else
50733      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50734    fi
50735    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50736    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50737    # studio.
50738    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50739      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50740      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50741      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50742    fi
50743  fi
50744
50745  ###############################################################################
50746
50747  # Adjust flags according to debug level.
50748  case $DEBUG_LEVEL in
50749    fastdebug | slowdebug )
50750      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50751      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50752      ;;
50753    release )
50754      ;;
50755    * )
50756      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50757      ;;
50758  esac
50759
50760  # Set some common defines. These works for all compilers, but assume
50761  # -D is universally accepted.
50762
50763  # Setup endianness
50764  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50765    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50766    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50767    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50768    #   Note: -Dmacro         is the same as    #define macro 1
50769    #         -Dmacro=        is the same as    #define macro
50770    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50771      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50772    else
50773      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50774    fi
50775  else
50776    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50777    # are defined in the system?
50778    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50779      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50780    else
50781      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50782    fi
50783  fi
50784
50785  # Setup target OS define. Use OS target name but in upper case.
50786  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50787  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50788
50789  # Setup target CPU
50790  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50791      $OPENJDK_BUILD_ADD_LP64 \
50792      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50793
50794  # Setup debug/release defines
50795  if test "x$DEBUG_LEVEL" = xrelease; then
50796    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50797    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50798      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50799    fi
50800  else
50801    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50802  fi
50803
50804  # Set some additional per-OS defines.
50805  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50806    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50807    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50808        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50809  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50810    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50811    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50812        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50813  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50814    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50815    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50816    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50817    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50818        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50819        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50820        -fno-omit-frame-pointer"
50821  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50822    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50823    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50824    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50825        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50826        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50827  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50828    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50829  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50830    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50831    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50832  fi
50833
50834  # Set some additional per-CPU defines.
50835  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50836    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50837  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50838    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50839  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50840    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50841      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50842      # fixes `relocation truncated to fit' error for gcc 4.1.
50843      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50844      # Use ppc64 instructions, but schedule for power5
50845      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50846    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50847      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50848    fi
50849  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50850    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50851      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50852      # Little endian machine uses ELFv2 ABI.
50853      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50854      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50855      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
50856    fi
50857  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50858    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50859      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50860    fi
50861  fi
50862
50863  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50864    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50865  fi
50866
50867  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50868    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50869      # Solaris does not have _LP64=1 in the old build.
50870      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50871      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50872    fi
50873  fi
50874
50875  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50876  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50877    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50878        -Wunused-value -Woverloaded-virtual"
50879
50880    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50881
50882
50883
50884
50885
50886
50887
50888
50889
50890
50891
50892
50893
50894
50895
50896
50897
50898
50899
50900
50901
50902
50903
50904
50905
50906
50907
50908
50909
50910
50911
50912
50913
50914
50915
50916
50917
50918
50919
50920
50921
50922
50923
50924
50925
50926
50927
50928
50929
50930
50931
50932
50933
50934
50935    # Execute function body
50936
50937  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50938  REFERENCE_VERSION=4.8
50939
50940  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50941    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50942  fi
50943
50944  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50945    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50946  fi
50947
50948  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50949  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50950
50951  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50952    :
50953
50954            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50955            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50956
50957
50958  else
50959    :
50960
50961  fi
50962
50963
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973
50974
50975
50976    fi
50977    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50978      # Non-zero builds have stricter warnings
50979      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50980    else
50981      if test "x$TOOLCHAIN_TYPE" = xclang; then
50982        # Some versions of llvm do not like -Wundef
50983        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
50984      fi
50985    fi
50986  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50987    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50988        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50989  fi
50990
50991  # Additional macosx handling
50992  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50993    # Setting these parameters makes it an error to link to macosx APIs that are
50994    # newer than the given OS version and makes the linked binaries compatible
50995    # even if built on a newer version of the OS.
50996    # The expected format is X.Y.Z
50997    MACOSX_VERSION_MIN=10.7.0
50998
50999
51000    # The macro takes the version with no dots, ex: 1070
51001    # Let the flags variables get resolved in make for easier override on make
51002    # command line.
51003    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51004    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51005  fi
51006
51007  # Setup some hard coded includes
51008  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51009      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51010      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51011      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51012      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51013      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51014      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51015
51016  # The shared libraries are compiled using the picflag.
51017  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51018      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51019  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51020      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51021
51022  # Executable flags
51023  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51024  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51025
51026
51027
51028
51029
51030
51031  # Setup LDFLAGS et al.
51032  #
51033
51034  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51035    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51036    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51037    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51038    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51039      LDFLAGS_SAFESH="-safeseh"
51040      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51041      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51042      # NOTE: Old build added -machine. Probably not needed.
51043      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51044    else
51045      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51046    fi
51047  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51048      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51049      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51050        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51051        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51052    fi
51053  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51054    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51055    # We have previously set HAS_GNU_HASH if this is the case
51056    if test -n "$HAS_GNU_HASH"; then
51057      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51058      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51059      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51060    fi
51061      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51062        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51063    fi
51064    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51065      # And since we now know that the linker is gnu, then add -z defs, to forbid
51066      # undefined symbols in object files.
51067      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51068      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51069      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51070      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51071      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51072      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51073        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51074      fi
51075      case $DEBUG_LEVEL in
51076        release )
51077          # tell linker to optimize libraries.
51078          # Should this be supplied to the OSS linker as well?
51079          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51080          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51081          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51082          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51083            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51084          fi
51085          ;;
51086        slowdebug )
51087          # Hotspot always let the linker optimize
51088          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51089          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51090            # do relocations at load
51091            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51092            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51093            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51094          fi
51095          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51096            # mark relocations read only
51097            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51098            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51099            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51100          fi
51101          ;;
51102        fastdebug )
51103          # Hotspot always let the linker optimize
51104          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51105          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51106            # mark relocations read only
51107            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51108            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51109            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51110          fi
51111          ;;
51112        * )
51113          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51114          ;;
51115        esac
51116    fi
51117  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51118    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51119    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51120    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51121    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51122    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51123    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51124      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51125    fi
51126  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51127    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51128    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51129    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51130  fi
51131
51132  # Customize LDFLAGS for executables
51133
51134  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51135
51136  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51137    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51138      LDFLAGS_STACK_SIZE=1048576
51139    else
51140      LDFLAGS_STACK_SIZE=327680
51141    fi
51142    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51143  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51144    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51145  fi
51146
51147  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51148
51149  # Customize LDFLAGS for libs
51150  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51151
51152  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51153  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51154    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51155        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51156    OPENJDK_BUILD_JDKLIB_LIBS=""
51157  else
51158    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51159        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51160
51161    if test "xBUILD" = "xTARGET"; then
51162      # On some platforms (mac) the linker warns about non existing -L dirs.
51163      # For any of the variants server, client or minimal, the dir matches the
51164      # variant name. The "main" variant should be used for linking. For the
51165      # rest, the dir is just server.
51166      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51167          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51168        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51169            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51170      else
51171        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51172            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51173      fi
51174    elif test "xBUILD" = "xBUILD"; then
51175      # When building a buildjdk, it's always only the server variant
51176      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51177          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51178    fi
51179
51180    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51181    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51182      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51183    fi
51184
51185  fi
51186
51187OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51188
51189  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51190  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51191    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51192  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51193    # FIXME: This hard-coded path is not really proper.
51194    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51195      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51196    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51197      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51198    fi
51199    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51200        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51201  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51202    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51203  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51204    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51205  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51206    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51207  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51208    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51209        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51210        wsock32.lib winmm.lib version.lib psapi.lib"
51211    fi
51212
51213  # Set OPENJDK_BUILD_JVM_ASFLAGS
51214  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51215    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51216      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51217    fi
51218  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51219    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51220  fi
51221
51222  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238  # Tests are only ever compiled for TARGET
51239  # Flags for compiling test libraries
51240  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51241  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51242
51243  # Flags for compiling test executables
51244  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51245  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51246
51247
51248
51249
51250
51251
51252  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51253  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51254
51255
51256
51257
51258
51259
51260  # Some Zero and Shark settings.
51261  # ZERO_ARCHFLAG tells the compiler which mode to build for
51262  case "${OPENJDK_TARGET_CPU}" in
51263    s390)
51264      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51265      ;;
51266    *)
51267      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51268  esac
51269
51270
51271
51272
51273
51274
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288
51289
51290
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311    # Execute function body
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360    # Execute function body
51361
51362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51363$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51364  supports=yes
51365
51366  saved_cflags="$CFLAGS"
51367  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51368  ac_ext=c
51369ac_cpp='$CPP $CPPFLAGS'
51370ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51371ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51372ac_compiler_gnu=$ac_cv_c_compiler_gnu
51373
51374  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51375/* end confdefs.h.  */
51376int i;
51377_ACEOF
51378if ac_fn_c_try_compile "$LINENO"; then :
51379
51380else
51381  supports=no
51382fi
51383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51384  ac_ext=cpp
51385ac_cpp='$CXXCPP $CPPFLAGS'
51386ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51387ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51388ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51389
51390  CFLAGS="$saved_cflags"
51391
51392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51393$as_echo "$supports" >&6; }
51394  if test "x$supports" = "xyes" ; then
51395    :
51396    C_COMP_SUPPORTS="yes"
51397  else
51398    :
51399    C_COMP_SUPPORTS="no"
51400  fi
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460    # Execute function body
51461
51462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51463$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51464  supports=yes
51465
51466  saved_cxxflags="$CXXFLAGS"
51467  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51468  ac_ext=cpp
51469ac_cpp='$CXXCPP $CPPFLAGS'
51470ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51471ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51472ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51473
51474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51475/* end confdefs.h.  */
51476int i;
51477_ACEOF
51478if ac_fn_cxx_try_compile "$LINENO"; then :
51479
51480else
51481  supports=no
51482fi
51483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51484  ac_ext=cpp
51485ac_cpp='$CXXCPP $CPPFLAGS'
51486ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51487ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51488ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51489
51490  CXXFLAGS="$saved_cxxflags"
51491
51492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51493$as_echo "$supports" >&6; }
51494  if test "x$supports" = "xyes" ; then
51495    :
51496    CXX_COMP_SUPPORTS="yes"
51497  else
51498    :
51499    CXX_COMP_SUPPORTS="no"
51500  fi
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51515$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51516  supports=no
51517  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51518
51519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51520$as_echo "$supports" >&6; }
51521  if test "x$supports" = "xyes" ; then
51522    :
51523
51524  else
51525    :
51526    ZERO_ARCHFLAG=""
51527  fi
51528
51529
51530
51531
51532
51533
51534
51535
51536  # Check that the compiler supports -mX (or -qX on AIX) flags
51537  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566
51567
51568
51569
51570
51571
51572
51573
51574
51575
51576
51577
51578
51579
51580
51581
51582
51583
51584
51585    # Execute function body
51586
51587
51588
51589
51590
51591
51592
51593
51594
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634    # Execute function body
51635
51636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51637$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51638  supports=yes
51639
51640  saved_cflags="$CFLAGS"
51641  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51642  ac_ext=c
51643ac_cpp='$CPP $CPPFLAGS'
51644ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51645ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51646ac_compiler_gnu=$ac_cv_c_compiler_gnu
51647
51648  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51649/* end confdefs.h.  */
51650int i;
51651_ACEOF
51652if ac_fn_c_try_compile "$LINENO"; then :
51653
51654else
51655  supports=no
51656fi
51657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51658  ac_ext=cpp
51659ac_cpp='$CXXCPP $CPPFLAGS'
51660ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51661ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51662ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51663
51664  CFLAGS="$saved_cflags"
51665
51666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51667$as_echo "$supports" >&6; }
51668  if test "x$supports" = "xyes" ; then
51669    :
51670    C_COMP_SUPPORTS="yes"
51671  else
51672    :
51673    C_COMP_SUPPORTS="no"
51674  fi
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734    # Execute function body
51735
51736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51737$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51738  supports=yes
51739
51740  saved_cxxflags="$CXXFLAGS"
51741  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51742  ac_ext=cpp
51743ac_cpp='$CXXCPP $CPPFLAGS'
51744ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51745ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51746ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51747
51748  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51749/* end confdefs.h.  */
51750int i;
51751_ACEOF
51752if ac_fn_cxx_try_compile "$LINENO"; then :
51753
51754else
51755  supports=no
51756fi
51757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51758  ac_ext=cpp
51759ac_cpp='$CXXCPP $CPPFLAGS'
51760ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51761ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51762ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51763
51764  CXXFLAGS="$saved_cxxflags"
51765
51766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51767$as_echo "$supports" >&6; }
51768  if test "x$supports" = "xyes" ; then
51769    :
51770    CXX_COMP_SUPPORTS="yes"
51771  else
51772    :
51773    CXX_COMP_SUPPORTS="no"
51774  fi
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51789$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51790  supports=no
51791  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51792
51793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51794$as_echo "$supports" >&6; }
51795  if test "x$supports" = "xyes" ; then
51796    :
51797    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51798  else
51799    :
51800    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51801  fi
51802
51803
51804
51805
51806
51807
51808
51809
51810  # Check whether --enable-warnings-as-errors was given.
51811if test "${enable_warnings_as_errors+set}" = set; then :
51812  enableval=$enable_warnings_as_errors;
51813fi
51814
51815
51816  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51817$as_echo_n "checking if native warnings are errors... " >&6; }
51818  if test "x$enable_warnings_as_errors" = "xyes"; then
51819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
51820$as_echo "yes (explicitly set)" >&6; }
51821    WARNINGS_AS_ERRORS=true
51822  elif test "x$enable_warnings_as_errors" = "xno"; then
51823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51824$as_echo "no" >&6; }
51825    WARNINGS_AS_ERRORS=false
51826  elif test "x$enable_warnings_as_errors" = "x"; then
51827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51828$as_echo "yes (default)" >&6; }
51829    WARNINGS_AS_ERRORS=true
51830  else
51831    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51832  fi
51833
51834  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51835    # Set legacy hotspot variable
51836    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51837  else
51838    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51839  fi
51840
51841
51842
51843
51844  case "${TOOLCHAIN_TYPE}" in
51845    microsoft)
51846      DISABLE_WARNING_PREFIX="-wd"
51847      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51848      ;;
51849    solstudio)
51850      DISABLE_WARNING_PREFIX="-erroff="
51851      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51852      ;;
51853    gcc)
51854      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51855
51856
51857
51858
51859
51860
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902    # Execute function body
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951    # Execute function body
51952
51953  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51954$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51955  supports=yes
51956
51957  saved_cflags="$CFLAGS"
51958  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51959  ac_ext=c
51960ac_cpp='$CPP $CPPFLAGS'
51961ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51962ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51963ac_compiler_gnu=$ac_cv_c_compiler_gnu
51964
51965  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51966/* end confdefs.h.  */
51967int i;
51968_ACEOF
51969if ac_fn_c_try_compile "$LINENO"; then :
51970
51971else
51972  supports=no
51973fi
51974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51975  ac_ext=cpp
51976ac_cpp='$CXXCPP $CPPFLAGS'
51977ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51978ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51979ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51980
51981  CFLAGS="$saved_cflags"
51982
51983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51984$as_echo "$supports" >&6; }
51985  if test "x$supports" = "xyes" ; then
51986    :
51987    C_COMP_SUPPORTS="yes"
51988  else
51989    :
51990    C_COMP_SUPPORTS="no"
51991  fi
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051    # Execute function body
52052
52053  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52054$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52055  supports=yes
52056
52057  saved_cxxflags="$CXXFLAGS"
52058  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52059  ac_ext=cpp
52060ac_cpp='$CXXCPP $CPPFLAGS'
52061ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52062ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52063ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52064
52065  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52066/* end confdefs.h.  */
52067int i;
52068_ACEOF
52069if ac_fn_cxx_try_compile "$LINENO"; then :
52070
52071else
52072  supports=no
52073fi
52074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52075  ac_ext=cpp
52076ac_cpp='$CXXCPP $CPPFLAGS'
52077ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52078ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52079ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52080
52081  CXXFLAGS="$saved_cxxflags"
52082
52083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52084$as_echo "$supports" >&6; }
52085  if test "x$supports" = "xyes" ; then
52086    :
52087    CXX_COMP_SUPPORTS="yes"
52088  else
52089    :
52090    CXX_COMP_SUPPORTS="no"
52091  fi
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52106$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52107  supports=no
52108  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52109
52110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52111$as_echo "$supports" >&6; }
52112  if test "x$supports" = "xyes" ; then
52113    :
52114    GCC_CAN_DISABLE_WARNINGS=true
52115  else
52116    :
52117    GCC_CAN_DISABLE_WARNINGS=false
52118
52119  fi
52120
52121
52122
52123
52124
52125
52126      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52127        DISABLE_WARNING_PREFIX="-Wno-"
52128      else
52129        DISABLE_WARNING_PREFIX=
52130      fi
52131      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52132      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52133      # CFLAGS since any target specific flags will likely not work with the
52134      # build compiler
52135      CC_OLD="$CC"
52136      CXX_OLD="$CXX"
52137      CC="$BUILD_CC"
52138      CXX="$BUILD_CXX"
52139      CFLAGS_OLD="$CFLAGS"
52140      CFLAGS=""
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188    # Execute function body
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237    # Execute function body
52238
52239  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52240$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52241  supports=yes
52242
52243  saved_cflags="$CFLAGS"
52244  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52245  ac_ext=c
52246ac_cpp='$CPP $CPPFLAGS'
52247ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52248ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52249ac_compiler_gnu=$ac_cv_c_compiler_gnu
52250
52251  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52252/* end confdefs.h.  */
52253int i;
52254_ACEOF
52255if ac_fn_c_try_compile "$LINENO"; then :
52256
52257else
52258  supports=no
52259fi
52260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52261  ac_ext=cpp
52262ac_cpp='$CXXCPP $CPPFLAGS'
52263ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52264ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52265ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52266
52267  CFLAGS="$saved_cflags"
52268
52269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52270$as_echo "$supports" >&6; }
52271  if test "x$supports" = "xyes" ; then
52272    :
52273    C_COMP_SUPPORTS="yes"
52274  else
52275    :
52276    C_COMP_SUPPORTS="no"
52277  fi
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337    # Execute function body
52338
52339  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52340$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52341  supports=yes
52342
52343  saved_cxxflags="$CXXFLAGS"
52344  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52345  ac_ext=cpp
52346ac_cpp='$CXXCPP $CPPFLAGS'
52347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52350
52351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52352/* end confdefs.h.  */
52353int i;
52354_ACEOF
52355if ac_fn_cxx_try_compile "$LINENO"; then :
52356
52357else
52358  supports=no
52359fi
52360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52361  ac_ext=cpp
52362ac_cpp='$CXXCPP $CPPFLAGS'
52363ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52364ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52365ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52366
52367  CXXFLAGS="$saved_cxxflags"
52368
52369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52370$as_echo "$supports" >&6; }
52371  if test "x$supports" = "xyes" ; then
52372    :
52373    CXX_COMP_SUPPORTS="yes"
52374  else
52375    :
52376    CXX_COMP_SUPPORTS="no"
52377  fi
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52392$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52393  supports=no
52394  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52395
52396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52397$as_echo "$supports" >&6; }
52398  if test "x$supports" = "xyes" ; then
52399    :
52400    BUILD_CC_CAN_DISABLE_WARNINGS=true
52401  else
52402    :
52403    BUILD_CC_CAN_DISABLE_WARNINGS=false
52404
52405  fi
52406
52407
52408
52409
52410
52411
52412      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52413        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52414      else
52415        BUILD_CC_DISABLE_WARNING_PREFIX=
52416      fi
52417      CC="$CC_OLD"
52418      CXX="$CXX_OLD"
52419      CFLAGS="$CFLAGS_OLD"
52420      ;;
52421    clang)
52422      DISABLE_WARNING_PREFIX="-Wno-"
52423      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52424      ;;
52425    xlc)
52426      DISABLE_WARNING_PREFIX="-qsuppress="
52427      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52428      ;;
52429  esac
52430
52431
52432
52433
52434
52435# Setup debug symbols (need objcopy from the toolchain for that)
52436
52437  #
52438  # NATIVE_DEBUG_SYMBOLS
52439  # This must be done after the toolchain is setup, since we're looking at objcopy.
52440  #
52441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52442$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52443
52444# Check whether --with-native-debug-symbols was given.
52445if test "${with_native_debug_symbols+set}" = set; then :
52446  withval=$with_native_debug_symbols;
52447        if test "x$OPENJDK_TARGET_OS" = xaix; then
52448          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52449            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52450          fi
52451        fi
52452
52453else
52454
52455        if test "x$OPENJDK_TARGET_OS" = xaix; then
52456          # AIX doesn't support 'zipped' so use 'internal' as default
52457          with_native_debug_symbols="internal"
52458        else
52459          if test "x$STATIC_BUILD" = xtrue; then
52460            with_native_debug_symbols="none"
52461          else
52462            with_native_debug_symbols="zipped"
52463          fi
52464        fi
52465
52466fi
52467
52468  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52470$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52471
52472  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52473
52474    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52475      if test "x$OBJCOPY" = x; then
52476        # enabling of enable-debug-symbols and can't find objcopy
52477        # this is an error
52478        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52479      fi
52480    fi
52481
52482    COMPILE_WITH_DEBUG_SYMBOLS=true
52483    COPY_DEBUG_SYMBOLS=true
52484    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52485  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52486    COMPILE_WITH_DEBUG_SYMBOLS=false
52487    COPY_DEBUG_SYMBOLS=false
52488    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52489  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52490    COMPILE_WITH_DEBUG_SYMBOLS=true
52491    COPY_DEBUG_SYMBOLS=false
52492    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52493  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52494
52495    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52496      if test "x$OBJCOPY" = x; then
52497        # enabling of enable-debug-symbols and can't find objcopy
52498        # this is an error
52499        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52500      fi
52501    fi
52502
52503    COMPILE_WITH_DEBUG_SYMBOLS=true
52504    COPY_DEBUG_SYMBOLS=true
52505    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52506  else
52507    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52508  fi
52509
52510  # --enable-debug-symbols is deprecated.
52511  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52512
52513  # Check whether --enable-debug-symbols was given.
52514if test "${enable_debug_symbols+set}" = set; then :
52515  enableval=$enable_debug_symbols;
52516fi
52517
52518  if test "x$enable_debug_symbols" != x; then
52519    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52520$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52521
52522    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52523      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52524$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52525    fi
52526
52527  fi
52528
52529
52530  # --enable-zip-debug-info is deprecated.
52531  # Please use --with-native-debug-symbols=zipped .
52532
52533  # Check whether --enable-zip-debug-info was given.
52534if test "${enable_zip_debug_info+set}" = set; then :
52535  enableval=$enable_zip_debug_info;
52536fi
52537
52538  if test "x$enable_zip_debug_info" != x; then
52539    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52540$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52541
52542    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52543      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52544$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52545    fi
52546
52547  fi
52548
52549
52550
52551
52552
52553
52554
52555  # Check whether --enable-native-coverage was given.
52556if test "${enable_native_coverage+set}" = set; then :
52557  enableval=$enable_native_coverage;
52558fi
52559
52560  GCOV_ENABLED="false"
52561  if test "x$enable_native_coverage" = "xyes"; then
52562    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52563      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52564$as_echo_n "checking if native coverage is enabled... " >&6; }
52565      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52566$as_echo "yes" >&6; }
52567      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52568      GCOV_LDFLAGS="-fprofile-arcs"
52569      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52570      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52571      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52572      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52573      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52574      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52575      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52576      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52577      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52578      GCOV_ENABLED="true"
52579    else
52580      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52581    fi
52582  elif test "x$enable_native_coverage" = "xno"; then
52583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52584$as_echo_n "checking if native coverage is enabled... " >&6; }
52585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52586$as_echo "no" >&6; }
52587  elif test "x$enable_native_coverage" != "x"; then
52588    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52589  fi
52590
52591
52592
52593
52594# Need toolchain to setup dtrace
52595
52596  # Test for dtrace dependencies
52597  # Check whether --enable-dtrace was given.
52598if test "${enable_dtrace+set}" = set; then :
52599  enableval=$enable_dtrace;
52600fi
52601
52602
52603  DTRACE_DEP_MISSING=false
52604
52605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52606$as_echo_n "checking for dtrace tool... " >&6; }
52607  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52609$as_echo "$DTRACE" >&6; }
52610  else
52611    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52612$as_echo "not found, cannot build dtrace" >&6; }
52613    DTRACE_DEP_MISSING=true
52614  fi
52615
52616  for ac_header in sys/sdt.h
52617do :
52618  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52619if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52620  cat >>confdefs.h <<_ACEOF
52621#define HAVE_SYS_SDT_H 1
52622_ACEOF
52623 DTRACE_HEADERS_OK=yes
52624else
52625  DTRACE_HEADERS_OK=no
52626fi
52627
52628done
52629
52630  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52631    DTRACE_DEP_MISSING=true
52632  fi
52633
52634  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52635$as_echo_n "checking if dtrace should be built... " >&6; }
52636  if test "x$enable_dtrace" = "xyes"; then
52637    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52639$as_echo "no, missing dependencies" >&6; }
52640
52641  # Print a helpful message on how to acquire the necessary build dependency.
52642  # dtrace is the help tag: freetype, cups, alsa etc
52643  MISSING_DEPENDENCY=dtrace
52644
52645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52646    cygwin_help $MISSING_DEPENDENCY
52647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52648    msys_help $MISSING_DEPENDENCY
52649  else
52650    PKGHANDLER_COMMAND=
52651
52652    case $PKGHANDLER in
52653      apt-get)
52654        apt_help     $MISSING_DEPENDENCY ;;
52655      yum)
52656        yum_help     $MISSING_DEPENDENCY ;;
52657      port)
52658        port_help    $MISSING_DEPENDENCY ;;
52659      pkgutil)
52660        pkgutil_help $MISSING_DEPENDENCY ;;
52661      pkgadd)
52662        pkgadd_help  $MISSING_DEPENDENCY ;;
52663    esac
52664
52665    if test "x$PKGHANDLER_COMMAND" != x; then
52666      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52667    fi
52668  fi
52669
52670      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52671    else
52672      INCLUDE_DTRACE=true
52673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52674$as_echo "yes, forced" >&6; }
52675    fi
52676  elif test "x$enable_dtrace" = "xno"; then
52677    INCLUDE_DTRACE=false
52678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52679$as_echo "no, forced" >&6; }
52680  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52681    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52682      INCLUDE_DTRACE=false
52683      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52684$as_echo "no, missing dependencies" >&6; }
52685    else
52686      INCLUDE_DTRACE=true
52687      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52688$as_echo "yes, dependencies present" >&6; }
52689    fi
52690  else
52691    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52692  fi
52693
52694
52695
52696  # The user can in some cases supply additional jvm features. For the custom
52697  # variant, this defines the entire variant.
52698
52699# Check whether --with-jvm-features was given.
52700if test "${with_jvm_features+set}" = set; then :
52701  withval=$with_jvm_features;
52702fi
52703
52704  if test "x$with_jvm_features" != x; then
52705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52706$as_echo_n "checking additional JVM features... " >&6; }
52707    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52709$as_echo "$JVM_FEATURES" >&6; }
52710  fi
52711
52712  # Verify that dependencies are met for explicitly set features.
52713  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52714    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52715  fi
52716
52717  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52718    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52719  fi
52720
52721  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52722    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52723  fi
52724
52725  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52726    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52727  fi
52728
52729  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52730    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52731  fi
52732
52733  # Turn on additional features based on other parts of configure
52734  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52735    JVM_FEATURES="$JVM_FEATURES dtrace"
52736  else
52737    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52738      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52739    fi
52740  fi
52741
52742  if test "x$STATIC_BUILD" = "xtrue"; then
52743    JVM_FEATURES="$JVM_FEATURES static-build"
52744  else
52745    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52746      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52747    fi
52748  fi
52749
52750  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52751    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52752      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52753    fi
52754  fi
52755
52756  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52757    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52758      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52759    fi
52760  fi
52761
52762  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52763  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52764      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52765      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52766    JVM_FEATURES_jvmci="jvmci"
52767  else
52768    JVM_FEATURES_jvmci=""
52769  fi
52770
52771  # All variants but minimal (and custom) get these features
52772  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52773
52774  # Enable features depending on variant.
52775  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52776  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52777  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52778  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52779  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52780  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52781  JVM_FEATURES_custom="$JVM_FEATURES"
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791  # Used for verification of Makefiles by check-jvm-feature
52792
52793
52794  # We don't support --with-jvm-interpreter anymore, use zero instead.
52795
52796
52797# Check whether --with-jvm-interpreter was given.
52798if test "${with_jvm_interpreter+set}" = set; then :
52799  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52800$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52801fi
52802
52803
52804
52805
52806  # Check whether --enable-hotspot-gtest was given.
52807if test "${enable_hotspot_gtest+set}" = set; then :
52808  enableval=$enable_hotspot_gtest;
52809fi
52810
52811
52812  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52813    GTEST_DIR_EXISTS="true"
52814  else
52815    GTEST_DIR_EXISTS="false"
52816  fi
52817
52818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52819$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52820  if test "x$enable_hotspot_gtest" = "xyes"; then
52821    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52823$as_echo "yes, forced" >&6; }
52824      BUILD_GTEST="true"
52825    else
52826      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52827    fi
52828  elif test "x$enable_hotspot_gtest" = "xno"; then
52829    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52830$as_echo "no, forced" >&6; }
52831    BUILD_GTEST="false"
52832  elif test "x$enable_hotspot_gtest" = "x"; then
52833    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52834      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52835$as_echo "yes" >&6; }
52836      BUILD_GTEST="true"
52837    else
52838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52839$as_echo "no" >&6; }
52840      BUILD_GTEST="false"
52841    fi
52842  else
52843    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52844  fi
52845
52846
52847
52848
52849###############################################################################
52850#
52851# Check dependencies for external and internal libraries.
52852#
52853###############################################################################
52854
52855# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52856
52857  # When using cygwin or msys, we need a wrapper binary that renames
52858  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52859  # @files and rewrites these too! This wrapper binary is
52860  # called fixpath.
52861  FIXPATH=
52862  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52864$as_echo_n "checking if fixpath can be created... " >&6; }
52865    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52866    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52867    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52868    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52869      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52870      FIXPATH="$FIXPATH_BIN -c"
52871    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52872      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52873      # @ was chosen as separator to minimize risk of other tools messing around with it
52874      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52875          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52876      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52877      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52878    fi
52879    FIXPATH_SRC_W="$FIXPATH_SRC"
52880    FIXPATH_BIN_W="$FIXPATH_BIN"
52881
52882  unix_path="$FIXPATH_SRC_W"
52883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52884    windows_path=`$CYGPATH -m "$unix_path"`
52885    FIXPATH_SRC_W="$windows_path"
52886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52887    windows_path=`cmd //c echo $unix_path`
52888    FIXPATH_SRC_W="$windows_path"
52889  fi
52890
52891
52892  unix_path="$FIXPATH_BIN_W"
52893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52894    windows_path=`$CYGPATH -m "$unix_path"`
52895    FIXPATH_BIN_W="$windows_path"
52896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52897    windows_path=`cmd //c echo $unix_path`
52898    FIXPATH_BIN_W="$windows_path"
52899  fi
52900
52901    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52902    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52903    cd $FIXPATH_DIR
52904    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52905    cd $CURDIR
52906
52907    if test ! -x $FIXPATH_BIN; then
52908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52909$as_echo "no" >&6; }
52910      cat $FIXPATH_DIR/fixpath1.log
52911      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52912    fi
52913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52914$as_echo "yes" >&6; }
52915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52916$as_echo_n "checking if fixpath.exe works... " >&6; }
52917    cd $FIXPATH_DIR
52918    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52919        > $FIXPATH_DIR/fixpath2.log 2>&1
52920    cd $CURDIR
52921    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52922      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52923$as_echo "no" >&6; }
52924      cat $FIXPATH_DIR/fixpath2.log
52925      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52926    fi
52927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52928$as_echo "yes" >&6; }
52929
52930    FIXPATH_DETACH_FLAG="--detach"
52931  fi
52932
52933
52934
52935
52936
52937
52938  # Check if X11 is needed
52939  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52940    # No X11 support on windows or macosx
52941    NEEDS_LIB_X11=false
52942  else
52943    # All other instances need X11, even if building headless only, libawt still
52944    # needs X11 headers.
52945    NEEDS_LIB_X11=true
52946  fi
52947
52948  # Check if cups is needed
52949  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52950    # Windows have a separate print system
52951    NEEDS_LIB_CUPS=false
52952  else
52953    NEEDS_LIB_CUPS=true
52954  fi
52955
52956  # A custom hook may have set this already
52957  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
52958    NEEDS_LIB_FREETYPE=true
52959  fi
52960
52961  # Check if alsa is needed
52962  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52963    NEEDS_LIB_ALSA=true
52964  else
52965    NEEDS_LIB_ALSA=false
52966  fi
52967
52968  # Check if ffi is needed
52969  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52970    NEEDS_LIB_FFI=true
52971  else
52972    NEEDS_LIB_FFI=false
52973  fi
52974
52975
52976  # statically link libstdc++ before C++ ABI is stablized on Linux unless
52977  # dynamic build is configured on command line.
52978
52979# Check whether --with-stdc++lib was given.
52980if test "${with_stdc__lib+set}" = set; then :
52981  withval=$with_stdc__lib;
52982        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52983                && test "x$with_stdc__lib" != xdefault; then
52984          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52985        fi
52986
52987else
52988  with_stdc__lib=default
52989
52990fi
52991
52992
52993  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52994    # Test if stdc++ can be linked statically.
52995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52996$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52997    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
52998    ac_ext=cpp
52999ac_cpp='$CXXCPP $CPPFLAGS'
53000ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53001ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53002ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53003
53004    OLD_LIBS="$LIBS"
53005    LIBS="$STATIC_STDCXX_FLAGS"
53006    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53007/* end confdefs.h.  */
53008
53009int
53010main ()
53011{
53012return 0;
53013  ;
53014  return 0;
53015}
53016_ACEOF
53017if ac_fn_cxx_try_link "$LINENO"; then :
53018  has_static_libstdcxx=yes
53019else
53020  has_static_libstdcxx=no
53021fi
53022rm -f core conftest.err conftest.$ac_objext \
53023    conftest$ac_exeext conftest.$ac_ext
53024    LIBS="$OLD_LIBS"
53025    ac_ext=cpp
53026ac_cpp='$CXXCPP $CPPFLAGS'
53027ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53028ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53029ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53030
53031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53032$as_echo "$has_static_libstdcxx" >&6; }
53033
53034    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53035      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53036    fi
53037
53038    # If dynamic was requested, it's available since it would fail above otherwise.
53039    # If dynamic wasn't requested, go with static unless it isn't available.
53040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53041$as_echo_n "checking how to link with libstdc++... " >&6; }
53042    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53043        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53044      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53045$as_echo "dynamic" >&6; }
53046    else
53047      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53048      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53049      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53050      # just use the same setting as for the TARGET toolchain.
53051      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53053$as_echo "static" >&6; }
53054    fi
53055  fi
53056
53057  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53058  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53059    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53060  fi
53061
53062
53063
53064  # Setup Windows runtime dlls
53065  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53066
53067
53068# Check whether --with-msvcr-dll was given.
53069if test "${with_msvcr_dll+set}" = set; then :
53070  withval=$with_msvcr_dll;
53071fi
53072
53073
53074  if test "x$with_msvcr_dll" != x; then
53075    # If given explicitly by user, do not probe. If not present, fail directly.
53076
53077  DLL_NAME="$MSVCR_NAME"
53078  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53079  METHOD="--with-msvcr-dll"
53080  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53081    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53082$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53083
53084    # Need to check if the found msvcr is correct architecture
53085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53086$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53087    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53089      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53090      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53091      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53092        CORRECT_MSVCR_ARCH="PE32 executable"
53093      else
53094        CORRECT_MSVCR_ARCH="PE32+ executable"
53095      fi
53096    else
53097      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53098        CORRECT_MSVCR_ARCH=386
53099      else
53100        CORRECT_MSVCR_ARCH=x86-64
53101      fi
53102    fi
53103    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53105$as_echo "ok" >&6; }
53106      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53107
53108  # Only process if variable expands to non-empty
53109
53110  if test "x$MSVC_DLL" != x; then
53111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53112
53113  # Input might be given as Windows format, start by converting to
53114  # unix format.
53115  path="$MSVC_DLL"
53116  new_path=`$CYGPATH -u "$path"`
53117
53118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53121  # "foo.exe" is OK but "foo" is an error.
53122  #
53123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53124  # It is also a way to make sure we got the proper file name for the real test later on.
53125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53126  if test "x$test_shortpath" = x; then
53127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53128$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53129    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53130  fi
53131
53132  # Call helper function which possibly converts this using DOS-style short mode.
53133  # If so, the updated path is stored in $new_path.
53134
53135  input_path="$new_path"
53136  # Check if we need to convert this using DOS-style short mode. If the path
53137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53138  # take no chances and rewrite it.
53139  # Note: m4 eats our [], so we need to use [ and ] instead.
53140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53141  if test "x$has_forbidden_chars" != x; then
53142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53146      # Going to short mode and back again did indeed matter. Since short mode is
53147      # case insensitive, let's make it lowercase to improve readability.
53148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53149      # Now convert it back to Unix-style (cygpath)
53150      input_path=`$CYGPATH -u "$shortmode_path"`
53151      new_path="$input_path"
53152    fi
53153  fi
53154
53155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53156  if test "x$test_cygdrive_prefix" = x; then
53157    # As a simple fix, exclude /usr/bin since it's not a real path.
53158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53160      # a path prefixed by /cygdrive for fixpath to work.
53161      new_path="$CYGWIN_ROOT_PATH$input_path"
53162    fi
53163  fi
53164
53165
53166  if test "x$path" != "x$new_path"; then
53167    MSVC_DLL="$new_path"
53168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53169$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53170  fi
53171
53172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53173
53174  path="$MSVC_DLL"
53175  has_colon=`$ECHO $path | $GREP ^.:`
53176  new_path="$path"
53177  if test "x$has_colon" = x; then
53178    # Not in mixed or Windows style, start by that.
53179    new_path=`cmd //c echo $path`
53180  fi
53181
53182
53183  input_path="$new_path"
53184  # Check if we need to convert this using DOS-style short mode. If the path
53185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53186  # take no chances and rewrite it.
53187  # Note: m4 eats our [], so we need to use [ and ] instead.
53188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53189  if test "x$has_forbidden_chars" != x; then
53190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53192  fi
53193
53194
53195  windows_path="$new_path"
53196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53197    unix_path=`$CYGPATH -u "$windows_path"`
53198    new_path="$unix_path"
53199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53201    new_path="$unix_path"
53202  fi
53203
53204  if test "x$path" != "x$new_path"; then
53205    MSVC_DLL="$new_path"
53206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53207$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53208  fi
53209
53210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53212
53213    else
53214      # We're on a unix platform. Hooray! :)
53215      path="$MSVC_DLL"
53216      has_space=`$ECHO "$path" | $GREP " "`
53217      if test "x$has_space" != x; then
53218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53219$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53220        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53221      fi
53222
53223      # Use eval to expand a potential ~
53224      eval path="$path"
53225      if test ! -f "$path" && test ! -d "$path"; then
53226        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53227      fi
53228
53229      if test -d "$path"; then
53230        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53231      else
53232        dir="`$DIRNAME "$path"`"
53233        base="`$BASENAME "$path"`"
53234        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53235      fi
53236    fi
53237  fi
53238
53239      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53240$as_echo_n "checking for $DLL_NAME... " >&6; }
53241      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53242$as_echo "$MSVC_DLL" >&6; }
53243    else
53244      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53245$as_echo "incorrect, ignoring" >&6; }
53246      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53247$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53248    fi
53249  fi
53250
53251    if test "x$MSVC_DLL" = x; then
53252      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53253    fi
53254    MSVCR_DLL="$MSVC_DLL"
53255  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53256
53257  DLL_NAME="$MSVCR_NAME"
53258  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53259  METHOD="devkit"
53260  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53261    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53262$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53263
53264    # Need to check if the found msvcr is correct architecture
53265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53266$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53267    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53268    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53269      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53270      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53271      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53272        CORRECT_MSVCR_ARCH="PE32 executable"
53273      else
53274        CORRECT_MSVCR_ARCH="PE32+ executable"
53275      fi
53276    else
53277      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53278        CORRECT_MSVCR_ARCH=386
53279      else
53280        CORRECT_MSVCR_ARCH=x86-64
53281      fi
53282    fi
53283    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53284      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53285$as_echo "ok" >&6; }
53286      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53287
53288  # Only process if variable expands to non-empty
53289
53290  if test "x$MSVC_DLL" != x; then
53291    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53292
53293  # Input might be given as Windows format, start by converting to
53294  # unix format.
53295  path="$MSVC_DLL"
53296  new_path=`$CYGPATH -u "$path"`
53297
53298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53301  # "foo.exe" is OK but "foo" is an error.
53302  #
53303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53304  # It is also a way to make sure we got the proper file name for the real test later on.
53305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53306  if test "x$test_shortpath" = x; then
53307    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53308$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53309    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53310  fi
53311
53312  # Call helper function which possibly converts this using DOS-style short mode.
53313  # If so, the updated path is stored in $new_path.
53314
53315  input_path="$new_path"
53316  # Check if we need to convert this using DOS-style short mode. If the path
53317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53318  # take no chances and rewrite it.
53319  # Note: m4 eats our [], so we need to use [ and ] instead.
53320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53321  if test "x$has_forbidden_chars" != x; then
53322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53326      # Going to short mode and back again did indeed matter. Since short mode is
53327      # case insensitive, let's make it lowercase to improve readability.
53328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53329      # Now convert it back to Unix-style (cygpath)
53330      input_path=`$CYGPATH -u "$shortmode_path"`
53331      new_path="$input_path"
53332    fi
53333  fi
53334
53335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53336  if test "x$test_cygdrive_prefix" = x; then
53337    # As a simple fix, exclude /usr/bin since it's not a real path.
53338    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53340      # a path prefixed by /cygdrive for fixpath to work.
53341      new_path="$CYGWIN_ROOT_PATH$input_path"
53342    fi
53343  fi
53344
53345
53346  if test "x$path" != "x$new_path"; then
53347    MSVC_DLL="$new_path"
53348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53349$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53350  fi
53351
53352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53353
53354  path="$MSVC_DLL"
53355  has_colon=`$ECHO $path | $GREP ^.:`
53356  new_path="$path"
53357  if test "x$has_colon" = x; then
53358    # Not in mixed or Windows style, start by that.
53359    new_path=`cmd //c echo $path`
53360  fi
53361
53362
53363  input_path="$new_path"
53364  # Check if we need to convert this using DOS-style short mode. If the path
53365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53366  # take no chances and rewrite it.
53367  # Note: m4 eats our [], so we need to use [ and ] instead.
53368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53369  if test "x$has_forbidden_chars" != x; then
53370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53372  fi
53373
53374
53375  windows_path="$new_path"
53376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53377    unix_path=`$CYGPATH -u "$windows_path"`
53378    new_path="$unix_path"
53379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53381    new_path="$unix_path"
53382  fi
53383
53384  if test "x$path" != "x$new_path"; then
53385    MSVC_DLL="$new_path"
53386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53387$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53388  fi
53389
53390  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53391  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53392
53393    else
53394      # We're on a unix platform. Hooray! :)
53395      path="$MSVC_DLL"
53396      has_space=`$ECHO "$path" | $GREP " "`
53397      if test "x$has_space" != x; then
53398        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53399$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53400        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53401      fi
53402
53403      # Use eval to expand a potential ~
53404      eval path="$path"
53405      if test ! -f "$path" && test ! -d "$path"; then
53406        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53407      fi
53408
53409      if test -d "$path"; then
53410        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53411      else
53412        dir="`$DIRNAME "$path"`"
53413        base="`$BASENAME "$path"`"
53414        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53415      fi
53416    fi
53417  fi
53418
53419      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53420$as_echo_n "checking for $DLL_NAME... " >&6; }
53421      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53422$as_echo "$MSVC_DLL" >&6; }
53423    else
53424      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53425$as_echo "incorrect, ignoring" >&6; }
53426      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53427$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53428    fi
53429  fi
53430
53431    if test "x$MSVC_DLL" = x; then
53432      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53433    fi
53434    MSVCR_DLL="$MSVC_DLL"
53435  else
53436
53437  DLL_NAME="${MSVCR_NAME}"
53438  MSVC_DLL=
53439
53440  if test "x$MSVC_DLL" = x; then
53441    # Probe: Using well-known location from Visual Studio 10.0
53442    if test "x$VCINSTALLDIR" != x; then
53443      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53444
53445  windows_path="$CYGWIN_VC_INSTALL_DIR"
53446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53447    unix_path=`$CYGPATH -u "$windows_path"`
53448    CYGWIN_VC_INSTALL_DIR="$unix_path"
53449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53451    CYGWIN_VC_INSTALL_DIR="$unix_path"
53452  fi
53453
53454      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53455        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53456      else
53457        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53458      fi
53459      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53460
53461  DLL_NAME="$DLL_NAME"
53462  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53463  METHOD="well-known location in VCINSTALLDIR"
53464  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53465    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53466$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53467
53468    # Need to check if the found msvcr is correct architecture
53469    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53470$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53471    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53473      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53474      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53475      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53476        CORRECT_MSVCR_ARCH="PE32 executable"
53477      else
53478        CORRECT_MSVCR_ARCH="PE32+ executable"
53479      fi
53480    else
53481      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53482        CORRECT_MSVCR_ARCH=386
53483      else
53484        CORRECT_MSVCR_ARCH=x86-64
53485      fi
53486    fi
53487    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53488      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53489$as_echo "ok" >&6; }
53490      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53491
53492  # Only process if variable expands to non-empty
53493
53494  if test "x$MSVC_DLL" != x; then
53495    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53496
53497  # Input might be given as Windows format, start by converting to
53498  # unix format.
53499  path="$MSVC_DLL"
53500  new_path=`$CYGPATH -u "$path"`
53501
53502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53505  # "foo.exe" is OK but "foo" is an error.
53506  #
53507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53508  # It is also a way to make sure we got the proper file name for the real test later on.
53509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53510  if test "x$test_shortpath" = x; then
53511    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53512$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53513    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53514  fi
53515
53516  # Call helper function which possibly converts this using DOS-style short mode.
53517  # If so, the updated path is stored in $new_path.
53518
53519  input_path="$new_path"
53520  # Check if we need to convert this using DOS-style short mode. If the path
53521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53522  # take no chances and rewrite it.
53523  # Note: m4 eats our [], so we need to use [ and ] instead.
53524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53525  if test "x$has_forbidden_chars" != x; then
53526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53530      # Going to short mode and back again did indeed matter. Since short mode is
53531      # case insensitive, let's make it lowercase to improve readability.
53532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53533      # Now convert it back to Unix-style (cygpath)
53534      input_path=`$CYGPATH -u "$shortmode_path"`
53535      new_path="$input_path"
53536    fi
53537  fi
53538
53539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53540  if test "x$test_cygdrive_prefix" = x; then
53541    # As a simple fix, exclude /usr/bin since it's not a real path.
53542    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53544      # a path prefixed by /cygdrive for fixpath to work.
53545      new_path="$CYGWIN_ROOT_PATH$input_path"
53546    fi
53547  fi
53548
53549
53550  if test "x$path" != "x$new_path"; then
53551    MSVC_DLL="$new_path"
53552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53553$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53554  fi
53555
53556    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53557
53558  path="$MSVC_DLL"
53559  has_colon=`$ECHO $path | $GREP ^.:`
53560  new_path="$path"
53561  if test "x$has_colon" = x; then
53562    # Not in mixed or Windows style, start by that.
53563    new_path=`cmd //c echo $path`
53564  fi
53565
53566
53567  input_path="$new_path"
53568  # Check if we need to convert this using DOS-style short mode. If the path
53569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53570  # take no chances and rewrite it.
53571  # Note: m4 eats our [], so we need to use [ and ] instead.
53572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53573  if test "x$has_forbidden_chars" != x; then
53574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53576  fi
53577
53578
53579  windows_path="$new_path"
53580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53581    unix_path=`$CYGPATH -u "$windows_path"`
53582    new_path="$unix_path"
53583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53585    new_path="$unix_path"
53586  fi
53587
53588  if test "x$path" != "x$new_path"; then
53589    MSVC_DLL="$new_path"
53590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53591$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53592  fi
53593
53594  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53595  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53596
53597    else
53598      # We're on a unix platform. Hooray! :)
53599      path="$MSVC_DLL"
53600      has_space=`$ECHO "$path" | $GREP " "`
53601      if test "x$has_space" != x; then
53602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53603$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53604        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53605      fi
53606
53607      # Use eval to expand a potential ~
53608      eval path="$path"
53609      if test ! -f "$path" && test ! -d "$path"; then
53610        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53611      fi
53612
53613      if test -d "$path"; then
53614        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53615      else
53616        dir="`$DIRNAME "$path"`"
53617        base="`$BASENAME "$path"`"
53618        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53619      fi
53620    fi
53621  fi
53622
53623      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53624$as_echo_n "checking for $DLL_NAME... " >&6; }
53625      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53626$as_echo "$MSVC_DLL" >&6; }
53627    else
53628      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53629$as_echo "incorrect, ignoring" >&6; }
53630      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53631$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53632    fi
53633  fi
53634
53635    fi
53636  fi
53637
53638  if test "x$MSVC_DLL" = x; then
53639    # Probe: Check in the Boot JDK directory.
53640    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53641
53642  DLL_NAME="$DLL_NAME"
53643  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53644  METHOD="well-known location in Boot JDK"
53645  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53646    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53647$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53648
53649    # Need to check if the found msvcr is correct architecture
53650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53651$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53652    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53654      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53655      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53656      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53657        CORRECT_MSVCR_ARCH="PE32 executable"
53658      else
53659        CORRECT_MSVCR_ARCH="PE32+ executable"
53660      fi
53661    else
53662      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53663        CORRECT_MSVCR_ARCH=386
53664      else
53665        CORRECT_MSVCR_ARCH=x86-64
53666      fi
53667    fi
53668    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53670$as_echo "ok" >&6; }
53671      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53672
53673  # Only process if variable expands to non-empty
53674
53675  if test "x$MSVC_DLL" != x; then
53676    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53677
53678  # Input might be given as Windows format, start by converting to
53679  # unix format.
53680  path="$MSVC_DLL"
53681  new_path=`$CYGPATH -u "$path"`
53682
53683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53686  # "foo.exe" is OK but "foo" is an error.
53687  #
53688  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53689  # It is also a way to make sure we got the proper file name for the real test later on.
53690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53691  if test "x$test_shortpath" = x; then
53692    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53693$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53694    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53695  fi
53696
53697  # Call helper function which possibly converts this using DOS-style short mode.
53698  # If so, the updated path is stored in $new_path.
53699
53700  input_path="$new_path"
53701  # Check if we need to convert this using DOS-style short mode. If the path
53702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53703  # take no chances and rewrite it.
53704  # Note: m4 eats our [], so we need to use [ and ] instead.
53705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53706  if test "x$has_forbidden_chars" != x; then
53707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53708    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53709    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53710    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53711      # Going to short mode and back again did indeed matter. Since short mode is
53712      # case insensitive, let's make it lowercase to improve readability.
53713      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53714      # Now convert it back to Unix-style (cygpath)
53715      input_path=`$CYGPATH -u "$shortmode_path"`
53716      new_path="$input_path"
53717    fi
53718  fi
53719
53720  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53721  if test "x$test_cygdrive_prefix" = x; then
53722    # As a simple fix, exclude /usr/bin since it's not a real path.
53723    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53724      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53725      # a path prefixed by /cygdrive for fixpath to work.
53726      new_path="$CYGWIN_ROOT_PATH$input_path"
53727    fi
53728  fi
53729
53730
53731  if test "x$path" != "x$new_path"; then
53732    MSVC_DLL="$new_path"
53733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53734$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53735  fi
53736
53737    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53738
53739  path="$MSVC_DLL"
53740  has_colon=`$ECHO $path | $GREP ^.:`
53741  new_path="$path"
53742  if test "x$has_colon" = x; then
53743    # Not in mixed or Windows style, start by that.
53744    new_path=`cmd //c echo $path`
53745  fi
53746
53747
53748  input_path="$new_path"
53749  # Check if we need to convert this using DOS-style short mode. If the path
53750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53751  # take no chances and rewrite it.
53752  # Note: m4 eats our [], so we need to use [ and ] instead.
53753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53754  if test "x$has_forbidden_chars" != x; then
53755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53757  fi
53758
53759
53760  windows_path="$new_path"
53761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53762    unix_path=`$CYGPATH -u "$windows_path"`
53763    new_path="$unix_path"
53764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53766    new_path="$unix_path"
53767  fi
53768
53769  if test "x$path" != "x$new_path"; then
53770    MSVC_DLL="$new_path"
53771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53772$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53773  fi
53774
53775  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53776  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53777
53778    else
53779      # We're on a unix platform. Hooray! :)
53780      path="$MSVC_DLL"
53781      has_space=`$ECHO "$path" | $GREP " "`
53782      if test "x$has_space" != x; then
53783        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53784$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53785        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53786      fi
53787
53788      # Use eval to expand a potential ~
53789      eval path="$path"
53790      if test ! -f "$path" && test ! -d "$path"; then
53791        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53792      fi
53793
53794      if test -d "$path"; then
53795        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53796      else
53797        dir="`$DIRNAME "$path"`"
53798        base="`$BASENAME "$path"`"
53799        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53800      fi
53801    fi
53802  fi
53803
53804      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53805$as_echo_n "checking for $DLL_NAME... " >&6; }
53806      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53807$as_echo "$MSVC_DLL" >&6; }
53808    else
53809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53810$as_echo "incorrect, ignoring" >&6; }
53811      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53812$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53813    fi
53814  fi
53815
53816  fi
53817
53818  if test "x$MSVC_DLL" = x; then
53819    # Probe: Look in the Windows system32 directory
53820    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53821
53822  windows_path="$CYGWIN_SYSTEMROOT"
53823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53824    unix_path=`$CYGPATH -u "$windows_path"`
53825    CYGWIN_SYSTEMROOT="$unix_path"
53826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53828    CYGWIN_SYSTEMROOT="$unix_path"
53829  fi
53830
53831    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53832
53833  DLL_NAME="$DLL_NAME"
53834  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53835  METHOD="well-known location in SYSTEMROOT"
53836  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53837    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53838$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53839
53840    # Need to check if the found msvcr is correct architecture
53841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53842$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53843    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53844    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53845      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53846      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53847      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53848        CORRECT_MSVCR_ARCH="PE32 executable"
53849      else
53850        CORRECT_MSVCR_ARCH="PE32+ executable"
53851      fi
53852    else
53853      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53854        CORRECT_MSVCR_ARCH=386
53855      else
53856        CORRECT_MSVCR_ARCH=x86-64
53857      fi
53858    fi
53859    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53861$as_echo "ok" >&6; }
53862      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53863
53864  # Only process if variable expands to non-empty
53865
53866  if test "x$MSVC_DLL" != x; then
53867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53868
53869  # Input might be given as Windows format, start by converting to
53870  # unix format.
53871  path="$MSVC_DLL"
53872  new_path=`$CYGPATH -u "$path"`
53873
53874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53877  # "foo.exe" is OK but "foo" is an error.
53878  #
53879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53880  # It is also a way to make sure we got the proper file name for the real test later on.
53881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53882  if test "x$test_shortpath" = x; then
53883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53884$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53885    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53886  fi
53887
53888  # Call helper function which possibly converts this using DOS-style short mode.
53889  # If so, the updated path is stored in $new_path.
53890
53891  input_path="$new_path"
53892  # Check if we need to convert this using DOS-style short mode. If the path
53893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53894  # take no chances and rewrite it.
53895  # Note: m4 eats our [], so we need to use [ and ] instead.
53896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53897  if test "x$has_forbidden_chars" != x; then
53898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53902      # Going to short mode and back again did indeed matter. Since short mode is
53903      # case insensitive, let's make it lowercase to improve readability.
53904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53905      # Now convert it back to Unix-style (cygpath)
53906      input_path=`$CYGPATH -u "$shortmode_path"`
53907      new_path="$input_path"
53908    fi
53909  fi
53910
53911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53912  if test "x$test_cygdrive_prefix" = x; then
53913    # As a simple fix, exclude /usr/bin since it's not a real path.
53914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53916      # a path prefixed by /cygdrive for fixpath to work.
53917      new_path="$CYGWIN_ROOT_PATH$input_path"
53918    fi
53919  fi
53920
53921
53922  if test "x$path" != "x$new_path"; then
53923    MSVC_DLL="$new_path"
53924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53925$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53926  fi
53927
53928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53929
53930  path="$MSVC_DLL"
53931  has_colon=`$ECHO $path | $GREP ^.:`
53932  new_path="$path"
53933  if test "x$has_colon" = x; then
53934    # Not in mixed or Windows style, start by that.
53935    new_path=`cmd //c echo $path`
53936  fi
53937
53938
53939  input_path="$new_path"
53940  # Check if we need to convert this using DOS-style short mode. If the path
53941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53942  # take no chances and rewrite it.
53943  # Note: m4 eats our [], so we need to use [ and ] instead.
53944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53945  if test "x$has_forbidden_chars" != x; then
53946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53948  fi
53949
53950
53951  windows_path="$new_path"
53952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53953    unix_path=`$CYGPATH -u "$windows_path"`
53954    new_path="$unix_path"
53955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53957    new_path="$unix_path"
53958  fi
53959
53960  if test "x$path" != "x$new_path"; then
53961    MSVC_DLL="$new_path"
53962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53963$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53964  fi
53965
53966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53968
53969    else
53970      # We're on a unix platform. Hooray! :)
53971      path="$MSVC_DLL"
53972      has_space=`$ECHO "$path" | $GREP " "`
53973      if test "x$has_space" != x; then
53974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53975$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53976        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53977      fi
53978
53979      # Use eval to expand a potential ~
53980      eval path="$path"
53981      if test ! -f "$path" && test ! -d "$path"; then
53982        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53983      fi
53984
53985      if test -d "$path"; then
53986        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53987      else
53988        dir="`$DIRNAME "$path"`"
53989        base="`$BASENAME "$path"`"
53990        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53991      fi
53992    fi
53993  fi
53994
53995      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53996$as_echo_n "checking for $DLL_NAME... " >&6; }
53997      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53998$as_echo "$MSVC_DLL" >&6; }
53999    else
54000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54001$as_echo "incorrect, ignoring" >&6; }
54002      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54003$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54004    fi
54005  fi
54006
54007  fi
54008
54009  if test "x$MSVC_DLL" = x; then
54010    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54011    if test "x$VS100COMNTOOLS" != x; then
54012      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54013
54014  windows_path="$CYGWIN_VS_TOOLS_DIR"
54015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54016    unix_path=`$CYGPATH -u "$windows_path"`
54017    CYGWIN_VS_TOOLS_DIR="$unix_path"
54018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54020    CYGWIN_VS_TOOLS_DIR="$unix_path"
54021  fi
54022
54023      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54024        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54025	    | $GREP -i /x64/ | $HEAD --lines 1`
54026      else
54027        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54028	    | $GREP -i /x86/ | $HEAD --lines 1`
54029      fi
54030
54031  DLL_NAME="$DLL_NAME"
54032  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54033  METHOD="search of VS100COMNTOOLS"
54034  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54035    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54036$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54037
54038    # Need to check if the found msvcr is correct architecture
54039    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54040$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54041    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54042    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54043      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54044      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54045      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54046        CORRECT_MSVCR_ARCH="PE32 executable"
54047      else
54048        CORRECT_MSVCR_ARCH="PE32+ executable"
54049      fi
54050    else
54051      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54052        CORRECT_MSVCR_ARCH=386
54053      else
54054        CORRECT_MSVCR_ARCH=x86-64
54055      fi
54056    fi
54057    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54058      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54059$as_echo "ok" >&6; }
54060      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54061
54062  # Only process if variable expands to non-empty
54063
54064  if test "x$MSVC_DLL" != x; then
54065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54066
54067  # Input might be given as Windows format, start by converting to
54068  # unix format.
54069  path="$MSVC_DLL"
54070  new_path=`$CYGPATH -u "$path"`
54071
54072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54075  # "foo.exe" is OK but "foo" is an error.
54076  #
54077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54078  # It is also a way to make sure we got the proper file name for the real test later on.
54079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54080  if test "x$test_shortpath" = x; then
54081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54082$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54083    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54084  fi
54085
54086  # Call helper function which possibly converts this using DOS-style short mode.
54087  # If so, the updated path is stored in $new_path.
54088
54089  input_path="$new_path"
54090  # Check if we need to convert this using DOS-style short mode. If the path
54091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54092  # take no chances and rewrite it.
54093  # Note: m4 eats our [], so we need to use [ and ] instead.
54094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54095  if test "x$has_forbidden_chars" != x; then
54096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54100      # Going to short mode and back again did indeed matter. Since short mode is
54101      # case insensitive, let's make it lowercase to improve readability.
54102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54103      # Now convert it back to Unix-style (cygpath)
54104      input_path=`$CYGPATH -u "$shortmode_path"`
54105      new_path="$input_path"
54106    fi
54107  fi
54108
54109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54110  if test "x$test_cygdrive_prefix" = x; then
54111    # As a simple fix, exclude /usr/bin since it's not a real path.
54112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54114      # a path prefixed by /cygdrive for fixpath to work.
54115      new_path="$CYGWIN_ROOT_PATH$input_path"
54116    fi
54117  fi
54118
54119
54120  if test "x$path" != "x$new_path"; then
54121    MSVC_DLL="$new_path"
54122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54123$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54124  fi
54125
54126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54127
54128  path="$MSVC_DLL"
54129  has_colon=`$ECHO $path | $GREP ^.:`
54130  new_path="$path"
54131  if test "x$has_colon" = x; then
54132    # Not in mixed or Windows style, start by that.
54133    new_path=`cmd //c echo $path`
54134  fi
54135
54136
54137  input_path="$new_path"
54138  # Check if we need to convert this using DOS-style short mode. If the path
54139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54140  # take no chances and rewrite it.
54141  # Note: m4 eats our [], so we need to use [ and ] instead.
54142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54143  if test "x$has_forbidden_chars" != x; then
54144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54146  fi
54147
54148
54149  windows_path="$new_path"
54150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54151    unix_path=`$CYGPATH -u "$windows_path"`
54152    new_path="$unix_path"
54153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54155    new_path="$unix_path"
54156  fi
54157
54158  if test "x$path" != "x$new_path"; then
54159    MSVC_DLL="$new_path"
54160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54161$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54162  fi
54163
54164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54166
54167    else
54168      # We're on a unix platform. Hooray! :)
54169      path="$MSVC_DLL"
54170      has_space=`$ECHO "$path" | $GREP " "`
54171      if test "x$has_space" != x; then
54172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54173$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54174        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54175      fi
54176
54177      # Use eval to expand a potential ~
54178      eval path="$path"
54179      if test ! -f "$path" && test ! -d "$path"; then
54180        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54181      fi
54182
54183      if test -d "$path"; then
54184        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54185      else
54186        dir="`$DIRNAME "$path"`"
54187        base="`$BASENAME "$path"`"
54188        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54189      fi
54190    fi
54191  fi
54192
54193      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54194$as_echo_n "checking for $DLL_NAME... " >&6; }
54195      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54196$as_echo "$MSVC_DLL" >&6; }
54197    else
54198      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54199$as_echo "incorrect, ignoring" >&6; }
54200      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54201$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54202    fi
54203  fi
54204
54205    fi
54206  fi
54207
54208  if test "x$MSVC_DLL" = x; then
54209    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54210    # (This was the original behaviour; kept since it might turn something up)
54211    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54212      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54213        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54214	    | $GREP x64 | $HEAD --lines 1`
54215      else
54216        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54217	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54218        if test "x$POSSIBLE_MSVC_DLL" = x; then
54219          # We're grasping at straws now...
54220          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54221	      | $HEAD --lines 1`
54222        fi
54223      fi
54224
54225
54226  DLL_NAME="$DLL_NAME"
54227  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54228  METHOD="search of VCINSTALLDIR"
54229  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54230    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54231$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54232
54233    # Need to check if the found msvcr is correct architecture
54234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54235$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54236    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54238      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54239      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54240      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54241        CORRECT_MSVCR_ARCH="PE32 executable"
54242      else
54243        CORRECT_MSVCR_ARCH="PE32+ executable"
54244      fi
54245    else
54246      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54247        CORRECT_MSVCR_ARCH=386
54248      else
54249        CORRECT_MSVCR_ARCH=x86-64
54250      fi
54251    fi
54252    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54253      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54254$as_echo "ok" >&6; }
54255      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54256
54257  # Only process if variable expands to non-empty
54258
54259  if test "x$MSVC_DLL" != x; then
54260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54261
54262  # Input might be given as Windows format, start by converting to
54263  # unix format.
54264  path="$MSVC_DLL"
54265  new_path=`$CYGPATH -u "$path"`
54266
54267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54270  # "foo.exe" is OK but "foo" is an error.
54271  #
54272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54273  # It is also a way to make sure we got the proper file name for the real test later on.
54274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54275  if test "x$test_shortpath" = x; then
54276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54277$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54278    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54279  fi
54280
54281  # Call helper function which possibly converts this using DOS-style short mode.
54282  # If so, the updated path is stored in $new_path.
54283
54284  input_path="$new_path"
54285  # Check if we need to convert this using DOS-style short mode. If the path
54286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54287  # take no chances and rewrite it.
54288  # Note: m4 eats our [], so we need to use [ and ] instead.
54289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54290  if test "x$has_forbidden_chars" != x; then
54291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54295      # Going to short mode and back again did indeed matter. Since short mode is
54296      # case insensitive, let's make it lowercase to improve readability.
54297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54298      # Now convert it back to Unix-style (cygpath)
54299      input_path=`$CYGPATH -u "$shortmode_path"`
54300      new_path="$input_path"
54301    fi
54302  fi
54303
54304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54305  if test "x$test_cygdrive_prefix" = x; then
54306    # As a simple fix, exclude /usr/bin since it's not a real path.
54307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54309      # a path prefixed by /cygdrive for fixpath to work.
54310      new_path="$CYGWIN_ROOT_PATH$input_path"
54311    fi
54312  fi
54313
54314
54315  if test "x$path" != "x$new_path"; then
54316    MSVC_DLL="$new_path"
54317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54318$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54319  fi
54320
54321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54322
54323  path="$MSVC_DLL"
54324  has_colon=`$ECHO $path | $GREP ^.:`
54325  new_path="$path"
54326  if test "x$has_colon" = x; then
54327    # Not in mixed or Windows style, start by that.
54328    new_path=`cmd //c echo $path`
54329  fi
54330
54331
54332  input_path="$new_path"
54333  # Check if we need to convert this using DOS-style short mode. If the path
54334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54335  # take no chances and rewrite it.
54336  # Note: m4 eats our [], so we need to use [ and ] instead.
54337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54338  if test "x$has_forbidden_chars" != x; then
54339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54341  fi
54342
54343
54344  windows_path="$new_path"
54345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54346    unix_path=`$CYGPATH -u "$windows_path"`
54347    new_path="$unix_path"
54348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54350    new_path="$unix_path"
54351  fi
54352
54353  if test "x$path" != "x$new_path"; then
54354    MSVC_DLL="$new_path"
54355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54356$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54357  fi
54358
54359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54361
54362    else
54363      # We're on a unix platform. Hooray! :)
54364      path="$MSVC_DLL"
54365      has_space=`$ECHO "$path" | $GREP " "`
54366      if test "x$has_space" != x; then
54367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54368$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54370      fi
54371
54372      # Use eval to expand a potential ~
54373      eval path="$path"
54374      if test ! -f "$path" && test ! -d "$path"; then
54375        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54376      fi
54377
54378      if test -d "$path"; then
54379        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54380      else
54381        dir="`$DIRNAME "$path"`"
54382        base="`$BASENAME "$path"`"
54383        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54384      fi
54385    fi
54386  fi
54387
54388      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54389$as_echo_n "checking for $DLL_NAME... " >&6; }
54390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54391$as_echo "$MSVC_DLL" >&6; }
54392    else
54393      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54394$as_echo "incorrect, ignoring" >&6; }
54395      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54396$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54397    fi
54398  fi
54399
54400    fi
54401  fi
54402
54403  if test "x$MSVC_DLL" = x; then
54404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54405$as_echo_n "checking for $DLL_NAME... " >&6; }
54406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54407$as_echo "no" >&6; }
54408    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54409  fi
54410
54411    MSVCR_DLL="$MSVC_DLL"
54412  fi
54413
54414
54415
54416# Check whether --with-msvcp-dll was given.
54417if test "${with_msvcp_dll+set}" = set; then :
54418  withval=$with_msvcp_dll;
54419fi
54420
54421
54422  if test "x$MSVCP_NAME" != "x"; then
54423    if test "x$with_msvcp_dll" != x; then
54424      # If given explicitly by user, do not probe. If not present, fail directly.
54425
54426  DLL_NAME="$MSVCP_NAME"
54427  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54428  METHOD="--with-msvcp-dll"
54429  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54430    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54431$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54432
54433    # Need to check if the found msvcr is correct architecture
54434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54435$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54436    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54438      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54439      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54440      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54441        CORRECT_MSVCR_ARCH="PE32 executable"
54442      else
54443        CORRECT_MSVCR_ARCH="PE32+ executable"
54444      fi
54445    else
54446      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54447        CORRECT_MSVCR_ARCH=386
54448      else
54449        CORRECT_MSVCR_ARCH=x86-64
54450      fi
54451    fi
54452    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54454$as_echo "ok" >&6; }
54455      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54456
54457  # Only process if variable expands to non-empty
54458
54459  if test "x$MSVC_DLL" != x; then
54460    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54461
54462  # Input might be given as Windows format, start by converting to
54463  # unix format.
54464  path="$MSVC_DLL"
54465  new_path=`$CYGPATH -u "$path"`
54466
54467  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54468  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54469  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54470  # "foo.exe" is OK but "foo" is an error.
54471  #
54472  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54473  # It is also a way to make sure we got the proper file name for the real test later on.
54474  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54475  if test "x$test_shortpath" = x; then
54476    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54477$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54478    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54479  fi
54480
54481  # Call helper function which possibly converts this using DOS-style short mode.
54482  # If so, the updated path is stored in $new_path.
54483
54484  input_path="$new_path"
54485  # Check if we need to convert this using DOS-style short mode. If the path
54486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54487  # take no chances and rewrite it.
54488  # Note: m4 eats our [], so we need to use [ and ] instead.
54489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54490  if test "x$has_forbidden_chars" != x; then
54491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54495      # Going to short mode and back again did indeed matter. Since short mode is
54496      # case insensitive, let's make it lowercase to improve readability.
54497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54498      # Now convert it back to Unix-style (cygpath)
54499      input_path=`$CYGPATH -u "$shortmode_path"`
54500      new_path="$input_path"
54501    fi
54502  fi
54503
54504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54505  if test "x$test_cygdrive_prefix" = x; then
54506    # As a simple fix, exclude /usr/bin since it's not a real path.
54507    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54509      # a path prefixed by /cygdrive for fixpath to work.
54510      new_path="$CYGWIN_ROOT_PATH$input_path"
54511    fi
54512  fi
54513
54514
54515  if test "x$path" != "x$new_path"; then
54516    MSVC_DLL="$new_path"
54517    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54518$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54519  fi
54520
54521    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54522
54523  path="$MSVC_DLL"
54524  has_colon=`$ECHO $path | $GREP ^.:`
54525  new_path="$path"
54526  if test "x$has_colon" = x; then
54527    # Not in mixed or Windows style, start by that.
54528    new_path=`cmd //c echo $path`
54529  fi
54530
54531
54532  input_path="$new_path"
54533  # Check if we need to convert this using DOS-style short mode. If the path
54534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54535  # take no chances and rewrite it.
54536  # Note: m4 eats our [], so we need to use [ and ] instead.
54537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54538  if test "x$has_forbidden_chars" != x; then
54539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54541  fi
54542
54543
54544  windows_path="$new_path"
54545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54546    unix_path=`$CYGPATH -u "$windows_path"`
54547    new_path="$unix_path"
54548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54550    new_path="$unix_path"
54551  fi
54552
54553  if test "x$path" != "x$new_path"; then
54554    MSVC_DLL="$new_path"
54555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54556$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54557  fi
54558
54559  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54560  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54561
54562    else
54563      # We're on a unix platform. Hooray! :)
54564      path="$MSVC_DLL"
54565      has_space=`$ECHO "$path" | $GREP " "`
54566      if test "x$has_space" != x; then
54567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54568$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54569        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54570      fi
54571
54572      # Use eval to expand a potential ~
54573      eval path="$path"
54574      if test ! -f "$path" && test ! -d "$path"; then
54575        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54576      fi
54577
54578      if test -d "$path"; then
54579        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54580      else
54581        dir="`$DIRNAME "$path"`"
54582        base="`$BASENAME "$path"`"
54583        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54584      fi
54585    fi
54586  fi
54587
54588      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54589$as_echo_n "checking for $DLL_NAME... " >&6; }
54590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54591$as_echo "$MSVC_DLL" >&6; }
54592    else
54593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54594$as_echo "incorrect, ignoring" >&6; }
54595      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54596$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54597    fi
54598  fi
54599
54600      if test "x$MSVC_DLL" = x; then
54601        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54602      fi
54603      MSVCP_DLL="$MSVC_DLL"
54604    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54605
54606  DLL_NAME="$MSVCP_NAME"
54607  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54608  METHOD="devkit"
54609  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54610    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54611$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54612
54613    # Need to check if the found msvcr is correct architecture
54614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54615$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54616    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54618      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54619      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54620      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54621        CORRECT_MSVCR_ARCH="PE32 executable"
54622      else
54623        CORRECT_MSVCR_ARCH="PE32+ executable"
54624      fi
54625    else
54626      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54627        CORRECT_MSVCR_ARCH=386
54628      else
54629        CORRECT_MSVCR_ARCH=x86-64
54630      fi
54631    fi
54632    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54634$as_echo "ok" >&6; }
54635      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54636
54637  # Only process if variable expands to non-empty
54638
54639  if test "x$MSVC_DLL" != x; then
54640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54641
54642  # Input might be given as Windows format, start by converting to
54643  # unix format.
54644  path="$MSVC_DLL"
54645  new_path=`$CYGPATH -u "$path"`
54646
54647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54650  # "foo.exe" is OK but "foo" is an error.
54651  #
54652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54653  # It is also a way to make sure we got the proper file name for the real test later on.
54654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54655  if test "x$test_shortpath" = x; then
54656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54657$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54658    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54659  fi
54660
54661  # Call helper function which possibly converts this using DOS-style short mode.
54662  # If so, the updated path is stored in $new_path.
54663
54664  input_path="$new_path"
54665  # Check if we need to convert this using DOS-style short mode. If the path
54666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54667  # take no chances and rewrite it.
54668  # Note: m4 eats our [], so we need to use [ and ] instead.
54669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54670  if test "x$has_forbidden_chars" != x; then
54671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54675      # Going to short mode and back again did indeed matter. Since short mode is
54676      # case insensitive, let's make it lowercase to improve readability.
54677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54678      # Now convert it back to Unix-style (cygpath)
54679      input_path=`$CYGPATH -u "$shortmode_path"`
54680      new_path="$input_path"
54681    fi
54682  fi
54683
54684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54685  if test "x$test_cygdrive_prefix" = x; then
54686    # As a simple fix, exclude /usr/bin since it's not a real path.
54687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54689      # a path prefixed by /cygdrive for fixpath to work.
54690      new_path="$CYGWIN_ROOT_PATH$input_path"
54691    fi
54692  fi
54693
54694
54695  if test "x$path" != "x$new_path"; then
54696    MSVC_DLL="$new_path"
54697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54698$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54699  fi
54700
54701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54702
54703  path="$MSVC_DLL"
54704  has_colon=`$ECHO $path | $GREP ^.:`
54705  new_path="$path"
54706  if test "x$has_colon" = x; then
54707    # Not in mixed or Windows style, start by that.
54708    new_path=`cmd //c echo $path`
54709  fi
54710
54711
54712  input_path="$new_path"
54713  # Check if we need to convert this using DOS-style short mode. If the path
54714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54715  # take no chances and rewrite it.
54716  # Note: m4 eats our [], so we need to use [ and ] instead.
54717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54718  if test "x$has_forbidden_chars" != x; then
54719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54721  fi
54722
54723
54724  windows_path="$new_path"
54725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54726    unix_path=`$CYGPATH -u "$windows_path"`
54727    new_path="$unix_path"
54728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54730    new_path="$unix_path"
54731  fi
54732
54733  if test "x$path" != "x$new_path"; then
54734    MSVC_DLL="$new_path"
54735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54736$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54737  fi
54738
54739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54741
54742    else
54743      # We're on a unix platform. Hooray! :)
54744      path="$MSVC_DLL"
54745      has_space=`$ECHO "$path" | $GREP " "`
54746      if test "x$has_space" != x; then
54747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54748$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54750      fi
54751
54752      # Use eval to expand a potential ~
54753      eval path="$path"
54754      if test ! -f "$path" && test ! -d "$path"; then
54755        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54756      fi
54757
54758      if test -d "$path"; then
54759        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54760      else
54761        dir="`$DIRNAME "$path"`"
54762        base="`$BASENAME "$path"`"
54763        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54764      fi
54765    fi
54766  fi
54767
54768      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54769$as_echo_n "checking for $DLL_NAME... " >&6; }
54770      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54771$as_echo "$MSVC_DLL" >&6; }
54772    else
54773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54774$as_echo "incorrect, ignoring" >&6; }
54775      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54776$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54777    fi
54778  fi
54779
54780      if test "x$MSVC_DLL" = x; then
54781        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54782      fi
54783      MSVCP_DLL="$MSVC_DLL"
54784    else
54785
54786  DLL_NAME="${MSVCP_NAME}"
54787  MSVC_DLL=
54788
54789  if test "x$MSVC_DLL" = x; then
54790    # Probe: Using well-known location from Visual Studio 10.0
54791    if test "x$VCINSTALLDIR" != x; then
54792      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54793
54794  windows_path="$CYGWIN_VC_INSTALL_DIR"
54795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54796    unix_path=`$CYGPATH -u "$windows_path"`
54797    CYGWIN_VC_INSTALL_DIR="$unix_path"
54798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54800    CYGWIN_VC_INSTALL_DIR="$unix_path"
54801  fi
54802
54803      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54804        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54805      else
54806        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54807      fi
54808      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54809
54810  DLL_NAME="$DLL_NAME"
54811  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54812  METHOD="well-known location in VCINSTALLDIR"
54813  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54814    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54815$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54816
54817    # Need to check if the found msvcr is correct architecture
54818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54819$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54820    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54821    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54822      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54823      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54824      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54825        CORRECT_MSVCR_ARCH="PE32 executable"
54826      else
54827        CORRECT_MSVCR_ARCH="PE32+ executable"
54828      fi
54829    else
54830      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54831        CORRECT_MSVCR_ARCH=386
54832      else
54833        CORRECT_MSVCR_ARCH=x86-64
54834      fi
54835    fi
54836    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54837      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54838$as_echo "ok" >&6; }
54839      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54840
54841  # Only process if variable expands to non-empty
54842
54843  if test "x$MSVC_DLL" != x; then
54844    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54845
54846  # Input might be given as Windows format, start by converting to
54847  # unix format.
54848  path="$MSVC_DLL"
54849  new_path=`$CYGPATH -u "$path"`
54850
54851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54854  # "foo.exe" is OK but "foo" is an error.
54855  #
54856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54857  # It is also a way to make sure we got the proper file name for the real test later on.
54858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54859  if test "x$test_shortpath" = x; then
54860    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54861$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54862    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54863  fi
54864
54865  # Call helper function which possibly converts this using DOS-style short mode.
54866  # If so, the updated path is stored in $new_path.
54867
54868  input_path="$new_path"
54869  # Check if we need to convert this using DOS-style short mode. If the path
54870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54871  # take no chances and rewrite it.
54872  # Note: m4 eats our [], so we need to use [ and ] instead.
54873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54874  if test "x$has_forbidden_chars" != x; then
54875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54879      # Going to short mode and back again did indeed matter. Since short mode is
54880      # case insensitive, let's make it lowercase to improve readability.
54881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54882      # Now convert it back to Unix-style (cygpath)
54883      input_path=`$CYGPATH -u "$shortmode_path"`
54884      new_path="$input_path"
54885    fi
54886  fi
54887
54888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54889  if test "x$test_cygdrive_prefix" = x; then
54890    # As a simple fix, exclude /usr/bin since it's not a real path.
54891    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54893      # a path prefixed by /cygdrive for fixpath to work.
54894      new_path="$CYGWIN_ROOT_PATH$input_path"
54895    fi
54896  fi
54897
54898
54899  if test "x$path" != "x$new_path"; then
54900    MSVC_DLL="$new_path"
54901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54902$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54903  fi
54904
54905    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54906
54907  path="$MSVC_DLL"
54908  has_colon=`$ECHO $path | $GREP ^.:`
54909  new_path="$path"
54910  if test "x$has_colon" = x; then
54911    # Not in mixed or Windows style, start by that.
54912    new_path=`cmd //c echo $path`
54913  fi
54914
54915
54916  input_path="$new_path"
54917  # Check if we need to convert this using DOS-style short mode. If the path
54918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54919  # take no chances and rewrite it.
54920  # Note: m4 eats our [], so we need to use [ and ] instead.
54921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54922  if test "x$has_forbidden_chars" != x; then
54923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54925  fi
54926
54927
54928  windows_path="$new_path"
54929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54930    unix_path=`$CYGPATH -u "$windows_path"`
54931    new_path="$unix_path"
54932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54934    new_path="$unix_path"
54935  fi
54936
54937  if test "x$path" != "x$new_path"; then
54938    MSVC_DLL="$new_path"
54939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54940$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54941  fi
54942
54943  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54944  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54945
54946    else
54947      # We're on a unix platform. Hooray! :)
54948      path="$MSVC_DLL"
54949      has_space=`$ECHO "$path" | $GREP " "`
54950      if test "x$has_space" != x; then
54951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54952$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54953        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54954      fi
54955
54956      # Use eval to expand a potential ~
54957      eval path="$path"
54958      if test ! -f "$path" && test ! -d "$path"; then
54959        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54960      fi
54961
54962      if test -d "$path"; then
54963        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54964      else
54965        dir="`$DIRNAME "$path"`"
54966        base="`$BASENAME "$path"`"
54967        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54968      fi
54969    fi
54970  fi
54971
54972      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54973$as_echo_n "checking for $DLL_NAME... " >&6; }
54974      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54975$as_echo "$MSVC_DLL" >&6; }
54976    else
54977      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54978$as_echo "incorrect, ignoring" >&6; }
54979      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54980$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54981    fi
54982  fi
54983
54984    fi
54985  fi
54986
54987  if test "x$MSVC_DLL" = x; then
54988    # Probe: Check in the Boot JDK directory.
54989    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54990
54991  DLL_NAME="$DLL_NAME"
54992  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54993  METHOD="well-known location in Boot JDK"
54994  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54995    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54996$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54997
54998    # Need to check if the found msvcr is correct architecture
54999    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55000$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55001    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55003      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55004      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55005      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55006        CORRECT_MSVCR_ARCH="PE32 executable"
55007      else
55008        CORRECT_MSVCR_ARCH="PE32+ executable"
55009      fi
55010    else
55011      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55012        CORRECT_MSVCR_ARCH=386
55013      else
55014        CORRECT_MSVCR_ARCH=x86-64
55015      fi
55016    fi
55017    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55018      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55019$as_echo "ok" >&6; }
55020      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55021
55022  # Only process if variable expands to non-empty
55023
55024  if test "x$MSVC_DLL" != x; then
55025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55026
55027  # Input might be given as Windows format, start by converting to
55028  # unix format.
55029  path="$MSVC_DLL"
55030  new_path=`$CYGPATH -u "$path"`
55031
55032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55035  # "foo.exe" is OK but "foo" is an error.
55036  #
55037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55038  # It is also a way to make sure we got the proper file name for the real test later on.
55039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55040  if test "x$test_shortpath" = x; then
55041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55042$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55043    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55044  fi
55045
55046  # Call helper function which possibly converts this using DOS-style short mode.
55047  # If so, the updated path is stored in $new_path.
55048
55049  input_path="$new_path"
55050  # Check if we need to convert this using DOS-style short mode. If the path
55051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55052  # take no chances and rewrite it.
55053  # Note: m4 eats our [], so we need to use [ and ] instead.
55054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55055  if test "x$has_forbidden_chars" != x; then
55056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55060      # Going to short mode and back again did indeed matter. Since short mode is
55061      # case insensitive, let's make it lowercase to improve readability.
55062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55063      # Now convert it back to Unix-style (cygpath)
55064      input_path=`$CYGPATH -u "$shortmode_path"`
55065      new_path="$input_path"
55066    fi
55067  fi
55068
55069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55070  if test "x$test_cygdrive_prefix" = x; then
55071    # As a simple fix, exclude /usr/bin since it's not a real path.
55072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55074      # a path prefixed by /cygdrive for fixpath to work.
55075      new_path="$CYGWIN_ROOT_PATH$input_path"
55076    fi
55077  fi
55078
55079
55080  if test "x$path" != "x$new_path"; then
55081    MSVC_DLL="$new_path"
55082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55083$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55084  fi
55085
55086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55087
55088  path="$MSVC_DLL"
55089  has_colon=`$ECHO $path | $GREP ^.:`
55090  new_path="$path"
55091  if test "x$has_colon" = x; then
55092    # Not in mixed or Windows style, start by that.
55093    new_path=`cmd //c echo $path`
55094  fi
55095
55096
55097  input_path="$new_path"
55098  # Check if we need to convert this using DOS-style short mode. If the path
55099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55100  # take no chances and rewrite it.
55101  # Note: m4 eats our [], so we need to use [ and ] instead.
55102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55103  if test "x$has_forbidden_chars" != x; then
55104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55106  fi
55107
55108
55109  windows_path="$new_path"
55110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55111    unix_path=`$CYGPATH -u "$windows_path"`
55112    new_path="$unix_path"
55113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55115    new_path="$unix_path"
55116  fi
55117
55118  if test "x$path" != "x$new_path"; then
55119    MSVC_DLL="$new_path"
55120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55121$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55122  fi
55123
55124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55126
55127    else
55128      # We're on a unix platform. Hooray! :)
55129      path="$MSVC_DLL"
55130      has_space=`$ECHO "$path" | $GREP " "`
55131      if test "x$has_space" != x; then
55132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55133$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55135      fi
55136
55137      # Use eval to expand a potential ~
55138      eval path="$path"
55139      if test ! -f "$path" && test ! -d "$path"; then
55140        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55141      fi
55142
55143      if test -d "$path"; then
55144        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55145      else
55146        dir="`$DIRNAME "$path"`"
55147        base="`$BASENAME "$path"`"
55148        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55149      fi
55150    fi
55151  fi
55152
55153      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55154$as_echo_n "checking for $DLL_NAME... " >&6; }
55155      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55156$as_echo "$MSVC_DLL" >&6; }
55157    else
55158      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55159$as_echo "incorrect, ignoring" >&6; }
55160      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55161$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55162    fi
55163  fi
55164
55165  fi
55166
55167  if test "x$MSVC_DLL" = x; then
55168    # Probe: Look in the Windows system32 directory
55169    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55170
55171  windows_path="$CYGWIN_SYSTEMROOT"
55172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55173    unix_path=`$CYGPATH -u "$windows_path"`
55174    CYGWIN_SYSTEMROOT="$unix_path"
55175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55177    CYGWIN_SYSTEMROOT="$unix_path"
55178  fi
55179
55180    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55181
55182  DLL_NAME="$DLL_NAME"
55183  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55184  METHOD="well-known location in SYSTEMROOT"
55185  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55186    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55187$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55188
55189    # Need to check if the found msvcr is correct architecture
55190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55191$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55192    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55194      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55195      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55196      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55197        CORRECT_MSVCR_ARCH="PE32 executable"
55198      else
55199        CORRECT_MSVCR_ARCH="PE32+ executable"
55200      fi
55201    else
55202      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55203        CORRECT_MSVCR_ARCH=386
55204      else
55205        CORRECT_MSVCR_ARCH=x86-64
55206      fi
55207    fi
55208    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55210$as_echo "ok" >&6; }
55211      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55212
55213  # Only process if variable expands to non-empty
55214
55215  if test "x$MSVC_DLL" != x; then
55216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55217
55218  # Input might be given as Windows format, start by converting to
55219  # unix format.
55220  path="$MSVC_DLL"
55221  new_path=`$CYGPATH -u "$path"`
55222
55223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55226  # "foo.exe" is OK but "foo" is an error.
55227  #
55228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55229  # It is also a way to make sure we got the proper file name for the real test later on.
55230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55231  if test "x$test_shortpath" = x; then
55232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55233$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55234    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55235  fi
55236
55237  # Call helper function which possibly converts this using DOS-style short mode.
55238  # If so, the updated path is stored in $new_path.
55239
55240  input_path="$new_path"
55241  # Check if we need to convert this using DOS-style short mode. If the path
55242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55243  # take no chances and rewrite it.
55244  # Note: m4 eats our [], so we need to use [ and ] instead.
55245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55246  if test "x$has_forbidden_chars" != x; then
55247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55251      # Going to short mode and back again did indeed matter. Since short mode is
55252      # case insensitive, let's make it lowercase to improve readability.
55253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55254      # Now convert it back to Unix-style (cygpath)
55255      input_path=`$CYGPATH -u "$shortmode_path"`
55256      new_path="$input_path"
55257    fi
55258  fi
55259
55260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55261  if test "x$test_cygdrive_prefix" = x; then
55262    # As a simple fix, exclude /usr/bin since it's not a real path.
55263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55265      # a path prefixed by /cygdrive for fixpath to work.
55266      new_path="$CYGWIN_ROOT_PATH$input_path"
55267    fi
55268  fi
55269
55270
55271  if test "x$path" != "x$new_path"; then
55272    MSVC_DLL="$new_path"
55273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55274$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55275  fi
55276
55277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55278
55279  path="$MSVC_DLL"
55280  has_colon=`$ECHO $path | $GREP ^.:`
55281  new_path="$path"
55282  if test "x$has_colon" = x; then
55283    # Not in mixed or Windows style, start by that.
55284    new_path=`cmd //c echo $path`
55285  fi
55286
55287
55288  input_path="$new_path"
55289  # Check if we need to convert this using DOS-style short mode. If the path
55290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55291  # take no chances and rewrite it.
55292  # Note: m4 eats our [], so we need to use [ and ] instead.
55293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55294  if test "x$has_forbidden_chars" != x; then
55295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55297  fi
55298
55299
55300  windows_path="$new_path"
55301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55302    unix_path=`$CYGPATH -u "$windows_path"`
55303    new_path="$unix_path"
55304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55306    new_path="$unix_path"
55307  fi
55308
55309  if test "x$path" != "x$new_path"; then
55310    MSVC_DLL="$new_path"
55311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55312$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55313  fi
55314
55315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55317
55318    else
55319      # We're on a unix platform. Hooray! :)
55320      path="$MSVC_DLL"
55321      has_space=`$ECHO "$path" | $GREP " "`
55322      if test "x$has_space" != x; then
55323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55324$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55325        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55326      fi
55327
55328      # Use eval to expand a potential ~
55329      eval path="$path"
55330      if test ! -f "$path" && test ! -d "$path"; then
55331        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55332      fi
55333
55334      if test -d "$path"; then
55335        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55336      else
55337        dir="`$DIRNAME "$path"`"
55338        base="`$BASENAME "$path"`"
55339        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55340      fi
55341    fi
55342  fi
55343
55344      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55345$as_echo_n "checking for $DLL_NAME... " >&6; }
55346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55347$as_echo "$MSVC_DLL" >&6; }
55348    else
55349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55350$as_echo "incorrect, ignoring" >&6; }
55351      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55352$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55353    fi
55354  fi
55355
55356  fi
55357
55358  if test "x$MSVC_DLL" = x; then
55359    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55360    if test "x$VS100COMNTOOLS" != x; then
55361      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55362
55363  windows_path="$CYGWIN_VS_TOOLS_DIR"
55364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55365    unix_path=`$CYGPATH -u "$windows_path"`
55366    CYGWIN_VS_TOOLS_DIR="$unix_path"
55367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55369    CYGWIN_VS_TOOLS_DIR="$unix_path"
55370  fi
55371
55372      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55373        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55374	    | $GREP -i /x64/ | $HEAD --lines 1`
55375      else
55376        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55377	    | $GREP -i /x86/ | $HEAD --lines 1`
55378      fi
55379
55380  DLL_NAME="$DLL_NAME"
55381  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55382  METHOD="search of VS100COMNTOOLS"
55383  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55384    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55385$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55386
55387    # Need to check if the found msvcr is correct architecture
55388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55389$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55390    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55392      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55393      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55394      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55395        CORRECT_MSVCR_ARCH="PE32 executable"
55396      else
55397        CORRECT_MSVCR_ARCH="PE32+ executable"
55398      fi
55399    else
55400      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55401        CORRECT_MSVCR_ARCH=386
55402      else
55403        CORRECT_MSVCR_ARCH=x86-64
55404      fi
55405    fi
55406    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55408$as_echo "ok" >&6; }
55409      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55410
55411  # Only process if variable expands to non-empty
55412
55413  if test "x$MSVC_DLL" != x; then
55414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55415
55416  # Input might be given as Windows format, start by converting to
55417  # unix format.
55418  path="$MSVC_DLL"
55419  new_path=`$CYGPATH -u "$path"`
55420
55421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55424  # "foo.exe" is OK but "foo" is an error.
55425  #
55426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55427  # It is also a way to make sure we got the proper file name for the real test later on.
55428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55429  if test "x$test_shortpath" = x; then
55430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55431$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55432    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55433  fi
55434
55435  # Call helper function which possibly converts this using DOS-style short mode.
55436  # If so, the updated path is stored in $new_path.
55437
55438  input_path="$new_path"
55439  # Check if we need to convert this using DOS-style short mode. If the path
55440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55441  # take no chances and rewrite it.
55442  # Note: m4 eats our [], so we need to use [ and ] instead.
55443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55444  if test "x$has_forbidden_chars" != x; then
55445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55449      # Going to short mode and back again did indeed matter. Since short mode is
55450      # case insensitive, let's make it lowercase to improve readability.
55451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55452      # Now convert it back to Unix-style (cygpath)
55453      input_path=`$CYGPATH -u "$shortmode_path"`
55454      new_path="$input_path"
55455    fi
55456  fi
55457
55458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55459  if test "x$test_cygdrive_prefix" = x; then
55460    # As a simple fix, exclude /usr/bin since it's not a real path.
55461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55463      # a path prefixed by /cygdrive for fixpath to work.
55464      new_path="$CYGWIN_ROOT_PATH$input_path"
55465    fi
55466  fi
55467
55468
55469  if test "x$path" != "x$new_path"; then
55470    MSVC_DLL="$new_path"
55471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55472$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55473  fi
55474
55475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55476
55477  path="$MSVC_DLL"
55478  has_colon=`$ECHO $path | $GREP ^.:`
55479  new_path="$path"
55480  if test "x$has_colon" = x; then
55481    # Not in mixed or Windows style, start by that.
55482    new_path=`cmd //c echo $path`
55483  fi
55484
55485
55486  input_path="$new_path"
55487  # Check if we need to convert this using DOS-style short mode. If the path
55488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55489  # take no chances and rewrite it.
55490  # Note: m4 eats our [], so we need to use [ and ] instead.
55491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55492  if test "x$has_forbidden_chars" != x; then
55493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55495  fi
55496
55497
55498  windows_path="$new_path"
55499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55500    unix_path=`$CYGPATH -u "$windows_path"`
55501    new_path="$unix_path"
55502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55504    new_path="$unix_path"
55505  fi
55506
55507  if test "x$path" != "x$new_path"; then
55508    MSVC_DLL="$new_path"
55509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55510$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55511  fi
55512
55513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55515
55516    else
55517      # We're on a unix platform. Hooray! :)
55518      path="$MSVC_DLL"
55519      has_space=`$ECHO "$path" | $GREP " "`
55520      if test "x$has_space" != x; then
55521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55522$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55523        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55524      fi
55525
55526      # Use eval to expand a potential ~
55527      eval path="$path"
55528      if test ! -f "$path" && test ! -d "$path"; then
55529        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55530      fi
55531
55532      if test -d "$path"; then
55533        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55534      else
55535        dir="`$DIRNAME "$path"`"
55536        base="`$BASENAME "$path"`"
55537        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55538      fi
55539    fi
55540  fi
55541
55542      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55543$as_echo_n "checking for $DLL_NAME... " >&6; }
55544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55545$as_echo "$MSVC_DLL" >&6; }
55546    else
55547      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55548$as_echo "incorrect, ignoring" >&6; }
55549      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55550$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55551    fi
55552  fi
55553
55554    fi
55555  fi
55556
55557  if test "x$MSVC_DLL" = x; then
55558    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55559    # (This was the original behaviour; kept since it might turn something up)
55560    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55561      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55562        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55563	    | $GREP x64 | $HEAD --lines 1`
55564      else
55565        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55566	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55567        if test "x$POSSIBLE_MSVC_DLL" = x; then
55568          # We're grasping at straws now...
55569          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55570	      | $HEAD --lines 1`
55571        fi
55572      fi
55573
55574
55575  DLL_NAME="$DLL_NAME"
55576  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55577  METHOD="search of VCINSTALLDIR"
55578  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55579    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55580$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55581
55582    # Need to check if the found msvcr is correct architecture
55583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55584$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55585    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55587      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55588      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55589      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55590        CORRECT_MSVCR_ARCH="PE32 executable"
55591      else
55592        CORRECT_MSVCR_ARCH="PE32+ executable"
55593      fi
55594    else
55595      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55596        CORRECT_MSVCR_ARCH=386
55597      else
55598        CORRECT_MSVCR_ARCH=x86-64
55599      fi
55600    fi
55601    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55602      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55603$as_echo "ok" >&6; }
55604      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55605
55606  # Only process if variable expands to non-empty
55607
55608  if test "x$MSVC_DLL" != x; then
55609    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55610
55611  # Input might be given as Windows format, start by converting to
55612  # unix format.
55613  path="$MSVC_DLL"
55614  new_path=`$CYGPATH -u "$path"`
55615
55616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55619  # "foo.exe" is OK but "foo" is an error.
55620  #
55621  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55622  # It is also a way to make sure we got the proper file name for the real test later on.
55623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55624  if test "x$test_shortpath" = x; then
55625    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55626$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55627    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55628  fi
55629
55630  # Call helper function which possibly converts this using DOS-style short mode.
55631  # If so, the updated path is stored in $new_path.
55632
55633  input_path="$new_path"
55634  # Check if we need to convert this using DOS-style short mode. If the path
55635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55636  # take no chances and rewrite it.
55637  # Note: m4 eats our [], so we need to use [ and ] instead.
55638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55639  if test "x$has_forbidden_chars" != x; then
55640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55644      # Going to short mode and back again did indeed matter. Since short mode is
55645      # case insensitive, let's make it lowercase to improve readability.
55646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55647      # Now convert it back to Unix-style (cygpath)
55648      input_path=`$CYGPATH -u "$shortmode_path"`
55649      new_path="$input_path"
55650    fi
55651  fi
55652
55653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55654  if test "x$test_cygdrive_prefix" = x; then
55655    # As a simple fix, exclude /usr/bin since it's not a real path.
55656    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55658      # a path prefixed by /cygdrive for fixpath to work.
55659      new_path="$CYGWIN_ROOT_PATH$input_path"
55660    fi
55661  fi
55662
55663
55664  if test "x$path" != "x$new_path"; then
55665    MSVC_DLL="$new_path"
55666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55667$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55668  fi
55669
55670    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55671
55672  path="$MSVC_DLL"
55673  has_colon=`$ECHO $path | $GREP ^.:`
55674  new_path="$path"
55675  if test "x$has_colon" = x; then
55676    # Not in mixed or Windows style, start by that.
55677    new_path=`cmd //c echo $path`
55678  fi
55679
55680
55681  input_path="$new_path"
55682  # Check if we need to convert this using DOS-style short mode. If the path
55683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55684  # take no chances and rewrite it.
55685  # Note: m4 eats our [], so we need to use [ and ] instead.
55686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55687  if test "x$has_forbidden_chars" != x; then
55688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55690  fi
55691
55692
55693  windows_path="$new_path"
55694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55695    unix_path=`$CYGPATH -u "$windows_path"`
55696    new_path="$unix_path"
55697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55699    new_path="$unix_path"
55700  fi
55701
55702  if test "x$path" != "x$new_path"; then
55703    MSVC_DLL="$new_path"
55704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55705$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55706  fi
55707
55708  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55709  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55710
55711    else
55712      # We're on a unix platform. Hooray! :)
55713      path="$MSVC_DLL"
55714      has_space=`$ECHO "$path" | $GREP " "`
55715      if test "x$has_space" != x; then
55716        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55717$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55718        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55719      fi
55720
55721      # Use eval to expand a potential ~
55722      eval path="$path"
55723      if test ! -f "$path" && test ! -d "$path"; then
55724        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55725      fi
55726
55727      if test -d "$path"; then
55728        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55729      else
55730        dir="`$DIRNAME "$path"`"
55731        base="`$BASENAME "$path"`"
55732        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55733      fi
55734    fi
55735  fi
55736
55737      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55738$as_echo_n "checking for $DLL_NAME... " >&6; }
55739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55740$as_echo "$MSVC_DLL" >&6; }
55741    else
55742      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55743$as_echo "incorrect, ignoring" >&6; }
55744      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55745$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55746    fi
55747  fi
55748
55749    fi
55750  fi
55751
55752  if test "x$MSVC_DLL" = x; then
55753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55754$as_echo_n "checking for $DLL_NAME... " >&6; }
55755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55756$as_echo "no" >&6; }
55757    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55758  fi
55759
55760      MSVCP_DLL="$MSVC_DLL"
55761    fi
55762
55763  fi
55764
55765  fi
55766
55767
55768  if test "x$NEEDS_LIB_X11" = xfalse; then
55769    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55770      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55771$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55772    fi
55773    X_CFLAGS=
55774    X_LIBS=
55775  else
55776
55777    if test "x${with_x}" = xno; then
55778      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55779    fi
55780
55781    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55782      # The user has specified a X11 base directory. Use it for includes and
55783      # libraries, unless explicitly overridden.
55784      if test "x$x_includes" = xNONE; then
55785        x_includes="${with_x}/include"
55786      fi
55787      if test "x$x_libraries" = xNONE; then
55788        x_libraries="${with_x}/lib"
55789      fi
55790    else
55791      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55792      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55793      # --x-libraries for the sysroot, if that seems to be correct.
55794      if test "x$SYSROOT" != "x"; then
55795        if test "x$x_includes" = xNONE; then
55796          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55797            x_includes="$SYSROOT/usr/X11R6/include"
55798          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55799            x_includes="$SYSROOT/usr/include"
55800          fi
55801        fi
55802        if test "x$x_libraries" = xNONE; then
55803          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55804            x_libraries="$SYSROOT/usr/X11R6/lib"
55805          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55806            x_libraries="$SYSROOT/usr/lib64"
55807          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55808            x_libraries="$SYSROOT/usr/lib"
55809          fi
55810        fi
55811      fi
55812    fi
55813
55814    # Now let autoconf do it's magic
55815    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55816$as_echo_n "checking for X... " >&6; }
55817
55818
55819# Check whether --with-x was given.
55820if test "${with_x+set}" = set; then :
55821  withval=$with_x;
55822fi
55823
55824# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55825if test "x$with_x" = xno; then
55826  # The user explicitly disabled X.
55827  have_x=disabled
55828else
55829  case $x_includes,$x_libraries in #(
55830    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55831    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55832  $as_echo_n "(cached) " >&6
55833else
55834  # One or both of the vars are not set, and there is no cached value.
55835ac_x_includes=no ac_x_libraries=no
55836rm -f -r conftest.dir
55837if mkdir conftest.dir; then
55838  cd conftest.dir
55839  cat >Imakefile <<'_ACEOF'
55840incroot:
55841	@echo incroot='${INCROOT}'
55842usrlibdir:
55843	@echo usrlibdir='${USRLIBDIR}'
55844libdir:
55845	@echo libdir='${LIBDIR}'
55846_ACEOF
55847  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55848    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55849    for ac_var in incroot usrlibdir libdir; do
55850      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55851    done
55852    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55853    for ac_extension in a so sl dylib la dll; do
55854      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55855	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55856	ac_im_usrlibdir=$ac_im_libdir; break
55857      fi
55858    done
55859    # Screen out bogus values from the imake configuration.  They are
55860    # bogus both because they are the default anyway, and because
55861    # using them would break gcc on systems where it needs fixed includes.
55862    case $ac_im_incroot in
55863	/usr/include) ac_x_includes= ;;
55864	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55865    esac
55866    case $ac_im_usrlibdir in
55867	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55868	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55869    esac
55870  fi
55871  cd ..
55872  rm -f -r conftest.dir
55873fi
55874
55875# Standard set of common directories for X headers.
55876# Check X11 before X11Rn because it is often a symlink to the current release.
55877ac_x_header_dirs='
55878/usr/X11/include
55879/usr/X11R7/include
55880/usr/X11R6/include
55881/usr/X11R5/include
55882/usr/X11R4/include
55883
55884/usr/include/X11
55885/usr/include/X11R7
55886/usr/include/X11R6
55887/usr/include/X11R5
55888/usr/include/X11R4
55889
55890/usr/local/X11/include
55891/usr/local/X11R7/include
55892/usr/local/X11R6/include
55893/usr/local/X11R5/include
55894/usr/local/X11R4/include
55895
55896/usr/local/include/X11
55897/usr/local/include/X11R7
55898/usr/local/include/X11R6
55899/usr/local/include/X11R5
55900/usr/local/include/X11R4
55901
55902/usr/X386/include
55903/usr/x386/include
55904/usr/XFree86/include/X11
55905
55906/usr/include
55907/usr/local/include
55908/usr/unsupported/include
55909/usr/athena/include
55910/usr/local/x11r5/include
55911/usr/lpp/Xamples/include
55912
55913/usr/openwin/include
55914/usr/openwin/share/include'
55915
55916if test "$ac_x_includes" = no; then
55917  # Guess where to find include files, by looking for Xlib.h.
55918  # First, try using that file with no special directory specified.
55919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55920/* end confdefs.h.  */
55921#include <X11/Xlib.h>
55922_ACEOF
55923if ac_fn_cxx_try_cpp "$LINENO"; then :
55924  # We can compile using X headers with no special include directory.
55925ac_x_includes=
55926else
55927  for ac_dir in $ac_x_header_dirs; do
55928  if test -r "$ac_dir/X11/Xlib.h"; then
55929    ac_x_includes=$ac_dir
55930    break
55931  fi
55932done
55933fi
55934rm -f conftest.err conftest.i conftest.$ac_ext
55935fi # $ac_x_includes = no
55936
55937if test "$ac_x_libraries" = no; then
55938  # Check for the libraries.
55939  # See if we find them without any special options.
55940  # Don't add to $LIBS permanently.
55941  ac_save_LIBS=$LIBS
55942  LIBS="-lX11 $LIBS"
55943  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55944/* end confdefs.h.  */
55945#include <X11/Xlib.h>
55946int
55947main ()
55948{
55949XrmInitialize ()
55950  ;
55951  return 0;
55952}
55953_ACEOF
55954if ac_fn_cxx_try_link "$LINENO"; then :
55955  LIBS=$ac_save_LIBS
55956# We can link X programs with no special library path.
55957ac_x_libraries=
55958else
55959  LIBS=$ac_save_LIBS
55960for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55961do
55962  # Don't even attempt the hair of trying to link an X program!
55963  for ac_extension in a so sl dylib la dll; do
55964    if test -r "$ac_dir/libX11.$ac_extension"; then
55965      ac_x_libraries=$ac_dir
55966      break 2
55967    fi
55968  done
55969done
55970fi
55971rm -f core conftest.err conftest.$ac_objext \
55972    conftest$ac_exeext conftest.$ac_ext
55973fi # $ac_x_libraries = no
55974
55975case $ac_x_includes,$ac_x_libraries in #(
55976  no,* | *,no | *\'*)
55977    # Didn't find X, or a directory has "'" in its name.
55978    ac_cv_have_x="have_x=no";; #(
55979  *)
55980    # Record where we found X for the cache.
55981    ac_cv_have_x="have_x=yes\
55982	ac_x_includes='$ac_x_includes'\
55983	ac_x_libraries='$ac_x_libraries'"
55984esac
55985fi
55986;; #(
55987    *) have_x=yes;;
55988  esac
55989  eval "$ac_cv_have_x"
55990fi # $with_x != no
55991
55992if test "$have_x" != yes; then
55993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55994$as_echo "$have_x" >&6; }
55995  no_x=yes
55996else
55997  # If each of the values was on the command line, it overrides each guess.
55998  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55999  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56000  # Update the cache value to reflect the command line values.
56001  ac_cv_have_x="have_x=yes\
56002	ac_x_includes='$x_includes'\
56003	ac_x_libraries='$x_libraries'"
56004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56005$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56006fi
56007
56008    if test "$no_x" = yes; then
56009  # Not all programs may use this symbol, but it does not hurt to define it.
56010
56011$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56012
56013  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56014else
56015  if test -n "$x_includes"; then
56016    X_CFLAGS="$X_CFLAGS -I$x_includes"
56017  fi
56018
56019  # It would also be nice to do this for all -L options, not just this one.
56020  if test -n "$x_libraries"; then
56021    X_LIBS="$X_LIBS -L$x_libraries"
56022    # For Solaris; some versions of Sun CC require a space after -R and
56023    # others require no space.  Words are not sufficient . . . .
56024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56025$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56026    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56027    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56028    ac_cxx_werror_flag=yes
56029    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56030/* end confdefs.h.  */
56031
56032int
56033main ()
56034{
56035
56036  ;
56037  return 0;
56038}
56039_ACEOF
56040if ac_fn_cxx_try_link "$LINENO"; then :
56041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56042$as_echo "no" >&6; }
56043       X_LIBS="$X_LIBS -R$x_libraries"
56044else
56045  LIBS="$ac_xsave_LIBS -R $x_libraries"
56046       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56047/* end confdefs.h.  */
56048
56049int
56050main ()
56051{
56052
56053  ;
56054  return 0;
56055}
56056_ACEOF
56057if ac_fn_cxx_try_link "$LINENO"; then :
56058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56059$as_echo "yes" >&6; }
56060	  X_LIBS="$X_LIBS -R $x_libraries"
56061else
56062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56063$as_echo "neither works" >&6; }
56064fi
56065rm -f core conftest.err conftest.$ac_objext \
56066    conftest$ac_exeext conftest.$ac_ext
56067fi
56068rm -f core conftest.err conftest.$ac_objext \
56069    conftest$ac_exeext conftest.$ac_ext
56070    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56071    LIBS=$ac_xsave_LIBS
56072  fi
56073
56074  # Check for system-dependent libraries X programs must link with.
56075  # Do this before checking for the system-independent R6 libraries
56076  # (-lICE), since we may need -lsocket or whatever for X linking.
56077
56078  if test "$ISC" = yes; then
56079    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56080  else
56081    # Martyn Johnson says this is needed for Ultrix, if the X
56082    # libraries were built with DECnet support.  And Karl Berry says
56083    # the Alpha needs dnet_stub (dnet does not exist).
56084    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56085    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56086/* end confdefs.h.  */
56087
56088/* Override any GCC internal prototype to avoid an error.
56089   Use char because int might match the return type of a GCC
56090   builtin and then its argument prototype would still apply.  */
56091#ifdef __cplusplus
56092extern "C"
56093#endif
56094char XOpenDisplay ();
56095int
56096main ()
56097{
56098return XOpenDisplay ();
56099  ;
56100  return 0;
56101}
56102_ACEOF
56103if ac_fn_cxx_try_link "$LINENO"; then :
56104
56105else
56106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56107$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56108if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56109  $as_echo_n "(cached) " >&6
56110else
56111  ac_check_lib_save_LIBS=$LIBS
56112LIBS="-ldnet  $LIBS"
56113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56114/* end confdefs.h.  */
56115
56116/* Override any GCC internal prototype to avoid an error.
56117   Use char because int might match the return type of a GCC
56118   builtin and then its argument prototype would still apply.  */
56119#ifdef __cplusplus
56120extern "C"
56121#endif
56122char dnet_ntoa ();
56123int
56124main ()
56125{
56126return dnet_ntoa ();
56127  ;
56128  return 0;
56129}
56130_ACEOF
56131if ac_fn_cxx_try_link "$LINENO"; then :
56132  ac_cv_lib_dnet_dnet_ntoa=yes
56133else
56134  ac_cv_lib_dnet_dnet_ntoa=no
56135fi
56136rm -f core conftest.err conftest.$ac_objext \
56137    conftest$ac_exeext conftest.$ac_ext
56138LIBS=$ac_check_lib_save_LIBS
56139fi
56140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56141$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56142if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56143  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56144fi
56145
56146    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56147      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56148$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56149if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56150  $as_echo_n "(cached) " >&6
56151else
56152  ac_check_lib_save_LIBS=$LIBS
56153LIBS="-ldnet_stub  $LIBS"
56154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56155/* end confdefs.h.  */
56156
56157/* Override any GCC internal prototype to avoid an error.
56158   Use char because int might match the return type of a GCC
56159   builtin and then its argument prototype would still apply.  */
56160#ifdef __cplusplus
56161extern "C"
56162#endif
56163char dnet_ntoa ();
56164int
56165main ()
56166{
56167return dnet_ntoa ();
56168  ;
56169  return 0;
56170}
56171_ACEOF
56172if ac_fn_cxx_try_link "$LINENO"; then :
56173  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56174else
56175  ac_cv_lib_dnet_stub_dnet_ntoa=no
56176fi
56177rm -f core conftest.err conftest.$ac_objext \
56178    conftest$ac_exeext conftest.$ac_ext
56179LIBS=$ac_check_lib_save_LIBS
56180fi
56181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56182$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56183if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56184  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56185fi
56186
56187    fi
56188fi
56189rm -f core conftest.err conftest.$ac_objext \
56190    conftest$ac_exeext conftest.$ac_ext
56191    LIBS="$ac_xsave_LIBS"
56192
56193    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56194    # to get the SysV transport functions.
56195    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56196    # needs -lnsl.
56197    # The nsl library prevents programs from opening the X display
56198    # on Irix 5.2, according to T.E. Dickey.
56199    # The functions gethostbyname, getservbyname, and inet_addr are
56200    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56201    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56202if test "x$ac_cv_func_gethostbyname" = xyes; then :
56203
56204fi
56205
56206    if test $ac_cv_func_gethostbyname = no; then
56207      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56208$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56209if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56210  $as_echo_n "(cached) " >&6
56211else
56212  ac_check_lib_save_LIBS=$LIBS
56213LIBS="-lnsl  $LIBS"
56214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56215/* end confdefs.h.  */
56216
56217/* Override any GCC internal prototype to avoid an error.
56218   Use char because int might match the return type of a GCC
56219   builtin and then its argument prototype would still apply.  */
56220#ifdef __cplusplus
56221extern "C"
56222#endif
56223char gethostbyname ();
56224int
56225main ()
56226{
56227return gethostbyname ();
56228  ;
56229  return 0;
56230}
56231_ACEOF
56232if ac_fn_cxx_try_link "$LINENO"; then :
56233  ac_cv_lib_nsl_gethostbyname=yes
56234else
56235  ac_cv_lib_nsl_gethostbyname=no
56236fi
56237rm -f core conftest.err conftest.$ac_objext \
56238    conftest$ac_exeext conftest.$ac_ext
56239LIBS=$ac_check_lib_save_LIBS
56240fi
56241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56242$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56243if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56244  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56245fi
56246
56247      if test $ac_cv_lib_nsl_gethostbyname = no; then
56248	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56249$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56250if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56251  $as_echo_n "(cached) " >&6
56252else
56253  ac_check_lib_save_LIBS=$LIBS
56254LIBS="-lbsd  $LIBS"
56255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56256/* end confdefs.h.  */
56257
56258/* Override any GCC internal prototype to avoid an error.
56259   Use char because int might match the return type of a GCC
56260   builtin and then its argument prototype would still apply.  */
56261#ifdef __cplusplus
56262extern "C"
56263#endif
56264char gethostbyname ();
56265int
56266main ()
56267{
56268return gethostbyname ();
56269  ;
56270  return 0;
56271}
56272_ACEOF
56273if ac_fn_cxx_try_link "$LINENO"; then :
56274  ac_cv_lib_bsd_gethostbyname=yes
56275else
56276  ac_cv_lib_bsd_gethostbyname=no
56277fi
56278rm -f core conftest.err conftest.$ac_objext \
56279    conftest$ac_exeext conftest.$ac_ext
56280LIBS=$ac_check_lib_save_LIBS
56281fi
56282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56283$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56284if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56285  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56286fi
56287
56288      fi
56289    fi
56290
56291    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56292    # socket/setsockopt and other routines are undefined under SCO ODT
56293    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56294    # on later versions), says Simon Leinen: it contains gethostby*
56295    # variants that don't use the name server (or something).  -lsocket
56296    # must be given before -lnsl if both are needed.  We assume that
56297    # if connect needs -lnsl, so does gethostbyname.
56298    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56299if test "x$ac_cv_func_connect" = xyes; then :
56300
56301fi
56302
56303    if test $ac_cv_func_connect = no; then
56304      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56305$as_echo_n "checking for connect in -lsocket... " >&6; }
56306if ${ac_cv_lib_socket_connect+:} false; then :
56307  $as_echo_n "(cached) " >&6
56308else
56309  ac_check_lib_save_LIBS=$LIBS
56310LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56312/* end confdefs.h.  */
56313
56314/* Override any GCC internal prototype to avoid an error.
56315   Use char because int might match the return type of a GCC
56316   builtin and then its argument prototype would still apply.  */
56317#ifdef __cplusplus
56318extern "C"
56319#endif
56320char connect ();
56321int
56322main ()
56323{
56324return connect ();
56325  ;
56326  return 0;
56327}
56328_ACEOF
56329if ac_fn_cxx_try_link "$LINENO"; then :
56330  ac_cv_lib_socket_connect=yes
56331else
56332  ac_cv_lib_socket_connect=no
56333fi
56334rm -f core conftest.err conftest.$ac_objext \
56335    conftest$ac_exeext conftest.$ac_ext
56336LIBS=$ac_check_lib_save_LIBS
56337fi
56338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56339$as_echo "$ac_cv_lib_socket_connect" >&6; }
56340if test "x$ac_cv_lib_socket_connect" = xyes; then :
56341  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56342fi
56343
56344    fi
56345
56346    # Guillermo Gomez says -lposix is necessary on A/UX.
56347    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56348if test "x$ac_cv_func_remove" = xyes; then :
56349
56350fi
56351
56352    if test $ac_cv_func_remove = no; then
56353      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56354$as_echo_n "checking for remove in -lposix... " >&6; }
56355if ${ac_cv_lib_posix_remove+:} false; then :
56356  $as_echo_n "(cached) " >&6
56357else
56358  ac_check_lib_save_LIBS=$LIBS
56359LIBS="-lposix  $LIBS"
56360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56361/* end confdefs.h.  */
56362
56363/* Override any GCC internal prototype to avoid an error.
56364   Use char because int might match the return type of a GCC
56365   builtin and then its argument prototype would still apply.  */
56366#ifdef __cplusplus
56367extern "C"
56368#endif
56369char remove ();
56370int
56371main ()
56372{
56373return remove ();
56374  ;
56375  return 0;
56376}
56377_ACEOF
56378if ac_fn_cxx_try_link "$LINENO"; then :
56379  ac_cv_lib_posix_remove=yes
56380else
56381  ac_cv_lib_posix_remove=no
56382fi
56383rm -f core conftest.err conftest.$ac_objext \
56384    conftest$ac_exeext conftest.$ac_ext
56385LIBS=$ac_check_lib_save_LIBS
56386fi
56387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56388$as_echo "$ac_cv_lib_posix_remove" >&6; }
56389if test "x$ac_cv_lib_posix_remove" = xyes; then :
56390  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56391fi
56392
56393    fi
56394
56395    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56396    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56397if test "x$ac_cv_func_shmat" = xyes; then :
56398
56399fi
56400
56401    if test $ac_cv_func_shmat = no; then
56402      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56403$as_echo_n "checking for shmat in -lipc... " >&6; }
56404if ${ac_cv_lib_ipc_shmat+:} false; then :
56405  $as_echo_n "(cached) " >&6
56406else
56407  ac_check_lib_save_LIBS=$LIBS
56408LIBS="-lipc  $LIBS"
56409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56410/* end confdefs.h.  */
56411
56412/* Override any GCC internal prototype to avoid an error.
56413   Use char because int might match the return type of a GCC
56414   builtin and then its argument prototype would still apply.  */
56415#ifdef __cplusplus
56416extern "C"
56417#endif
56418char shmat ();
56419int
56420main ()
56421{
56422return shmat ();
56423  ;
56424  return 0;
56425}
56426_ACEOF
56427if ac_fn_cxx_try_link "$LINENO"; then :
56428  ac_cv_lib_ipc_shmat=yes
56429else
56430  ac_cv_lib_ipc_shmat=no
56431fi
56432rm -f core conftest.err conftest.$ac_objext \
56433    conftest$ac_exeext conftest.$ac_ext
56434LIBS=$ac_check_lib_save_LIBS
56435fi
56436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56437$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56438if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56439  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56440fi
56441
56442    fi
56443  fi
56444
56445  # Check for libraries that X11R6 Xt/Xaw programs need.
56446  ac_save_LDFLAGS=$LDFLAGS
56447  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56448  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56449  # check for ICE first), but we must link in the order -lSM -lICE or
56450  # we get undefined symbols.  So assume we have SM if we have ICE.
56451  # These have to be linked with before -lX11, unlike the other
56452  # libraries we check for below, so use a different variable.
56453  # John Interrante, Karl Berry
56454  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56455$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56456if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56457  $as_echo_n "(cached) " >&6
56458else
56459  ac_check_lib_save_LIBS=$LIBS
56460LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56462/* end confdefs.h.  */
56463
56464/* Override any GCC internal prototype to avoid an error.
56465   Use char because int might match the return type of a GCC
56466   builtin and then its argument prototype would still apply.  */
56467#ifdef __cplusplus
56468extern "C"
56469#endif
56470char IceConnectionNumber ();
56471int
56472main ()
56473{
56474return IceConnectionNumber ();
56475  ;
56476  return 0;
56477}
56478_ACEOF
56479if ac_fn_cxx_try_link "$LINENO"; then :
56480  ac_cv_lib_ICE_IceConnectionNumber=yes
56481else
56482  ac_cv_lib_ICE_IceConnectionNumber=no
56483fi
56484rm -f core conftest.err conftest.$ac_objext \
56485    conftest$ac_exeext conftest.$ac_ext
56486LIBS=$ac_check_lib_save_LIBS
56487fi
56488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56489$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56490if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56491  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56492fi
56493
56494  LDFLAGS=$ac_save_LDFLAGS
56495
56496fi
56497
56498
56499    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56500    # this doesn't make sense so we remove it.
56501    if test "x$COMPILE_TYPE" = xcross; then
56502      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56503    fi
56504
56505    if test "x$no_x" = xyes; then
56506
56507  # Print a helpful message on how to acquire the necessary build dependency.
56508  # x11 is the help tag: freetype, cups, alsa etc
56509  MISSING_DEPENDENCY=x11
56510
56511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56512    cygwin_help $MISSING_DEPENDENCY
56513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56514    msys_help $MISSING_DEPENDENCY
56515  else
56516    PKGHANDLER_COMMAND=
56517
56518    case $PKGHANDLER in
56519      apt-get)
56520        apt_help     $MISSING_DEPENDENCY ;;
56521      yum)
56522        yum_help     $MISSING_DEPENDENCY ;;
56523      port)
56524        port_help    $MISSING_DEPENDENCY ;;
56525      pkgutil)
56526        pkgutil_help $MISSING_DEPENDENCY ;;
56527      pkgadd)
56528        pkgadd_help  $MISSING_DEPENDENCY ;;
56529    esac
56530
56531    if test "x$PKGHANDLER_COMMAND" != x; then
56532      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56533    fi
56534  fi
56535
56536      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56537    fi
56538
56539    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56540      OPENWIN_HOME="/usr/openwin"
56541      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56542      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56543          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56544    fi
56545
56546    ac_ext=c
56547ac_cpp='$CPP $CPPFLAGS'
56548ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56549ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56550ac_compiler_gnu=$ac_cv_c_compiler_gnu
56551
56552    OLD_CFLAGS="$CFLAGS"
56553    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56554
56555    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56556    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56557do :
56558  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56559ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56560          # include <X11/Xlib.h>
56561          # include <X11/Xutil.h>
56562
56563
56564"
56565if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56566  cat >>confdefs.h <<_ACEOF
56567#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56568_ACEOF
56569 X11_HEADERS_OK=yes
56570else
56571  X11_HEADERS_OK=no; break
56572fi
56573
56574done
56575
56576
56577    if test "x$X11_HEADERS_OK" = xno; then
56578
56579  # Print a helpful message on how to acquire the necessary build dependency.
56580  # x11 is the help tag: freetype, cups, alsa etc
56581  MISSING_DEPENDENCY=x11
56582
56583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56584    cygwin_help $MISSING_DEPENDENCY
56585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56586    msys_help $MISSING_DEPENDENCY
56587  else
56588    PKGHANDLER_COMMAND=
56589
56590    case $PKGHANDLER in
56591      apt-get)
56592        apt_help     $MISSING_DEPENDENCY ;;
56593      yum)
56594        yum_help     $MISSING_DEPENDENCY ;;
56595      port)
56596        port_help    $MISSING_DEPENDENCY ;;
56597      pkgutil)
56598        pkgutil_help $MISSING_DEPENDENCY ;;
56599      pkgadd)
56600        pkgadd_help  $MISSING_DEPENDENCY ;;
56601    esac
56602
56603    if test "x$PKGHANDLER_COMMAND" != x; then
56604      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56605    fi
56606  fi
56607
56608      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56609    fi
56610
56611    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56612    # defined in libawt_xawt.
56613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56614$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56615    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56616/* end confdefs.h.  */
56617#include <X11/extensions/Xrender.h>
56618int
56619main ()
56620{
56621XLinearGradient x;
56622  ;
56623  return 0;
56624}
56625_ACEOF
56626if ac_fn_c_try_compile "$LINENO"; then :
56627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56628$as_echo "yes" >&6; }
56629else
56630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56631$as_echo "no" >&6; }
56632         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56633fi
56634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56635
56636    CFLAGS="$OLD_CFLAGS"
56637    ac_ext=cpp
56638ac_cpp='$CXXCPP $CPPFLAGS'
56639ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56640ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56641ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56642
56643  fi # NEEDS_LIB_X11
56644
56645
56646
56647
56648
56649
56650# Check whether --with-cups was given.
56651if test "${with_cups+set}" = set; then :
56652  withval=$with_cups;
56653fi
56654
56655
56656# Check whether --with-cups-include was given.
56657if test "${with_cups_include+set}" = set; then :
56658  withval=$with_cups_include;
56659fi
56660
56661
56662  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56663    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56664        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56665      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56666$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56667    fi
56668    CUPS_CFLAGS=
56669  else
56670    CUPS_FOUND=no
56671
56672    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56673      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56674    fi
56675
56676    if test "x${with_cups}" != x; then
56677      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56678$as_echo_n "checking for cups headers... " >&6; }
56679      if test -s "${with_cups}/include/cups/cups.h"; then
56680        CUPS_CFLAGS="-I${with_cups}/include"
56681        CUPS_FOUND=yes
56682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56683$as_echo "$CUPS_FOUND" >&6; }
56684      else
56685        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56686      fi
56687    fi
56688    if test "x${with_cups_include}" != x; then
56689      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56690$as_echo_n "checking for cups headers... " >&6; }
56691      if test -s "${with_cups_include}/cups/cups.h"; then
56692        CUPS_CFLAGS="-I${with_cups_include}"
56693        CUPS_FOUND=yes
56694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56695$as_echo "$CUPS_FOUND" >&6; }
56696      else
56697        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56698      fi
56699    fi
56700    if test "x$CUPS_FOUND" = xno; then
56701      # Are the cups headers installed in the default /usr/include location?
56702      for ac_header in cups/cups.h cups/ppd.h
56703do :
56704  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56705ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56706if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56707  cat >>confdefs.h <<_ACEOF
56708#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56709_ACEOF
56710
56711          CUPS_FOUND=yes
56712          CUPS_CFLAGS=
56713          DEFAULT_CUPS=yes
56714
56715fi
56716
56717done
56718
56719    fi
56720    if test "x$CUPS_FOUND" = xno; then
56721
56722  # Print a helpful message on how to acquire the necessary build dependency.
56723  # cups is the help tag: freetype, cups, alsa etc
56724  MISSING_DEPENDENCY=cups
56725
56726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56727    cygwin_help $MISSING_DEPENDENCY
56728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56729    msys_help $MISSING_DEPENDENCY
56730  else
56731    PKGHANDLER_COMMAND=
56732
56733    case $PKGHANDLER in
56734      apt-get)
56735        apt_help     $MISSING_DEPENDENCY ;;
56736      yum)
56737        yum_help     $MISSING_DEPENDENCY ;;
56738      port)
56739        port_help    $MISSING_DEPENDENCY ;;
56740      pkgutil)
56741        pkgutil_help $MISSING_DEPENDENCY ;;
56742      pkgadd)
56743        pkgadd_help  $MISSING_DEPENDENCY ;;
56744    esac
56745
56746    if test "x$PKGHANDLER_COMMAND" != x; then
56747      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56748    fi
56749  fi
56750
56751      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56752    fi
56753  fi
56754
56755
56756
56757
56758
56759# Check whether --with-freetype was given.
56760if test "${with_freetype+set}" = set; then :
56761  withval=$with_freetype;
56762fi
56763
56764
56765# Check whether --with-freetype-include was given.
56766if test "${with_freetype_include+set}" = set; then :
56767  withval=$with_freetype_include;
56768fi
56769
56770
56771# Check whether --with-freetype-lib was given.
56772if test "${with_freetype_lib+set}" = set; then :
56773  withval=$with_freetype_lib;
56774fi
56775
56776
56777# Check whether --with-freetype-src was given.
56778if test "${with_freetype_src+set}" = set; then :
56779  withval=$with_freetype_src;
56780fi
56781
56782  # Check whether --enable-freetype-bundling was given.
56783if test "${enable_freetype_bundling+set}" = set; then :
56784  enableval=$enable_freetype_bundling;
56785fi
56786
56787
56788  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56789  FREETYPE_BASE_NAME=freetype
56790  FREETYPE_CFLAGS=
56791  FREETYPE_LIBS=
56792  FREETYPE_BUNDLE_LIB_PATH=
56793
56794  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56795    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56796        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56797        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56798        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56799      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56800$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56801    fi
56802    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56803      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56804$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56805    fi
56806  else
56807    # freetype is needed to build; go get it!
56808
56809    BUNDLE_FREETYPE="$enable_freetype_bundling"
56810
56811    if  test "x$with_freetype_src" != x; then
56812      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56813        # Try to build freetype if --with-freetype-src was given on Windows
56814
56815  FREETYPE_SRC_PATH="$with_freetype_src"
56816  BUILD_FREETYPE=yes
56817
56818  # Check if the freetype sources are acessible..
56819  if ! test -d $FREETYPE_SRC_PATH; then
56820    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
56821$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56822    BUILD_FREETYPE=no
56823  fi
56824  # ..and contain a vc2010 project file
56825  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56826  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56827    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
56828$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56829    BUILD_FREETYPE=no
56830  fi
56831  # Now check if configure found a version of 'msbuild.exe'
56832  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56833    { $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
56834$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;}
56835    BUILD_FREETYPE=no
56836  fi
56837
56838  # Ready to go..
56839  if test "x$BUILD_FREETYPE" = xyes; then
56840    # msbuild requires trailing slashes for output directories
56841    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56842    freetype_lib_path_unix="$freetype_lib_path"
56843    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56844
56845  unix_path="$vcxproj_path"
56846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56847    windows_path=`$CYGPATH -m "$unix_path"`
56848    vcxproj_path="$windows_path"
56849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56850    windows_path=`cmd //c echo $unix_path`
56851    vcxproj_path="$windows_path"
56852  fi
56853
56854
56855  unix_path="$freetype_lib_path"
56856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56857    windows_path=`$CYGPATH -m "$unix_path"`
56858    freetype_lib_path="$windows_path"
56859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56860    windows_path=`cmd //c echo $unix_path`
56861    freetype_lib_path="$windows_path"
56862  fi
56863
56864
56865  unix_path="$freetype_obj_path"
56866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56867    windows_path=`$CYGPATH -m "$unix_path"`
56868    freetype_obj_path="$windows_path"
56869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56870    windows_path=`cmd //c echo $unix_path`
56871    freetype_obj_path="$windows_path"
56872  fi
56873
56874    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56875      freetype_platform=x64
56876    else
56877      freetype_platform=win32
56878    fi
56879
56880    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56881    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56882    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56883    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56884    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56885$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56886
56887    # First we try to build the freetype.dll
56888    $ECHO -e "@echo off\n"\
56889        "$MSBUILD $vcxproj_path "\
56890        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56891        "/p:Configuration=\"Release Multithreaded\" "\
56892        "/p:Platform=$freetype_platform "\
56893        "/p:ConfigurationType=DynamicLibrary "\
56894        "/p:TargetName=freetype "\
56895        "/p:OutDir=\"$freetype_lib_path\" "\
56896        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56897    cmd /c freetype.bat
56898
56899    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56900      # If that succeeds we also build freetype.lib
56901      $ECHO -e "@echo off\n"\
56902          "$MSBUILD $vcxproj_path "\
56903          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56904          "/p:Configuration=\"Release Multithreaded\" "\
56905          "/p:Platform=$freetype_platform "\
56906          "/p:ConfigurationType=StaticLibrary "\
56907          "/p:TargetName=freetype "\
56908          "/p:OutDir=\"$freetype_lib_path\" "\
56909          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56910      cmd /c freetype.bat
56911
56912      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56913        # Once we build both, lib and dll, set freetype lib and include path appropriately
56914        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56915        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56916        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56917$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56918      else
56919        BUILD_FREETYPE=no
56920      fi
56921    else
56922      BUILD_FREETYPE=no
56923    fi
56924  fi
56925
56926        if test "x$BUILD_FREETYPE" = xyes; then
56927          # Okay, we built it. Check that it works.
56928
56929  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56930  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56931  METHOD="--with-freetype-src"
56932
56933  # Let's start with an optimistic view of the world :-)
56934  FOUND_FREETYPE=yes
56935
56936  # First look for the canonical freetype main include file ft2build.h.
56937  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56938    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56939    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56940    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56941      # Fail.
56942      FOUND_FREETYPE=no
56943    fi
56944  fi
56945
56946  if test "x$FOUND_FREETYPE" = xyes; then
56947    # Include file found, let's continue the sanity check.
56948    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56949$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56950
56951    # Reset to default value
56952    FREETYPE_BASE_NAME=freetype
56953    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56954    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56955      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56956          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56957        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56958        # for the .6 version explicitly.
56959        FREETYPE_BASE_NAME=freetype.6
56960        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56961        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56962$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56963      else
56964        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56965$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56966        FOUND_FREETYPE=no
56967      fi
56968    else
56969      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56970        # On Windows, we will need both .lib and .dll file.
56971        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56972          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56973$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56974          FOUND_FREETYPE=no
56975        fi
56976      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56977          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56978        # Found lib in isa dir, use that instead.
56979        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56980        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56981$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56982      fi
56983    fi
56984  fi
56985
56986  if test "x$FOUND_FREETYPE" = xyes; then
56987
56988  # Only process if variable expands to non-empty
56989
56990  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56992
56993  # Input might be given as Windows format, start by converting to
56994  # unix format.
56995  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56996  new_path=`$CYGPATH -u "$path"`
56997
56998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57001  # "foo.exe" is OK but "foo" is an error.
57002  #
57003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57004  # It is also a way to make sure we got the proper file name for the real test later on.
57005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57006  if test "x$test_shortpath" = x; then
57007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57008$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57009    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57010  fi
57011
57012  # Call helper function which possibly converts this using DOS-style short mode.
57013  # If so, the updated path is stored in $new_path.
57014
57015  input_path="$new_path"
57016  # Check if we need to convert this using DOS-style short mode. If the path
57017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57018  # take no chances and rewrite it.
57019  # Note: m4 eats our [], so we need to use [ and ] instead.
57020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57021  if test "x$has_forbidden_chars" != x; then
57022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57026      # Going to short mode and back again did indeed matter. Since short mode is
57027      # case insensitive, let's make it lowercase to improve readability.
57028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57029      # Now convert it back to Unix-style (cygpath)
57030      input_path=`$CYGPATH -u "$shortmode_path"`
57031      new_path="$input_path"
57032    fi
57033  fi
57034
57035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57036  if test "x$test_cygdrive_prefix" = x; then
57037    # As a simple fix, exclude /usr/bin since it's not a real path.
57038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57040      # a path prefixed by /cygdrive for fixpath to work.
57041      new_path="$CYGWIN_ROOT_PATH$input_path"
57042    fi
57043  fi
57044
57045
57046  if test "x$path" != "x$new_path"; then
57047    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57049$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57050  fi
57051
57052    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57053
57054  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57055  has_colon=`$ECHO $path | $GREP ^.:`
57056  new_path="$path"
57057  if test "x$has_colon" = x; then
57058    # Not in mixed or Windows style, start by that.
57059    new_path=`cmd //c echo $path`
57060  fi
57061
57062
57063  input_path="$new_path"
57064  # Check if we need to convert this using DOS-style short mode. If the path
57065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57066  # take no chances and rewrite it.
57067  # Note: m4 eats our [], so we need to use [ and ] instead.
57068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57069  if test "x$has_forbidden_chars" != x; then
57070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57072  fi
57073
57074
57075  windows_path="$new_path"
57076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57077    unix_path=`$CYGPATH -u "$windows_path"`
57078    new_path="$unix_path"
57079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57081    new_path="$unix_path"
57082  fi
57083
57084  if test "x$path" != "x$new_path"; then
57085    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57087$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57088  fi
57089
57090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57092
57093    else
57094      # We're on a unix platform. Hooray! :)
57095      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57096      has_space=`$ECHO "$path" | $GREP " "`
57097      if test "x$has_space" != x; then
57098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57099$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57100        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57101      fi
57102
57103      # Use eval to expand a potential ~
57104      eval path="$path"
57105      if test ! -f "$path" && test ! -d "$path"; then
57106        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57107      fi
57108
57109      if test -d "$path"; then
57110        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57111      else
57112        dir="`$DIRNAME "$path"`"
57113        base="`$BASENAME "$path"`"
57114        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57115      fi
57116    fi
57117  fi
57118
57119
57120  # Only process if variable expands to non-empty
57121
57122  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57123    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57124
57125  # Input might be given as Windows format, start by converting to
57126  # unix format.
57127  path="$POTENTIAL_FREETYPE_LIB_PATH"
57128  new_path=`$CYGPATH -u "$path"`
57129
57130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57133  # "foo.exe" is OK but "foo" is an error.
57134  #
57135  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57136  # It is also a way to make sure we got the proper file name for the real test later on.
57137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57138  if test "x$test_shortpath" = x; then
57139    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57140$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57141    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57142  fi
57143
57144  # Call helper function which possibly converts this using DOS-style short mode.
57145  # If so, the updated path is stored in $new_path.
57146
57147  input_path="$new_path"
57148  # Check if we need to convert this using DOS-style short mode. If the path
57149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57150  # take no chances and rewrite it.
57151  # Note: m4 eats our [], so we need to use [ and ] instead.
57152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57153  if test "x$has_forbidden_chars" != x; then
57154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57158      # Going to short mode and back again did indeed matter. Since short mode is
57159      # case insensitive, let's make it lowercase to improve readability.
57160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57161      # Now convert it back to Unix-style (cygpath)
57162      input_path=`$CYGPATH -u "$shortmode_path"`
57163      new_path="$input_path"
57164    fi
57165  fi
57166
57167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57168  if test "x$test_cygdrive_prefix" = x; then
57169    # As a simple fix, exclude /usr/bin since it's not a real path.
57170    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57172      # a path prefixed by /cygdrive for fixpath to work.
57173      new_path="$CYGWIN_ROOT_PATH$input_path"
57174    fi
57175  fi
57176
57177
57178  if test "x$path" != "x$new_path"; then
57179    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57181$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57182  fi
57183
57184    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57185
57186  path="$POTENTIAL_FREETYPE_LIB_PATH"
57187  has_colon=`$ECHO $path | $GREP ^.:`
57188  new_path="$path"
57189  if test "x$has_colon" = x; then
57190    # Not in mixed or Windows style, start by that.
57191    new_path=`cmd //c echo $path`
57192  fi
57193
57194
57195  input_path="$new_path"
57196  # Check if we need to convert this using DOS-style short mode. If the path
57197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57198  # take no chances and rewrite it.
57199  # Note: m4 eats our [], so we need to use [ and ] instead.
57200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57201  if test "x$has_forbidden_chars" != x; then
57202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57204  fi
57205
57206
57207  windows_path="$new_path"
57208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57209    unix_path=`$CYGPATH -u "$windows_path"`
57210    new_path="$unix_path"
57211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57213    new_path="$unix_path"
57214  fi
57215
57216  if test "x$path" != "x$new_path"; then
57217    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57219$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57220  fi
57221
57222  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57223  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57224
57225    else
57226      # We're on a unix platform. Hooray! :)
57227      path="$POTENTIAL_FREETYPE_LIB_PATH"
57228      has_space=`$ECHO "$path" | $GREP " "`
57229      if test "x$has_space" != x; then
57230        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57231$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57232        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57233      fi
57234
57235      # Use eval to expand a potential ~
57236      eval path="$path"
57237      if test ! -f "$path" && test ! -d "$path"; then
57238        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57239      fi
57240
57241      if test -d "$path"; then
57242        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57243      else
57244        dir="`$DIRNAME "$path"`"
57245        base="`$BASENAME "$path"`"
57246        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57247      fi
57248    fi
57249  fi
57250
57251
57252    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57254$as_echo_n "checking for freetype includes... " >&6; }
57255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57256$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57257    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57259$as_echo_n "checking for freetype libraries... " >&6; }
57260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57261$as_echo "$FREETYPE_LIB_PATH" >&6; }
57262  fi
57263
57264          if test "x$FOUND_FREETYPE" != xyes; then
57265            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57266          fi
57267        else
57268          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57269$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57270          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57271        fi
57272      else
57273        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57274$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57275      fi
57276    fi
57277
57278    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57279      # User has specified settings
57280
57281      if test "x$BUNDLE_FREETYPE" = x; then
57282        # If not specified, default is to bundle freetype
57283        BUNDLE_FREETYPE=yes
57284      fi
57285
57286      if test "x$with_freetype" != x; then
57287        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57288        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57289      fi
57290
57291      # Allow --with-freetype-lib and --with-freetype-include to override
57292      if test "x$with_freetype_include" != x; then
57293        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57294      fi
57295      if test "x$with_freetype_lib" != x; then
57296        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57297      fi
57298
57299      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57300        # Okay, we got it. Check that it works.
57301
57302  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57303  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57304  METHOD="--with-freetype"
57305
57306  # Let's start with an optimistic view of the world :-)
57307  FOUND_FREETYPE=yes
57308
57309  # First look for the canonical freetype main include file ft2build.h.
57310  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57311    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57312    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57313    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57314      # Fail.
57315      FOUND_FREETYPE=no
57316    fi
57317  fi
57318
57319  if test "x$FOUND_FREETYPE" = xyes; then
57320    # Include file found, let's continue the sanity check.
57321    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57322$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57323
57324    # Reset to default value
57325    FREETYPE_BASE_NAME=freetype
57326    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57327    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57328      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57329          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57330        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57331        # for the .6 version explicitly.
57332        FREETYPE_BASE_NAME=freetype.6
57333        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57334        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57335$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57336      else
57337        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57338$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57339        FOUND_FREETYPE=no
57340      fi
57341    else
57342      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57343        # On Windows, we will need both .lib and .dll file.
57344        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57345          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57346$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57347          FOUND_FREETYPE=no
57348        fi
57349      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57350          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57351        # Found lib in isa dir, use that instead.
57352        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57353        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57354$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57355      fi
57356    fi
57357  fi
57358
57359  if test "x$FOUND_FREETYPE" = xyes; then
57360
57361  # Only process if variable expands to non-empty
57362
57363  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57364    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57365
57366  # Input might be given as Windows format, start by converting to
57367  # unix format.
57368  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57369  new_path=`$CYGPATH -u "$path"`
57370
57371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57374  # "foo.exe" is OK but "foo" is an error.
57375  #
57376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57377  # It is also a way to make sure we got the proper file name for the real test later on.
57378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57379  if test "x$test_shortpath" = x; then
57380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57381$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57382    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57383  fi
57384
57385  # Call helper function which possibly converts this using DOS-style short mode.
57386  # If so, the updated path is stored in $new_path.
57387
57388  input_path="$new_path"
57389  # Check if we need to convert this using DOS-style short mode. If the path
57390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57391  # take no chances and rewrite it.
57392  # Note: m4 eats our [], so we need to use [ and ] instead.
57393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57394  if test "x$has_forbidden_chars" != x; then
57395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57399      # Going to short mode and back again did indeed matter. Since short mode is
57400      # case insensitive, let's make it lowercase to improve readability.
57401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57402      # Now convert it back to Unix-style (cygpath)
57403      input_path=`$CYGPATH -u "$shortmode_path"`
57404      new_path="$input_path"
57405    fi
57406  fi
57407
57408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57409  if test "x$test_cygdrive_prefix" = x; then
57410    # As a simple fix, exclude /usr/bin since it's not a real path.
57411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57413      # a path prefixed by /cygdrive for fixpath to work.
57414      new_path="$CYGWIN_ROOT_PATH$input_path"
57415    fi
57416  fi
57417
57418
57419  if test "x$path" != "x$new_path"; then
57420    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57422$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57423  fi
57424
57425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57426
57427  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57428  has_colon=`$ECHO $path | $GREP ^.:`
57429  new_path="$path"
57430  if test "x$has_colon" = x; then
57431    # Not in mixed or Windows style, start by that.
57432    new_path=`cmd //c echo $path`
57433  fi
57434
57435
57436  input_path="$new_path"
57437  # Check if we need to convert this using DOS-style short mode. If the path
57438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57439  # take no chances and rewrite it.
57440  # Note: m4 eats our [], so we need to use [ and ] instead.
57441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57442  if test "x$has_forbidden_chars" != x; then
57443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57445  fi
57446
57447
57448  windows_path="$new_path"
57449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57450    unix_path=`$CYGPATH -u "$windows_path"`
57451    new_path="$unix_path"
57452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57454    new_path="$unix_path"
57455  fi
57456
57457  if test "x$path" != "x$new_path"; then
57458    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57460$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57461  fi
57462
57463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57465
57466    else
57467      # We're on a unix platform. Hooray! :)
57468      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57469      has_space=`$ECHO "$path" | $GREP " "`
57470      if test "x$has_space" != x; then
57471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57472$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57473        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57474      fi
57475
57476      # Use eval to expand a potential ~
57477      eval path="$path"
57478      if test ! -f "$path" && test ! -d "$path"; then
57479        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57480      fi
57481
57482      if test -d "$path"; then
57483        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57484      else
57485        dir="`$DIRNAME "$path"`"
57486        base="`$BASENAME "$path"`"
57487        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57488      fi
57489    fi
57490  fi
57491
57492
57493  # Only process if variable expands to non-empty
57494
57495  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57496    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57497
57498  # Input might be given as Windows format, start by converting to
57499  # unix format.
57500  path="$POTENTIAL_FREETYPE_LIB_PATH"
57501  new_path=`$CYGPATH -u "$path"`
57502
57503  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57504  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57505  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57506  # "foo.exe" is OK but "foo" is an error.
57507  #
57508  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57509  # It is also a way to make sure we got the proper file name for the real test later on.
57510  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57511  if test "x$test_shortpath" = x; then
57512    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57513$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57514    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57515  fi
57516
57517  # Call helper function which possibly converts this using DOS-style short mode.
57518  # If so, the updated path is stored in $new_path.
57519
57520  input_path="$new_path"
57521  # Check if we need to convert this using DOS-style short mode. If the path
57522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57523  # take no chances and rewrite it.
57524  # Note: m4 eats our [], so we need to use [ and ] instead.
57525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57526  if test "x$has_forbidden_chars" != x; then
57527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57531      # Going to short mode and back again did indeed matter. Since short mode is
57532      # case insensitive, let's make it lowercase to improve readability.
57533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57534      # Now convert it back to Unix-style (cygpath)
57535      input_path=`$CYGPATH -u "$shortmode_path"`
57536      new_path="$input_path"
57537    fi
57538  fi
57539
57540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57541  if test "x$test_cygdrive_prefix" = x; then
57542    # As a simple fix, exclude /usr/bin since it's not a real path.
57543    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57545      # a path prefixed by /cygdrive for fixpath to work.
57546      new_path="$CYGWIN_ROOT_PATH$input_path"
57547    fi
57548  fi
57549
57550
57551  if test "x$path" != "x$new_path"; then
57552    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57554$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57555  fi
57556
57557    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57558
57559  path="$POTENTIAL_FREETYPE_LIB_PATH"
57560  has_colon=`$ECHO $path | $GREP ^.:`
57561  new_path="$path"
57562  if test "x$has_colon" = x; then
57563    # Not in mixed or Windows style, start by that.
57564    new_path=`cmd //c echo $path`
57565  fi
57566
57567
57568  input_path="$new_path"
57569  # Check if we need to convert this using DOS-style short mode. If the path
57570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57571  # take no chances and rewrite it.
57572  # Note: m4 eats our [], so we need to use [ and ] instead.
57573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57574  if test "x$has_forbidden_chars" != x; then
57575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57576    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57577  fi
57578
57579
57580  windows_path="$new_path"
57581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57582    unix_path=`$CYGPATH -u "$windows_path"`
57583    new_path="$unix_path"
57584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57586    new_path="$unix_path"
57587  fi
57588
57589  if test "x$path" != "x$new_path"; then
57590    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57592$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57593  fi
57594
57595  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57596  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57597
57598    else
57599      # We're on a unix platform. Hooray! :)
57600      path="$POTENTIAL_FREETYPE_LIB_PATH"
57601      has_space=`$ECHO "$path" | $GREP " "`
57602      if test "x$has_space" != x; then
57603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57604$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57605        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57606      fi
57607
57608      # Use eval to expand a potential ~
57609      eval path="$path"
57610      if test ! -f "$path" && test ! -d "$path"; then
57611        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57612      fi
57613
57614      if test -d "$path"; then
57615        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57616      else
57617        dir="`$DIRNAME "$path"`"
57618        base="`$BASENAME "$path"`"
57619        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57620      fi
57621    fi
57622  fi
57623
57624
57625    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57627$as_echo_n "checking for freetype includes... " >&6; }
57628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57629$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57630    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57632$as_echo_n "checking for freetype libraries... " >&6; }
57633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57634$as_echo "$FREETYPE_LIB_PATH" >&6; }
57635  fi
57636
57637        if test "x$FOUND_FREETYPE" != xyes; then
57638          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57639        fi
57640      else
57641        # User specified only one of lib or include. This is an error.
57642        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57643          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57644$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57645          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57646        else
57647          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57648$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57649          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57650        fi
57651      fi
57652    else
57653      # User did not specify settings, but we need freetype. Try to locate it.
57654
57655      if test "x$BUNDLE_FREETYPE" = x; then
57656        # If not specified, default is to bundle freetype only on windows
57657        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57658          BUNDLE_FREETYPE=yes
57659        else
57660          BUNDLE_FREETYPE=no
57661        fi
57662      fi
57663
57664      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57665      if test "x$SYSROOT" = x; then
57666        if test "x$FOUND_FREETYPE" != xyes; then
57667          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57668          if test "x$PKG_CONFIG" != x; then
57669
57670pkg_failed=no
57671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57672$as_echo_n "checking for FREETYPE... " >&6; }
57673
57674if test -n "$FREETYPE_CFLAGS"; then
57675    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57676 elif test -n "$PKG_CONFIG"; then
57677    if test -n "$PKG_CONFIG" && \
57678    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57679  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57680  ac_status=$?
57681  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57682  test $ac_status = 0; }; then
57683  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57684else
57685  pkg_failed=yes
57686fi
57687 else
57688    pkg_failed=untried
57689fi
57690if test -n "$FREETYPE_LIBS"; then
57691    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57692 elif test -n "$PKG_CONFIG"; then
57693    if test -n "$PKG_CONFIG" && \
57694    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57695  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57696  ac_status=$?
57697  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57698  test $ac_status = 0; }; then
57699  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57700else
57701  pkg_failed=yes
57702fi
57703 else
57704    pkg_failed=untried
57705fi
57706
57707
57708
57709if test $pkg_failed = yes; then
57710
57711if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57712        _pkg_short_errors_supported=yes
57713else
57714        _pkg_short_errors_supported=no
57715fi
57716        if test $_pkg_short_errors_supported = yes; then
57717	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57718        else
57719	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57720        fi
57721	# Put the nasty error message in config.log where it belongs
57722	echo "$FREETYPE_PKG_ERRORS" >&5
57723
57724	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57725$as_echo "no" >&6; }
57726                FOUND_FREETYPE=no
57727elif test $pkg_failed = untried; then
57728	FOUND_FREETYPE=no
57729else
57730	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57731	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57733$as_echo "yes" >&6; }
57734	FOUND_FREETYPE=yes
57735fi
57736            if test "x$FOUND_FREETYPE" = xyes; then
57737              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57738              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57739              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57740              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57741                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57742              fi
57743              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57744              if test "x$BUNDLE_FREETYPE" = xyes; then
57745                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57746$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57747                FOUND_FREETYPE=no
57748              else
57749                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57750$as_echo_n "checking for freetype... " >&6; }
57751                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57752$as_echo "yes (using pkg-config)" >&6; }
57753              fi
57754            fi
57755          fi
57756        fi
57757      fi
57758
57759      if test "x$FOUND_FREETYPE" != xyes; then
57760        # Check in well-known locations
57761        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57762          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57763
57764  windows_path="$FREETYPE_BASE_DIR"
57765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57766    unix_path=`$CYGPATH -u "$windows_path"`
57767    FREETYPE_BASE_DIR="$unix_path"
57768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57770    FREETYPE_BASE_DIR="$unix_path"
57771  fi
57772
57773
57774  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57775  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57776  METHOD="well-known location"
57777
57778  # Let's start with an optimistic view of the world :-)
57779  FOUND_FREETYPE=yes
57780
57781  # First look for the canonical freetype main include file ft2build.h.
57782  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57783    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57784    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57785    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57786      # Fail.
57787      FOUND_FREETYPE=no
57788    fi
57789  fi
57790
57791  if test "x$FOUND_FREETYPE" = xyes; then
57792    # Include file found, let's continue the sanity check.
57793    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57794$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57795
57796    # Reset to default value
57797    FREETYPE_BASE_NAME=freetype
57798    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57799    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57800      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57801          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57802        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57803        # for the .6 version explicitly.
57804        FREETYPE_BASE_NAME=freetype.6
57805        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57806        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57807$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57808      else
57809        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57810$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57811        FOUND_FREETYPE=no
57812      fi
57813    else
57814      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57815        # On Windows, we will need both .lib and .dll file.
57816        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57817          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57818$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57819          FOUND_FREETYPE=no
57820        fi
57821      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57822          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57823        # Found lib in isa dir, use that instead.
57824        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57825        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57826$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57827      fi
57828    fi
57829  fi
57830
57831  if test "x$FOUND_FREETYPE" = xyes; then
57832
57833  # Only process if variable expands to non-empty
57834
57835  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57837
57838  # Input might be given as Windows format, start by converting to
57839  # unix format.
57840  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57841  new_path=`$CYGPATH -u "$path"`
57842
57843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57846  # "foo.exe" is OK but "foo" is an error.
57847  #
57848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57849  # It is also a way to make sure we got the proper file name for the real test later on.
57850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57851  if test "x$test_shortpath" = x; then
57852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57853$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57854    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57855  fi
57856
57857  # Call helper function which possibly converts this using DOS-style short mode.
57858  # If so, the updated path is stored in $new_path.
57859
57860  input_path="$new_path"
57861  # Check if we need to convert this using DOS-style short mode. If the path
57862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57863  # take no chances and rewrite it.
57864  # Note: m4 eats our [], so we need to use [ and ] instead.
57865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57866  if test "x$has_forbidden_chars" != x; then
57867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57871      # Going to short mode and back again did indeed matter. Since short mode is
57872      # case insensitive, let's make it lowercase to improve readability.
57873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57874      # Now convert it back to Unix-style (cygpath)
57875      input_path=`$CYGPATH -u "$shortmode_path"`
57876      new_path="$input_path"
57877    fi
57878  fi
57879
57880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57881  if test "x$test_cygdrive_prefix" = x; then
57882    # As a simple fix, exclude /usr/bin since it's not a real path.
57883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57885      # a path prefixed by /cygdrive for fixpath to work.
57886      new_path="$CYGWIN_ROOT_PATH$input_path"
57887    fi
57888  fi
57889
57890
57891  if test "x$path" != "x$new_path"; then
57892    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57894$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57895  fi
57896
57897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57898
57899  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57900  has_colon=`$ECHO $path | $GREP ^.:`
57901  new_path="$path"
57902  if test "x$has_colon" = x; then
57903    # Not in mixed or Windows style, start by that.
57904    new_path=`cmd //c echo $path`
57905  fi
57906
57907
57908  input_path="$new_path"
57909  # Check if we need to convert this using DOS-style short mode. If the path
57910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57911  # take no chances and rewrite it.
57912  # Note: m4 eats our [], so we need to use [ and ] instead.
57913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57914  if test "x$has_forbidden_chars" != x; then
57915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57917  fi
57918
57919
57920  windows_path="$new_path"
57921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57922    unix_path=`$CYGPATH -u "$windows_path"`
57923    new_path="$unix_path"
57924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57926    new_path="$unix_path"
57927  fi
57928
57929  if test "x$path" != "x$new_path"; then
57930    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57932$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57933  fi
57934
57935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57937
57938    else
57939      # We're on a unix platform. Hooray! :)
57940      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57941      has_space=`$ECHO "$path" | $GREP " "`
57942      if test "x$has_space" != x; then
57943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57944$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57945        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57946      fi
57947
57948      # Use eval to expand a potential ~
57949      eval path="$path"
57950      if test ! -f "$path" && test ! -d "$path"; then
57951        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57952      fi
57953
57954      if test -d "$path"; then
57955        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57956      else
57957        dir="`$DIRNAME "$path"`"
57958        base="`$BASENAME "$path"`"
57959        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57960      fi
57961    fi
57962  fi
57963
57964
57965  # Only process if variable expands to non-empty
57966
57967  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57969
57970  # Input might be given as Windows format, start by converting to
57971  # unix format.
57972  path="$POTENTIAL_FREETYPE_LIB_PATH"
57973  new_path=`$CYGPATH -u "$path"`
57974
57975  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57976  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57977  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57978  # "foo.exe" is OK but "foo" is an error.
57979  #
57980  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57981  # It is also a way to make sure we got the proper file name for the real test later on.
57982  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57983  if test "x$test_shortpath" = x; then
57984    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57985$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57986    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57987  fi
57988
57989  # Call helper function which possibly converts this using DOS-style short mode.
57990  # If so, the updated path is stored in $new_path.
57991
57992  input_path="$new_path"
57993  # Check if we need to convert this using DOS-style short mode. If the path
57994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57995  # take no chances and rewrite it.
57996  # Note: m4 eats our [], so we need to use [ and ] instead.
57997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57998  if test "x$has_forbidden_chars" != x; then
57999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58003      # Going to short mode and back again did indeed matter. Since short mode is
58004      # case insensitive, let's make it lowercase to improve readability.
58005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58006      # Now convert it back to Unix-style (cygpath)
58007      input_path=`$CYGPATH -u "$shortmode_path"`
58008      new_path="$input_path"
58009    fi
58010  fi
58011
58012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58013  if test "x$test_cygdrive_prefix" = x; then
58014    # As a simple fix, exclude /usr/bin since it's not a real path.
58015    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58017      # a path prefixed by /cygdrive for fixpath to work.
58018      new_path="$CYGWIN_ROOT_PATH$input_path"
58019    fi
58020  fi
58021
58022
58023  if test "x$path" != "x$new_path"; then
58024    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58026$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58027  fi
58028
58029    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58030
58031  path="$POTENTIAL_FREETYPE_LIB_PATH"
58032  has_colon=`$ECHO $path | $GREP ^.:`
58033  new_path="$path"
58034  if test "x$has_colon" = x; then
58035    # Not in mixed or Windows style, start by that.
58036    new_path=`cmd //c echo $path`
58037  fi
58038
58039
58040  input_path="$new_path"
58041  # Check if we need to convert this using DOS-style short mode. If the path
58042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58043  # take no chances and rewrite it.
58044  # Note: m4 eats our [], so we need to use [ and ] instead.
58045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58046  if test "x$has_forbidden_chars" != x; then
58047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58049  fi
58050
58051
58052  windows_path="$new_path"
58053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58054    unix_path=`$CYGPATH -u "$windows_path"`
58055    new_path="$unix_path"
58056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58058    new_path="$unix_path"
58059  fi
58060
58061  if test "x$path" != "x$new_path"; then
58062    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58064$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58065  fi
58066
58067  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58068  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58069
58070    else
58071      # We're on a unix platform. Hooray! :)
58072      path="$POTENTIAL_FREETYPE_LIB_PATH"
58073      has_space=`$ECHO "$path" | $GREP " "`
58074      if test "x$has_space" != x; then
58075        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58076$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58077        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58078      fi
58079
58080      # Use eval to expand a potential ~
58081      eval path="$path"
58082      if test ! -f "$path" && test ! -d "$path"; then
58083        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58084      fi
58085
58086      if test -d "$path"; then
58087        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58088      else
58089        dir="`$DIRNAME "$path"`"
58090        base="`$BASENAME "$path"`"
58091        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58092      fi
58093    fi
58094  fi
58095
58096
58097    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58099$as_echo_n "checking for freetype includes... " >&6; }
58100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58101$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58102    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58104$as_echo_n "checking for freetype libraries... " >&6; }
58105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58106$as_echo "$FREETYPE_LIB_PATH" >&6; }
58107  fi
58108
58109          if test "x$FOUND_FREETYPE" != xyes; then
58110            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58111
58112  windows_path="$FREETYPE_BASE_DIR"
58113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58114    unix_path=`$CYGPATH -u "$windows_path"`
58115    FREETYPE_BASE_DIR="$unix_path"
58116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58118    FREETYPE_BASE_DIR="$unix_path"
58119  fi
58120
58121
58122  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58123  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58124  METHOD="well-known location"
58125
58126  # Let's start with an optimistic view of the world :-)
58127  FOUND_FREETYPE=yes
58128
58129  # First look for the canonical freetype main include file ft2build.h.
58130  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58131    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58132    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58133    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58134      # Fail.
58135      FOUND_FREETYPE=no
58136    fi
58137  fi
58138
58139  if test "x$FOUND_FREETYPE" = xyes; then
58140    # Include file found, let's continue the sanity check.
58141    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58142$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58143
58144    # Reset to default value
58145    FREETYPE_BASE_NAME=freetype
58146    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58147    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58148      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58149          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58150        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58151        # for the .6 version explicitly.
58152        FREETYPE_BASE_NAME=freetype.6
58153        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58154        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58155$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58156      else
58157        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58158$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58159        FOUND_FREETYPE=no
58160      fi
58161    else
58162      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58163        # On Windows, we will need both .lib and .dll file.
58164        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58165          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58166$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58167          FOUND_FREETYPE=no
58168        fi
58169      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58170          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58171        # Found lib in isa dir, use that instead.
58172        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58173        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58174$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58175      fi
58176    fi
58177  fi
58178
58179  if test "x$FOUND_FREETYPE" = xyes; then
58180
58181  # Only process if variable expands to non-empty
58182
58183  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58185
58186  # Input might be given as Windows format, start by converting to
58187  # unix format.
58188  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58189  new_path=`$CYGPATH -u "$path"`
58190
58191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58194  # "foo.exe" is OK but "foo" is an error.
58195  #
58196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58197  # It is also a way to make sure we got the proper file name for the real test later on.
58198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58199  if test "x$test_shortpath" = x; then
58200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58201$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58202    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58203  fi
58204
58205  # Call helper function which possibly converts this using DOS-style short mode.
58206  # If so, the updated path is stored in $new_path.
58207
58208  input_path="$new_path"
58209  # Check if we need to convert this using DOS-style short mode. If the path
58210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58211  # take no chances and rewrite it.
58212  # Note: m4 eats our [], so we need to use [ and ] instead.
58213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58214  if test "x$has_forbidden_chars" != x; then
58215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58219      # Going to short mode and back again did indeed matter. Since short mode is
58220      # case insensitive, let's make it lowercase to improve readability.
58221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58222      # Now convert it back to Unix-style (cygpath)
58223      input_path=`$CYGPATH -u "$shortmode_path"`
58224      new_path="$input_path"
58225    fi
58226  fi
58227
58228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58229  if test "x$test_cygdrive_prefix" = x; then
58230    # As a simple fix, exclude /usr/bin since it's not a real path.
58231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58233      # a path prefixed by /cygdrive for fixpath to work.
58234      new_path="$CYGWIN_ROOT_PATH$input_path"
58235    fi
58236  fi
58237
58238
58239  if test "x$path" != "x$new_path"; then
58240    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58242$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58243  fi
58244
58245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58246
58247  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58248  has_colon=`$ECHO $path | $GREP ^.:`
58249  new_path="$path"
58250  if test "x$has_colon" = x; then
58251    # Not in mixed or Windows style, start by that.
58252    new_path=`cmd //c echo $path`
58253  fi
58254
58255
58256  input_path="$new_path"
58257  # Check if we need to convert this using DOS-style short mode. If the path
58258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58259  # take no chances and rewrite it.
58260  # Note: m4 eats our [], so we need to use [ and ] instead.
58261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58262  if test "x$has_forbidden_chars" != x; then
58263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58265  fi
58266
58267
58268  windows_path="$new_path"
58269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58270    unix_path=`$CYGPATH -u "$windows_path"`
58271    new_path="$unix_path"
58272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58274    new_path="$unix_path"
58275  fi
58276
58277  if test "x$path" != "x$new_path"; then
58278    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58280$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58281  fi
58282
58283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58285
58286    else
58287      # We're on a unix platform. Hooray! :)
58288      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58289      has_space=`$ECHO "$path" | $GREP " "`
58290      if test "x$has_space" != x; then
58291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58292$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58293        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58294      fi
58295
58296      # Use eval to expand a potential ~
58297      eval path="$path"
58298      if test ! -f "$path" && test ! -d "$path"; then
58299        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58300      fi
58301
58302      if test -d "$path"; then
58303        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58304      else
58305        dir="`$DIRNAME "$path"`"
58306        base="`$BASENAME "$path"`"
58307        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58308      fi
58309    fi
58310  fi
58311
58312
58313  # Only process if variable expands to non-empty
58314
58315  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58317
58318  # Input might be given as Windows format, start by converting to
58319  # unix format.
58320  path="$POTENTIAL_FREETYPE_LIB_PATH"
58321  new_path=`$CYGPATH -u "$path"`
58322
58323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58326  # "foo.exe" is OK but "foo" is an error.
58327  #
58328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58329  # It is also a way to make sure we got the proper file name for the real test later on.
58330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58331  if test "x$test_shortpath" = x; then
58332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58333$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58334    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58335  fi
58336
58337  # Call helper function which possibly converts this using DOS-style short mode.
58338  # If so, the updated path is stored in $new_path.
58339
58340  input_path="$new_path"
58341  # Check if we need to convert this using DOS-style short mode. If the path
58342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58343  # take no chances and rewrite it.
58344  # Note: m4 eats our [], so we need to use [ and ] instead.
58345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58346  if test "x$has_forbidden_chars" != x; then
58347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58351      # Going to short mode and back again did indeed matter. Since short mode is
58352      # case insensitive, let's make it lowercase to improve readability.
58353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58354      # Now convert it back to Unix-style (cygpath)
58355      input_path=`$CYGPATH -u "$shortmode_path"`
58356      new_path="$input_path"
58357    fi
58358  fi
58359
58360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58361  if test "x$test_cygdrive_prefix" = x; then
58362    # As a simple fix, exclude /usr/bin since it's not a real path.
58363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58365      # a path prefixed by /cygdrive for fixpath to work.
58366      new_path="$CYGWIN_ROOT_PATH$input_path"
58367    fi
58368  fi
58369
58370
58371  if test "x$path" != "x$new_path"; then
58372    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58374$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58375  fi
58376
58377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58378
58379  path="$POTENTIAL_FREETYPE_LIB_PATH"
58380  has_colon=`$ECHO $path | $GREP ^.:`
58381  new_path="$path"
58382  if test "x$has_colon" = x; then
58383    # Not in mixed or Windows style, start by that.
58384    new_path=`cmd //c echo $path`
58385  fi
58386
58387
58388  input_path="$new_path"
58389  # Check if we need to convert this using DOS-style short mode. If the path
58390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58391  # take no chances and rewrite it.
58392  # Note: m4 eats our [], so we need to use [ and ] instead.
58393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58394  if test "x$has_forbidden_chars" != x; then
58395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58397  fi
58398
58399
58400  windows_path="$new_path"
58401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58402    unix_path=`$CYGPATH -u "$windows_path"`
58403    new_path="$unix_path"
58404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58406    new_path="$unix_path"
58407  fi
58408
58409  if test "x$path" != "x$new_path"; then
58410    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58412$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58413  fi
58414
58415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58417
58418    else
58419      # We're on a unix platform. Hooray! :)
58420      path="$POTENTIAL_FREETYPE_LIB_PATH"
58421      has_space=`$ECHO "$path" | $GREP " "`
58422      if test "x$has_space" != x; then
58423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58424$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58426      fi
58427
58428      # Use eval to expand a potential ~
58429      eval path="$path"
58430      if test ! -f "$path" && test ! -d "$path"; then
58431        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58432      fi
58433
58434      if test -d "$path"; then
58435        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58436      else
58437        dir="`$DIRNAME "$path"`"
58438        base="`$BASENAME "$path"`"
58439        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58440      fi
58441    fi
58442  fi
58443
58444
58445    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58447$as_echo_n "checking for freetype includes... " >&6; }
58448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58449$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58450    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58451    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58452$as_echo_n "checking for freetype libraries... " >&6; }
58453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58454$as_echo "$FREETYPE_LIB_PATH" >&6; }
58455  fi
58456
58457          fi
58458          if test "x$FOUND_FREETYPE" != xyes; then
58459            FREETYPE_BASE_DIR="$HOME/freetype"
58460
58461  windows_path="$FREETYPE_BASE_DIR"
58462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58463    unix_path=`$CYGPATH -u "$windows_path"`
58464    FREETYPE_BASE_DIR="$unix_path"
58465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58467    FREETYPE_BASE_DIR="$unix_path"
58468  fi
58469
58470            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58471
58472  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58473  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58474  METHOD="well-known location"
58475
58476  # Let's start with an optimistic view of the world :-)
58477  FOUND_FREETYPE=yes
58478
58479  # First look for the canonical freetype main include file ft2build.h.
58480  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58481    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58482    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58483    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58484      # Fail.
58485      FOUND_FREETYPE=no
58486    fi
58487  fi
58488
58489  if test "x$FOUND_FREETYPE" = xyes; then
58490    # Include file found, let's continue the sanity check.
58491    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58492$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58493
58494    # Reset to default value
58495    FREETYPE_BASE_NAME=freetype
58496    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58497    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58498      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58499          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58500        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58501        # for the .6 version explicitly.
58502        FREETYPE_BASE_NAME=freetype.6
58503        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58504        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58505$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58506      else
58507        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58508$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58509        FOUND_FREETYPE=no
58510      fi
58511    else
58512      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58513        # On Windows, we will need both .lib and .dll file.
58514        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58515          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58516$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58517          FOUND_FREETYPE=no
58518        fi
58519      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58520          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58521        # Found lib in isa dir, use that instead.
58522        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58523        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58524$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58525      fi
58526    fi
58527  fi
58528
58529  if test "x$FOUND_FREETYPE" = xyes; then
58530
58531  # Only process if variable expands to non-empty
58532
58533  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58535
58536  # Input might be given as Windows format, start by converting to
58537  # unix format.
58538  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58539  new_path=`$CYGPATH -u "$path"`
58540
58541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58544  # "foo.exe" is OK but "foo" is an error.
58545  #
58546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58547  # It is also a way to make sure we got the proper file name for the real test later on.
58548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58549  if test "x$test_shortpath" = x; then
58550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58551$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58552    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58553  fi
58554
58555  # Call helper function which possibly converts this using DOS-style short mode.
58556  # If so, the updated path is stored in $new_path.
58557
58558  input_path="$new_path"
58559  # Check if we need to convert this using DOS-style short mode. If the path
58560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58561  # take no chances and rewrite it.
58562  # Note: m4 eats our [], so we need to use [ and ] instead.
58563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58564  if test "x$has_forbidden_chars" != x; then
58565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58569      # Going to short mode and back again did indeed matter. Since short mode is
58570      # case insensitive, let's make it lowercase to improve readability.
58571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58572      # Now convert it back to Unix-style (cygpath)
58573      input_path=`$CYGPATH -u "$shortmode_path"`
58574      new_path="$input_path"
58575    fi
58576  fi
58577
58578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58579  if test "x$test_cygdrive_prefix" = x; then
58580    # As a simple fix, exclude /usr/bin since it's not a real path.
58581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58583      # a path prefixed by /cygdrive for fixpath to work.
58584      new_path="$CYGWIN_ROOT_PATH$input_path"
58585    fi
58586  fi
58587
58588
58589  if test "x$path" != "x$new_path"; then
58590    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58592$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58593  fi
58594
58595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58596
58597  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58598  has_colon=`$ECHO $path | $GREP ^.:`
58599  new_path="$path"
58600  if test "x$has_colon" = x; then
58601    # Not in mixed or Windows style, start by that.
58602    new_path=`cmd //c echo $path`
58603  fi
58604
58605
58606  input_path="$new_path"
58607  # Check if we need to convert this using DOS-style short mode. If the path
58608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58609  # take no chances and rewrite it.
58610  # Note: m4 eats our [], so we need to use [ and ] instead.
58611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58612  if test "x$has_forbidden_chars" != x; then
58613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58615  fi
58616
58617
58618  windows_path="$new_path"
58619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58620    unix_path=`$CYGPATH -u "$windows_path"`
58621    new_path="$unix_path"
58622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58624    new_path="$unix_path"
58625  fi
58626
58627  if test "x$path" != "x$new_path"; then
58628    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58630$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58631  fi
58632
58633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58635
58636    else
58637      # We're on a unix platform. Hooray! :)
58638      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58639      has_space=`$ECHO "$path" | $GREP " "`
58640      if test "x$has_space" != x; then
58641        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58642$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58643        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58644      fi
58645
58646      # Use eval to expand a potential ~
58647      eval path="$path"
58648      if test ! -f "$path" && test ! -d "$path"; then
58649        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58650      fi
58651
58652      if test -d "$path"; then
58653        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58654      else
58655        dir="`$DIRNAME "$path"`"
58656        base="`$BASENAME "$path"`"
58657        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58658      fi
58659    fi
58660  fi
58661
58662
58663  # Only process if variable expands to non-empty
58664
58665  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58667
58668  # Input might be given as Windows format, start by converting to
58669  # unix format.
58670  path="$POTENTIAL_FREETYPE_LIB_PATH"
58671  new_path=`$CYGPATH -u "$path"`
58672
58673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58676  # "foo.exe" is OK but "foo" is an error.
58677  #
58678  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58679  # It is also a way to make sure we got the proper file name for the real test later on.
58680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58681  if test "x$test_shortpath" = x; then
58682    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58683$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58684    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58685  fi
58686
58687  # Call helper function which possibly converts this using DOS-style short mode.
58688  # If so, the updated path is stored in $new_path.
58689
58690  input_path="$new_path"
58691  # Check if we need to convert this using DOS-style short mode. If the path
58692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58693  # take no chances and rewrite it.
58694  # Note: m4 eats our [], so we need to use [ and ] instead.
58695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58696  if test "x$has_forbidden_chars" != x; then
58697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58701      # Going to short mode and back again did indeed matter. Since short mode is
58702      # case insensitive, let's make it lowercase to improve readability.
58703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58704      # Now convert it back to Unix-style (cygpath)
58705      input_path=`$CYGPATH -u "$shortmode_path"`
58706      new_path="$input_path"
58707    fi
58708  fi
58709
58710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58711  if test "x$test_cygdrive_prefix" = x; then
58712    # As a simple fix, exclude /usr/bin since it's not a real path.
58713    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58715      # a path prefixed by /cygdrive for fixpath to work.
58716      new_path="$CYGWIN_ROOT_PATH$input_path"
58717    fi
58718  fi
58719
58720
58721  if test "x$path" != "x$new_path"; then
58722    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58724$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58725  fi
58726
58727    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58728
58729  path="$POTENTIAL_FREETYPE_LIB_PATH"
58730  has_colon=`$ECHO $path | $GREP ^.:`
58731  new_path="$path"
58732  if test "x$has_colon" = x; then
58733    # Not in mixed or Windows style, start by that.
58734    new_path=`cmd //c echo $path`
58735  fi
58736
58737
58738  input_path="$new_path"
58739  # Check if we need to convert this using DOS-style short mode. If the path
58740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58741  # take no chances and rewrite it.
58742  # Note: m4 eats our [], so we need to use [ and ] instead.
58743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58744  if test "x$has_forbidden_chars" != x; then
58745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58747  fi
58748
58749
58750  windows_path="$new_path"
58751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58752    unix_path=`$CYGPATH -u "$windows_path"`
58753    new_path="$unix_path"
58754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58756    new_path="$unix_path"
58757  fi
58758
58759  if test "x$path" != "x$new_path"; then
58760    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58762$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58763  fi
58764
58765  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58766  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58767
58768    else
58769      # We're on a unix platform. Hooray! :)
58770      path="$POTENTIAL_FREETYPE_LIB_PATH"
58771      has_space=`$ECHO "$path" | $GREP " "`
58772      if test "x$has_space" != x; then
58773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58774$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58775        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58776      fi
58777
58778      # Use eval to expand a potential ~
58779      eval path="$path"
58780      if test ! -f "$path" && test ! -d "$path"; then
58781        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58782      fi
58783
58784      if test -d "$path"; then
58785        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58786      else
58787        dir="`$DIRNAME "$path"`"
58788        base="`$BASENAME "$path"`"
58789        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58790      fi
58791    fi
58792  fi
58793
58794
58795    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58797$as_echo_n "checking for freetype includes... " >&6; }
58798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58799$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58800    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58802$as_echo_n "checking for freetype libraries... " >&6; }
58803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58804$as_echo "$FREETYPE_LIB_PATH" >&6; }
58805  fi
58806
58807            else
58808
58809  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58810  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58811  METHOD="well-known location"
58812
58813  # Let's start with an optimistic view of the world :-)
58814  FOUND_FREETYPE=yes
58815
58816  # First look for the canonical freetype main include file ft2build.h.
58817  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58818    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58819    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58820    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58821      # Fail.
58822      FOUND_FREETYPE=no
58823    fi
58824  fi
58825
58826  if test "x$FOUND_FREETYPE" = xyes; then
58827    # Include file found, let's continue the sanity check.
58828    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58829$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58830
58831    # Reset to default value
58832    FREETYPE_BASE_NAME=freetype
58833    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58834    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58835      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58836          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58837        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58838        # for the .6 version explicitly.
58839        FREETYPE_BASE_NAME=freetype.6
58840        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58841        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58842$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58843      else
58844        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58845$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58846        FOUND_FREETYPE=no
58847      fi
58848    else
58849      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58850        # On Windows, we will need both .lib and .dll file.
58851        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58852          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58853$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58854          FOUND_FREETYPE=no
58855        fi
58856      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58857          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58858        # Found lib in isa dir, use that instead.
58859        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58860        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58861$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58862      fi
58863    fi
58864  fi
58865
58866  if test "x$FOUND_FREETYPE" = xyes; then
58867
58868  # Only process if variable expands to non-empty
58869
58870  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58871    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58872
58873  # Input might be given as Windows format, start by converting to
58874  # unix format.
58875  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58876  new_path=`$CYGPATH -u "$path"`
58877
58878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58881  # "foo.exe" is OK but "foo" is an error.
58882  #
58883  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58884  # It is also a way to make sure we got the proper file name for the real test later on.
58885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58886  if test "x$test_shortpath" = x; then
58887    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58888$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58889    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58890  fi
58891
58892  # Call helper function which possibly converts this using DOS-style short mode.
58893  # If so, the updated path is stored in $new_path.
58894
58895  input_path="$new_path"
58896  # Check if we need to convert this using DOS-style short mode. If the path
58897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58898  # take no chances and rewrite it.
58899  # Note: m4 eats our [], so we need to use [ and ] instead.
58900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58901  if test "x$has_forbidden_chars" != x; then
58902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58906      # Going to short mode and back again did indeed matter. Since short mode is
58907      # case insensitive, let's make it lowercase to improve readability.
58908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58909      # Now convert it back to Unix-style (cygpath)
58910      input_path=`$CYGPATH -u "$shortmode_path"`
58911      new_path="$input_path"
58912    fi
58913  fi
58914
58915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58916  if test "x$test_cygdrive_prefix" = x; then
58917    # As a simple fix, exclude /usr/bin since it's not a real path.
58918    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58920      # a path prefixed by /cygdrive for fixpath to work.
58921      new_path="$CYGWIN_ROOT_PATH$input_path"
58922    fi
58923  fi
58924
58925
58926  if test "x$path" != "x$new_path"; then
58927    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58929$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58930  fi
58931
58932    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58933
58934  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58935  has_colon=`$ECHO $path | $GREP ^.:`
58936  new_path="$path"
58937  if test "x$has_colon" = x; then
58938    # Not in mixed or Windows style, start by that.
58939    new_path=`cmd //c echo $path`
58940  fi
58941
58942
58943  input_path="$new_path"
58944  # Check if we need to convert this using DOS-style short mode. If the path
58945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58946  # take no chances and rewrite it.
58947  # Note: m4 eats our [], so we need to use [ and ] instead.
58948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58949  if test "x$has_forbidden_chars" != x; then
58950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58952  fi
58953
58954
58955  windows_path="$new_path"
58956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58957    unix_path=`$CYGPATH -u "$windows_path"`
58958    new_path="$unix_path"
58959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58961    new_path="$unix_path"
58962  fi
58963
58964  if test "x$path" != "x$new_path"; then
58965    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58967$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58968  fi
58969
58970  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58971  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58972
58973    else
58974      # We're on a unix platform. Hooray! :)
58975      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58976      has_space=`$ECHO "$path" | $GREP " "`
58977      if test "x$has_space" != x; then
58978        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58979$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58980        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58981      fi
58982
58983      # Use eval to expand a potential ~
58984      eval path="$path"
58985      if test ! -f "$path" && test ! -d "$path"; then
58986        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58987      fi
58988
58989      if test -d "$path"; then
58990        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58991      else
58992        dir="`$DIRNAME "$path"`"
58993        base="`$BASENAME "$path"`"
58994        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58995      fi
58996    fi
58997  fi
58998
58999
59000  # Only process if variable expands to non-empty
59001
59002  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59003    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59004
59005  # Input might be given as Windows format, start by converting to
59006  # unix format.
59007  path="$POTENTIAL_FREETYPE_LIB_PATH"
59008  new_path=`$CYGPATH -u "$path"`
59009
59010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59013  # "foo.exe" is OK but "foo" is an error.
59014  #
59015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59016  # It is also a way to make sure we got the proper file name for the real test later on.
59017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59018  if test "x$test_shortpath" = x; then
59019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59020$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59021    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59022  fi
59023
59024  # Call helper function which possibly converts this using DOS-style short mode.
59025  # If so, the updated path is stored in $new_path.
59026
59027  input_path="$new_path"
59028  # Check if we need to convert this using DOS-style short mode. If the path
59029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59030  # take no chances and rewrite it.
59031  # Note: m4 eats our [], so we need to use [ and ] instead.
59032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59033  if test "x$has_forbidden_chars" != x; then
59034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59038      # Going to short mode and back again did indeed matter. Since short mode is
59039      # case insensitive, let's make it lowercase to improve readability.
59040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59041      # Now convert it back to Unix-style (cygpath)
59042      input_path=`$CYGPATH -u "$shortmode_path"`
59043      new_path="$input_path"
59044    fi
59045  fi
59046
59047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59048  if test "x$test_cygdrive_prefix" = x; then
59049    # As a simple fix, exclude /usr/bin since it's not a real path.
59050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59052      # a path prefixed by /cygdrive for fixpath to work.
59053      new_path="$CYGWIN_ROOT_PATH$input_path"
59054    fi
59055  fi
59056
59057
59058  if test "x$path" != "x$new_path"; then
59059    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59061$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59062  fi
59063
59064    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59065
59066  path="$POTENTIAL_FREETYPE_LIB_PATH"
59067  has_colon=`$ECHO $path | $GREP ^.:`
59068  new_path="$path"
59069  if test "x$has_colon" = x; then
59070    # Not in mixed or Windows style, start by that.
59071    new_path=`cmd //c echo $path`
59072  fi
59073
59074
59075  input_path="$new_path"
59076  # Check if we need to convert this using DOS-style short mode. If the path
59077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59078  # take no chances and rewrite it.
59079  # Note: m4 eats our [], so we need to use [ and ] instead.
59080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59081  if test "x$has_forbidden_chars" != x; then
59082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59084  fi
59085
59086
59087  windows_path="$new_path"
59088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59089    unix_path=`$CYGPATH -u "$windows_path"`
59090    new_path="$unix_path"
59091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59093    new_path="$unix_path"
59094  fi
59095
59096  if test "x$path" != "x$new_path"; then
59097    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59099$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59100  fi
59101
59102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59104
59105    else
59106      # We're on a unix platform. Hooray! :)
59107      path="$POTENTIAL_FREETYPE_LIB_PATH"
59108      has_space=`$ECHO "$path" | $GREP " "`
59109      if test "x$has_space" != x; then
59110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59111$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59112        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59113      fi
59114
59115      # Use eval to expand a potential ~
59116      eval path="$path"
59117      if test ! -f "$path" && test ! -d "$path"; then
59118        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59119      fi
59120
59121      if test -d "$path"; then
59122        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59123      else
59124        dir="`$DIRNAME "$path"`"
59125        base="`$BASENAME "$path"`"
59126        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59127      fi
59128    fi
59129  fi
59130
59131
59132    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59134$as_echo_n "checking for freetype includes... " >&6; }
59135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59136$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59137    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59139$as_echo_n "checking for freetype libraries... " >&6; }
59140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59141$as_echo "$FREETYPE_LIB_PATH" >&6; }
59142  fi
59143
59144            fi
59145            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59146                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59147              # Source is available, as a last resort try to build freetype in default location
59148
59149  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59150  BUILD_FREETYPE=yes
59151
59152  # Check if the freetype sources are acessible..
59153  if ! test -d $FREETYPE_SRC_PATH; then
59154    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
59155$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59156    BUILD_FREETYPE=no
59157  fi
59158  # ..and contain a vc2010 project file
59159  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59160  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59161    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
59162$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59163    BUILD_FREETYPE=no
59164  fi
59165  # Now check if configure found a version of 'msbuild.exe'
59166  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59167    { $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
59168$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;}
59169    BUILD_FREETYPE=no
59170  fi
59171
59172  # Ready to go..
59173  if test "x$BUILD_FREETYPE" = xyes; then
59174    # msbuild requires trailing slashes for output directories
59175    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59176    freetype_lib_path_unix="$freetype_lib_path"
59177    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59178
59179  unix_path="$vcxproj_path"
59180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59181    windows_path=`$CYGPATH -m "$unix_path"`
59182    vcxproj_path="$windows_path"
59183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59184    windows_path=`cmd //c echo $unix_path`
59185    vcxproj_path="$windows_path"
59186  fi
59187
59188
59189  unix_path="$freetype_lib_path"
59190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59191    windows_path=`$CYGPATH -m "$unix_path"`
59192    freetype_lib_path="$windows_path"
59193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59194    windows_path=`cmd //c echo $unix_path`
59195    freetype_lib_path="$windows_path"
59196  fi
59197
59198
59199  unix_path="$freetype_obj_path"
59200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59201    windows_path=`$CYGPATH -m "$unix_path"`
59202    freetype_obj_path="$windows_path"
59203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59204    windows_path=`cmd //c echo $unix_path`
59205    freetype_obj_path="$windows_path"
59206  fi
59207
59208    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59209      freetype_platform=x64
59210    else
59211      freetype_platform=win32
59212    fi
59213
59214    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59215    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59216    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59217    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59218    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59219$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59220
59221    # First we try to build the freetype.dll
59222    $ECHO -e "@echo off\n"\
59223        "$MSBUILD $vcxproj_path "\
59224        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59225        "/p:Configuration=\"Release Multithreaded\" "\
59226        "/p:Platform=$freetype_platform "\
59227        "/p:ConfigurationType=DynamicLibrary "\
59228        "/p:TargetName=freetype "\
59229        "/p:OutDir=\"$freetype_lib_path\" "\
59230        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59231    cmd /c freetype.bat
59232
59233    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59234      # If that succeeds we also build freetype.lib
59235      $ECHO -e "@echo off\n"\
59236          "$MSBUILD $vcxproj_path "\
59237          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59238          "/p:Configuration=\"Release Multithreaded\" "\
59239          "/p:Platform=$freetype_platform "\
59240          "/p:ConfigurationType=StaticLibrary "\
59241          "/p:TargetName=freetype "\
59242          "/p:OutDir=\"$freetype_lib_path\" "\
59243          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59244      cmd /c freetype.bat
59245
59246      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59247        # Once we build both, lib and dll, set freetype lib and include path appropriately
59248        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59249        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59250        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59251$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59252      else
59253        BUILD_FREETYPE=no
59254      fi
59255    else
59256      BUILD_FREETYPE=no
59257    fi
59258  fi
59259
59260              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59261
59262  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59263  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59264  METHOD="well-known location"
59265
59266  # Let's start with an optimistic view of the world :-)
59267  FOUND_FREETYPE=yes
59268
59269  # First look for the canonical freetype main include file ft2build.h.
59270  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59271    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59272    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59273    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59274      # Fail.
59275      FOUND_FREETYPE=no
59276    fi
59277  fi
59278
59279  if test "x$FOUND_FREETYPE" = xyes; then
59280    # Include file found, let's continue the sanity check.
59281    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59282$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59283
59284    # Reset to default value
59285    FREETYPE_BASE_NAME=freetype
59286    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59287    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59288      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59289          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59290        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59291        # for the .6 version explicitly.
59292        FREETYPE_BASE_NAME=freetype.6
59293        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59294        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59295$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59296      else
59297        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59298$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59299        FOUND_FREETYPE=no
59300      fi
59301    else
59302      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59303        # On Windows, we will need both .lib and .dll file.
59304        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59305          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59306$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59307          FOUND_FREETYPE=no
59308        fi
59309      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59310          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59311        # Found lib in isa dir, use that instead.
59312        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59313        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59314$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59315      fi
59316    fi
59317  fi
59318
59319  if test "x$FOUND_FREETYPE" = xyes; then
59320
59321  # Only process if variable expands to non-empty
59322
59323  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59325
59326  # Input might be given as Windows format, start by converting to
59327  # unix format.
59328  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59329  new_path=`$CYGPATH -u "$path"`
59330
59331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59334  # "foo.exe" is OK but "foo" is an error.
59335  #
59336  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59337  # It is also a way to make sure we got the proper file name for the real test later on.
59338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59339  if test "x$test_shortpath" = x; then
59340    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59341$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59342    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59343  fi
59344
59345  # Call helper function which possibly converts this using DOS-style short mode.
59346  # If so, the updated path is stored in $new_path.
59347
59348  input_path="$new_path"
59349  # Check if we need to convert this using DOS-style short mode. If the path
59350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59351  # take no chances and rewrite it.
59352  # Note: m4 eats our [], so we need to use [ and ] instead.
59353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59354  if test "x$has_forbidden_chars" != x; then
59355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59359      # Going to short mode and back again did indeed matter. Since short mode is
59360      # case insensitive, let's make it lowercase to improve readability.
59361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59362      # Now convert it back to Unix-style (cygpath)
59363      input_path=`$CYGPATH -u "$shortmode_path"`
59364      new_path="$input_path"
59365    fi
59366  fi
59367
59368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59369  if test "x$test_cygdrive_prefix" = x; then
59370    # As a simple fix, exclude /usr/bin since it's not a real path.
59371    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59373      # a path prefixed by /cygdrive for fixpath to work.
59374      new_path="$CYGWIN_ROOT_PATH$input_path"
59375    fi
59376  fi
59377
59378
59379  if test "x$path" != "x$new_path"; then
59380    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59382$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59383  fi
59384
59385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59386
59387  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59388  has_colon=`$ECHO $path | $GREP ^.:`
59389  new_path="$path"
59390  if test "x$has_colon" = x; then
59391    # Not in mixed or Windows style, start by that.
59392    new_path=`cmd //c echo $path`
59393  fi
59394
59395
59396  input_path="$new_path"
59397  # Check if we need to convert this using DOS-style short mode. If the path
59398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59399  # take no chances and rewrite it.
59400  # Note: m4 eats our [], so we need to use [ and ] instead.
59401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59402  if test "x$has_forbidden_chars" != x; then
59403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59405  fi
59406
59407
59408  windows_path="$new_path"
59409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59410    unix_path=`$CYGPATH -u "$windows_path"`
59411    new_path="$unix_path"
59412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59414    new_path="$unix_path"
59415  fi
59416
59417  if test "x$path" != "x$new_path"; then
59418    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59420$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59421  fi
59422
59423  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59424  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59425
59426    else
59427      # We're on a unix platform. Hooray! :)
59428      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59429      has_space=`$ECHO "$path" | $GREP " "`
59430      if test "x$has_space" != x; then
59431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59432$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59433        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59434      fi
59435
59436      # Use eval to expand a potential ~
59437      eval path="$path"
59438      if test ! -f "$path" && test ! -d "$path"; then
59439        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59440      fi
59441
59442      if test -d "$path"; then
59443        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59444      else
59445        dir="`$DIRNAME "$path"`"
59446        base="`$BASENAME "$path"`"
59447        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59448      fi
59449    fi
59450  fi
59451
59452
59453  # Only process if variable expands to non-empty
59454
59455  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59457
59458  # Input might be given as Windows format, start by converting to
59459  # unix format.
59460  path="$POTENTIAL_FREETYPE_LIB_PATH"
59461  new_path=`$CYGPATH -u "$path"`
59462
59463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59466  # "foo.exe" is OK but "foo" is an error.
59467  #
59468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59469  # It is also a way to make sure we got the proper file name for the real test later on.
59470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59471  if test "x$test_shortpath" = x; then
59472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59473$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59474    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59475  fi
59476
59477  # Call helper function which possibly converts this using DOS-style short mode.
59478  # If so, the updated path is stored in $new_path.
59479
59480  input_path="$new_path"
59481  # Check if we need to convert this using DOS-style short mode. If the path
59482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59483  # take no chances and rewrite it.
59484  # Note: m4 eats our [], so we need to use [ and ] instead.
59485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59486  if test "x$has_forbidden_chars" != x; then
59487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59491      # Going to short mode and back again did indeed matter. Since short mode is
59492      # case insensitive, let's make it lowercase to improve readability.
59493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59494      # Now convert it back to Unix-style (cygpath)
59495      input_path=`$CYGPATH -u "$shortmode_path"`
59496      new_path="$input_path"
59497    fi
59498  fi
59499
59500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59501  if test "x$test_cygdrive_prefix" = x; then
59502    # As a simple fix, exclude /usr/bin since it's not a real path.
59503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59505      # a path prefixed by /cygdrive for fixpath to work.
59506      new_path="$CYGWIN_ROOT_PATH$input_path"
59507    fi
59508  fi
59509
59510
59511  if test "x$path" != "x$new_path"; then
59512    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59514$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59515  fi
59516
59517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59518
59519  path="$POTENTIAL_FREETYPE_LIB_PATH"
59520  has_colon=`$ECHO $path | $GREP ^.:`
59521  new_path="$path"
59522  if test "x$has_colon" = x; then
59523    # Not in mixed or Windows style, start by that.
59524    new_path=`cmd //c echo $path`
59525  fi
59526
59527
59528  input_path="$new_path"
59529  # Check if we need to convert this using DOS-style short mode. If the path
59530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59531  # take no chances and rewrite it.
59532  # Note: m4 eats our [], so we need to use [ and ] instead.
59533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59534  if test "x$has_forbidden_chars" != x; then
59535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59537  fi
59538
59539
59540  windows_path="$new_path"
59541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59542    unix_path=`$CYGPATH -u "$windows_path"`
59543    new_path="$unix_path"
59544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59546    new_path="$unix_path"
59547  fi
59548
59549  if test "x$path" != "x$new_path"; then
59550    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59552$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59553  fi
59554
59555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59557
59558    else
59559      # We're on a unix platform. Hooray! :)
59560      path="$POTENTIAL_FREETYPE_LIB_PATH"
59561      has_space=`$ECHO "$path" | $GREP " "`
59562      if test "x$has_space" != x; then
59563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59564$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59565        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59566      fi
59567
59568      # Use eval to expand a potential ~
59569      eval path="$path"
59570      if test ! -f "$path" && test ! -d "$path"; then
59571        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59572      fi
59573
59574      if test -d "$path"; then
59575        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59576      else
59577        dir="`$DIRNAME "$path"`"
59578        base="`$BASENAME "$path"`"
59579        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59580      fi
59581    fi
59582  fi
59583
59584
59585    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59586    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59587$as_echo_n "checking for freetype includes... " >&6; }
59588    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59589$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59590    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59591    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59592$as_echo_n "checking for freetype libraries... " >&6; }
59593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59594$as_echo "$FREETYPE_LIB_PATH" >&6; }
59595  fi
59596
59597              else
59598
59599  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59600  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59601  METHOD="well-known location"
59602
59603  # Let's start with an optimistic view of the world :-)
59604  FOUND_FREETYPE=yes
59605
59606  # First look for the canonical freetype main include file ft2build.h.
59607  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59608    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59609    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59610    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59611      # Fail.
59612      FOUND_FREETYPE=no
59613    fi
59614  fi
59615
59616  if test "x$FOUND_FREETYPE" = xyes; then
59617    # Include file found, let's continue the sanity check.
59618    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59619$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59620
59621    # Reset to default value
59622    FREETYPE_BASE_NAME=freetype
59623    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59624    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59625      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59626          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59627        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59628        # for the .6 version explicitly.
59629        FREETYPE_BASE_NAME=freetype.6
59630        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59631        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59632$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59633      else
59634        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59635$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59636        FOUND_FREETYPE=no
59637      fi
59638    else
59639      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59640        # On Windows, we will need both .lib and .dll file.
59641        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59642          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59643$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59644          FOUND_FREETYPE=no
59645        fi
59646      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59647          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59648        # Found lib in isa dir, use that instead.
59649        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59650        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59651$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59652      fi
59653    fi
59654  fi
59655
59656  if test "x$FOUND_FREETYPE" = xyes; then
59657
59658  # Only process if variable expands to non-empty
59659
59660  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59662
59663  # Input might be given as Windows format, start by converting to
59664  # unix format.
59665  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59666  new_path=`$CYGPATH -u "$path"`
59667
59668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59671  # "foo.exe" is OK but "foo" is an error.
59672  #
59673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59674  # It is also a way to make sure we got the proper file name for the real test later on.
59675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59676  if test "x$test_shortpath" = x; then
59677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59678$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59679    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59680  fi
59681
59682  # Call helper function which possibly converts this using DOS-style short mode.
59683  # If so, the updated path is stored in $new_path.
59684
59685  input_path="$new_path"
59686  # Check if we need to convert this using DOS-style short mode. If the path
59687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59688  # take no chances and rewrite it.
59689  # Note: m4 eats our [], so we need to use [ and ] instead.
59690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59691  if test "x$has_forbidden_chars" != x; then
59692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59696      # Going to short mode and back again did indeed matter. Since short mode is
59697      # case insensitive, let's make it lowercase to improve readability.
59698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59699      # Now convert it back to Unix-style (cygpath)
59700      input_path=`$CYGPATH -u "$shortmode_path"`
59701      new_path="$input_path"
59702    fi
59703  fi
59704
59705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59706  if test "x$test_cygdrive_prefix" = x; then
59707    # As a simple fix, exclude /usr/bin since it's not a real path.
59708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59710      # a path prefixed by /cygdrive for fixpath to work.
59711      new_path="$CYGWIN_ROOT_PATH$input_path"
59712    fi
59713  fi
59714
59715
59716  if test "x$path" != "x$new_path"; then
59717    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59720  fi
59721
59722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59723
59724  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59725  has_colon=`$ECHO $path | $GREP ^.:`
59726  new_path="$path"
59727  if test "x$has_colon" = x; then
59728    # Not in mixed or Windows style, start by that.
59729    new_path=`cmd //c echo $path`
59730  fi
59731
59732
59733  input_path="$new_path"
59734  # Check if we need to convert this using DOS-style short mode. If the path
59735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59736  # take no chances and rewrite it.
59737  # Note: m4 eats our [], so we need to use [ and ] instead.
59738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59739  if test "x$has_forbidden_chars" != x; then
59740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59742  fi
59743
59744
59745  windows_path="$new_path"
59746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59747    unix_path=`$CYGPATH -u "$windows_path"`
59748    new_path="$unix_path"
59749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59751    new_path="$unix_path"
59752  fi
59753
59754  if test "x$path" != "x$new_path"; then
59755    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59758  fi
59759
59760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59762
59763    else
59764      # We're on a unix platform. Hooray! :)
59765      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59766      has_space=`$ECHO "$path" | $GREP " "`
59767      if test "x$has_space" != x; then
59768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59771      fi
59772
59773      # Use eval to expand a potential ~
59774      eval path="$path"
59775      if test ! -f "$path" && test ! -d "$path"; then
59776        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59777      fi
59778
59779      if test -d "$path"; then
59780        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59781      else
59782        dir="`$DIRNAME "$path"`"
59783        base="`$BASENAME "$path"`"
59784        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59785      fi
59786    fi
59787  fi
59788
59789
59790  # Only process if variable expands to non-empty
59791
59792  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59794
59795  # Input might be given as Windows format, start by converting to
59796  # unix format.
59797  path="$POTENTIAL_FREETYPE_LIB_PATH"
59798  new_path=`$CYGPATH -u "$path"`
59799
59800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59803  # "foo.exe" is OK but "foo" is an error.
59804  #
59805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59806  # It is also a way to make sure we got the proper file name for the real test later on.
59807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59808  if test "x$test_shortpath" = x; then
59809    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59810$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59811    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59812  fi
59813
59814  # Call helper function which possibly converts this using DOS-style short mode.
59815  # If so, the updated path is stored in $new_path.
59816
59817  input_path="$new_path"
59818  # Check if we need to convert this using DOS-style short mode. If the path
59819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59820  # take no chances and rewrite it.
59821  # Note: m4 eats our [], so we need to use [ and ] instead.
59822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59823  if test "x$has_forbidden_chars" != x; then
59824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59828      # Going to short mode and back again did indeed matter. Since short mode is
59829      # case insensitive, let's make it lowercase to improve readability.
59830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59831      # Now convert it back to Unix-style (cygpath)
59832      input_path=`$CYGPATH -u "$shortmode_path"`
59833      new_path="$input_path"
59834    fi
59835  fi
59836
59837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59838  if test "x$test_cygdrive_prefix" = x; then
59839    # As a simple fix, exclude /usr/bin since it's not a real path.
59840    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59842      # a path prefixed by /cygdrive for fixpath to work.
59843      new_path="$CYGWIN_ROOT_PATH$input_path"
59844    fi
59845  fi
59846
59847
59848  if test "x$path" != "x$new_path"; then
59849    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59851$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59852  fi
59853
59854    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59855
59856  path="$POTENTIAL_FREETYPE_LIB_PATH"
59857  has_colon=`$ECHO $path | $GREP ^.:`
59858  new_path="$path"
59859  if test "x$has_colon" = x; then
59860    # Not in mixed or Windows style, start by that.
59861    new_path=`cmd //c echo $path`
59862  fi
59863
59864
59865  input_path="$new_path"
59866  # Check if we need to convert this using DOS-style short mode. If the path
59867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59868  # take no chances and rewrite it.
59869  # Note: m4 eats our [], so we need to use [ and ] instead.
59870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59871  if test "x$has_forbidden_chars" != x; then
59872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59874  fi
59875
59876
59877  windows_path="$new_path"
59878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59879    unix_path=`$CYGPATH -u "$windows_path"`
59880    new_path="$unix_path"
59881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59883    new_path="$unix_path"
59884  fi
59885
59886  if test "x$path" != "x$new_path"; then
59887    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59889$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59890  fi
59891
59892  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59893  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59894
59895    else
59896      # We're on a unix platform. Hooray! :)
59897      path="$POTENTIAL_FREETYPE_LIB_PATH"
59898      has_space=`$ECHO "$path" | $GREP " "`
59899      if test "x$has_space" != x; then
59900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59901$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59902        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59903      fi
59904
59905      # Use eval to expand a potential ~
59906      eval path="$path"
59907      if test ! -f "$path" && test ! -d "$path"; then
59908        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59909      fi
59910
59911      if test -d "$path"; then
59912        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59913      else
59914        dir="`$DIRNAME "$path"`"
59915        base="`$BASENAME "$path"`"
59916        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59917      fi
59918    fi
59919  fi
59920
59921
59922    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59924$as_echo_n "checking for freetype includes... " >&6; }
59925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59926$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59927    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59928    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59929$as_echo_n "checking for freetype libraries... " >&6; }
59930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59931$as_echo "$FREETYPE_LIB_PATH" >&6; }
59932  fi
59933
59934              fi
59935            fi
59936          fi
59937        else
59938          FREETYPE_BASE_DIR="$SYSROOT/usr"
59939
59940  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59941  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59942  METHOD="well-known location"
59943
59944  # Let's start with an optimistic view of the world :-)
59945  FOUND_FREETYPE=yes
59946
59947  # First look for the canonical freetype main include file ft2build.h.
59948  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59949    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59950    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59951    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59952      # Fail.
59953      FOUND_FREETYPE=no
59954    fi
59955  fi
59956
59957  if test "x$FOUND_FREETYPE" = xyes; then
59958    # Include file found, let's continue the sanity check.
59959    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59960$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59961
59962    # Reset to default value
59963    FREETYPE_BASE_NAME=freetype
59964    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59965    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59966      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59967          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59968        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59969        # for the .6 version explicitly.
59970        FREETYPE_BASE_NAME=freetype.6
59971        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59972        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59973$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59974      else
59975        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59976$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59977        FOUND_FREETYPE=no
59978      fi
59979    else
59980      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59981        # On Windows, we will need both .lib and .dll file.
59982        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59983          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59984$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59985          FOUND_FREETYPE=no
59986        fi
59987      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59988          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59989        # Found lib in isa dir, use that instead.
59990        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59991        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59992$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59993      fi
59994    fi
59995  fi
59996
59997  if test "x$FOUND_FREETYPE" = xyes; then
59998
59999  # Only process if variable expands to non-empty
60000
60001  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60003
60004  # Input might be given as Windows format, start by converting to
60005  # unix format.
60006  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60007  new_path=`$CYGPATH -u "$path"`
60008
60009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60012  # "foo.exe" is OK but "foo" is an error.
60013  #
60014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60015  # It is also a way to make sure we got the proper file name for the real test later on.
60016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60017  if test "x$test_shortpath" = x; then
60018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60019$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60020    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60021  fi
60022
60023  # Call helper function which possibly converts this using DOS-style short mode.
60024  # If so, the updated path is stored in $new_path.
60025
60026  input_path="$new_path"
60027  # Check if we need to convert this using DOS-style short mode. If the path
60028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60029  # take no chances and rewrite it.
60030  # Note: m4 eats our [], so we need to use [ and ] instead.
60031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60032  if test "x$has_forbidden_chars" != x; then
60033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60037      # Going to short mode and back again did indeed matter. Since short mode is
60038      # case insensitive, let's make it lowercase to improve readability.
60039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60040      # Now convert it back to Unix-style (cygpath)
60041      input_path=`$CYGPATH -u "$shortmode_path"`
60042      new_path="$input_path"
60043    fi
60044  fi
60045
60046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60047  if test "x$test_cygdrive_prefix" = x; then
60048    # As a simple fix, exclude /usr/bin since it's not a real path.
60049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60051      # a path prefixed by /cygdrive for fixpath to work.
60052      new_path="$CYGWIN_ROOT_PATH$input_path"
60053    fi
60054  fi
60055
60056
60057  if test "x$path" != "x$new_path"; then
60058    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60060$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60061  fi
60062
60063    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60064
60065  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60066  has_colon=`$ECHO $path | $GREP ^.:`
60067  new_path="$path"
60068  if test "x$has_colon" = x; then
60069    # Not in mixed or Windows style, start by that.
60070    new_path=`cmd //c echo $path`
60071  fi
60072
60073
60074  input_path="$new_path"
60075  # Check if we need to convert this using DOS-style short mode. If the path
60076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60077  # take no chances and rewrite it.
60078  # Note: m4 eats our [], so we need to use [ and ] instead.
60079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60080  if test "x$has_forbidden_chars" != x; then
60081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60083  fi
60084
60085
60086  windows_path="$new_path"
60087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60088    unix_path=`$CYGPATH -u "$windows_path"`
60089    new_path="$unix_path"
60090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60092    new_path="$unix_path"
60093  fi
60094
60095  if test "x$path" != "x$new_path"; then
60096    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60098$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60099  fi
60100
60101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60103
60104    else
60105      # We're on a unix platform. Hooray! :)
60106      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60107      has_space=`$ECHO "$path" | $GREP " "`
60108      if test "x$has_space" != x; then
60109        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60110$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60111        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60112      fi
60113
60114      # Use eval to expand a potential ~
60115      eval path="$path"
60116      if test ! -f "$path" && test ! -d "$path"; then
60117        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60118      fi
60119
60120      if test -d "$path"; then
60121        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60122      else
60123        dir="`$DIRNAME "$path"`"
60124        base="`$BASENAME "$path"`"
60125        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60126      fi
60127    fi
60128  fi
60129
60130
60131  # Only process if variable expands to non-empty
60132
60133  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60135
60136  # Input might be given as Windows format, start by converting to
60137  # unix format.
60138  path="$POTENTIAL_FREETYPE_LIB_PATH"
60139  new_path=`$CYGPATH -u "$path"`
60140
60141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60144  # "foo.exe" is OK but "foo" is an error.
60145  #
60146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60147  # It is also a way to make sure we got the proper file name for the real test later on.
60148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60149  if test "x$test_shortpath" = x; then
60150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60151$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60152    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60153  fi
60154
60155  # Call helper function which possibly converts this using DOS-style short mode.
60156  # If so, the updated path is stored in $new_path.
60157
60158  input_path="$new_path"
60159  # Check if we need to convert this using DOS-style short mode. If the path
60160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60161  # take no chances and rewrite it.
60162  # Note: m4 eats our [], so we need to use [ and ] instead.
60163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60164  if test "x$has_forbidden_chars" != x; then
60165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60169      # Going to short mode and back again did indeed matter. Since short mode is
60170      # case insensitive, let's make it lowercase to improve readability.
60171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60172      # Now convert it back to Unix-style (cygpath)
60173      input_path=`$CYGPATH -u "$shortmode_path"`
60174      new_path="$input_path"
60175    fi
60176  fi
60177
60178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60179  if test "x$test_cygdrive_prefix" = x; then
60180    # As a simple fix, exclude /usr/bin since it's not a real path.
60181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60183      # a path prefixed by /cygdrive for fixpath to work.
60184      new_path="$CYGWIN_ROOT_PATH$input_path"
60185    fi
60186  fi
60187
60188
60189  if test "x$path" != "x$new_path"; then
60190    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60192$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60193  fi
60194
60195    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60196
60197  path="$POTENTIAL_FREETYPE_LIB_PATH"
60198  has_colon=`$ECHO $path | $GREP ^.:`
60199  new_path="$path"
60200  if test "x$has_colon" = x; then
60201    # Not in mixed or Windows style, start by that.
60202    new_path=`cmd //c echo $path`
60203  fi
60204
60205
60206  input_path="$new_path"
60207  # Check if we need to convert this using DOS-style short mode. If the path
60208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60209  # take no chances and rewrite it.
60210  # Note: m4 eats our [], so we need to use [ and ] instead.
60211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60212  if test "x$has_forbidden_chars" != x; then
60213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60215  fi
60216
60217
60218  windows_path="$new_path"
60219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60220    unix_path=`$CYGPATH -u "$windows_path"`
60221    new_path="$unix_path"
60222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60224    new_path="$unix_path"
60225  fi
60226
60227  if test "x$path" != "x$new_path"; then
60228    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60230$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60231  fi
60232
60233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60235
60236    else
60237      # We're on a unix platform. Hooray! :)
60238      path="$POTENTIAL_FREETYPE_LIB_PATH"
60239      has_space=`$ECHO "$path" | $GREP " "`
60240      if test "x$has_space" != x; then
60241        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60242$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60243        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60244      fi
60245
60246      # Use eval to expand a potential ~
60247      eval path="$path"
60248      if test ! -f "$path" && test ! -d "$path"; then
60249        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60250      fi
60251
60252      if test -d "$path"; then
60253        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60254      else
60255        dir="`$DIRNAME "$path"`"
60256        base="`$BASENAME "$path"`"
60257        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60258      fi
60259    fi
60260  fi
60261
60262
60263    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60265$as_echo_n "checking for freetype includes... " >&6; }
60266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60267$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60268    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60270$as_echo_n "checking for freetype libraries... " >&6; }
60271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60272$as_echo "$FREETYPE_LIB_PATH" >&6; }
60273  fi
60274
60275
60276          if test "x$FOUND_FREETYPE" != xyes; then
60277            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60278
60279  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60280  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60281  METHOD="well-known location"
60282
60283  # Let's start with an optimistic view of the world :-)
60284  FOUND_FREETYPE=yes
60285
60286  # First look for the canonical freetype main include file ft2build.h.
60287  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60288    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60289    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60290    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60291      # Fail.
60292      FOUND_FREETYPE=no
60293    fi
60294  fi
60295
60296  if test "x$FOUND_FREETYPE" = xyes; then
60297    # Include file found, let's continue the sanity check.
60298    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60299$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60300
60301    # Reset to default value
60302    FREETYPE_BASE_NAME=freetype
60303    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60304    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60305      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60306          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60307        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60308        # for the .6 version explicitly.
60309        FREETYPE_BASE_NAME=freetype.6
60310        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60311        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60312$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60313      else
60314        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60315$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60316        FOUND_FREETYPE=no
60317      fi
60318    else
60319      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60320        # On Windows, we will need both .lib and .dll file.
60321        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60322          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60323$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60324          FOUND_FREETYPE=no
60325        fi
60326      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60327          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60328        # Found lib in isa dir, use that instead.
60329        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60330        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60331$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60332      fi
60333    fi
60334  fi
60335
60336  if test "x$FOUND_FREETYPE" = xyes; then
60337
60338  # Only process if variable expands to non-empty
60339
60340  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60342
60343  # Input might be given as Windows format, start by converting to
60344  # unix format.
60345  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60346  new_path=`$CYGPATH -u "$path"`
60347
60348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60351  # "foo.exe" is OK but "foo" is an error.
60352  #
60353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60354  # It is also a way to make sure we got the proper file name for the real test later on.
60355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60356  if test "x$test_shortpath" = x; then
60357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60358$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60359    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60360  fi
60361
60362  # Call helper function which possibly converts this using DOS-style short mode.
60363  # If so, the updated path is stored in $new_path.
60364
60365  input_path="$new_path"
60366  # Check if we need to convert this using DOS-style short mode. If the path
60367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60368  # take no chances and rewrite it.
60369  # Note: m4 eats our [], so we need to use [ and ] instead.
60370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60371  if test "x$has_forbidden_chars" != x; then
60372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60376      # Going to short mode and back again did indeed matter. Since short mode is
60377      # case insensitive, let's make it lowercase to improve readability.
60378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60379      # Now convert it back to Unix-style (cygpath)
60380      input_path=`$CYGPATH -u "$shortmode_path"`
60381      new_path="$input_path"
60382    fi
60383  fi
60384
60385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60386  if test "x$test_cygdrive_prefix" = x; then
60387    # As a simple fix, exclude /usr/bin since it's not a real path.
60388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60390      # a path prefixed by /cygdrive for fixpath to work.
60391      new_path="$CYGWIN_ROOT_PATH$input_path"
60392    fi
60393  fi
60394
60395
60396  if test "x$path" != "x$new_path"; then
60397    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60399$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60400  fi
60401
60402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60403
60404  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60405  has_colon=`$ECHO $path | $GREP ^.:`
60406  new_path="$path"
60407  if test "x$has_colon" = x; then
60408    # Not in mixed or Windows style, start by that.
60409    new_path=`cmd //c echo $path`
60410  fi
60411
60412
60413  input_path="$new_path"
60414  # Check if we need to convert this using DOS-style short mode. If the path
60415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60416  # take no chances and rewrite it.
60417  # Note: m4 eats our [], so we need to use [ and ] instead.
60418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60419  if test "x$has_forbidden_chars" != x; then
60420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60422  fi
60423
60424
60425  windows_path="$new_path"
60426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60427    unix_path=`$CYGPATH -u "$windows_path"`
60428    new_path="$unix_path"
60429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60431    new_path="$unix_path"
60432  fi
60433
60434  if test "x$path" != "x$new_path"; then
60435    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60437$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60438  fi
60439
60440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60442
60443    else
60444      # We're on a unix platform. Hooray! :)
60445      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60446      has_space=`$ECHO "$path" | $GREP " "`
60447      if test "x$has_space" != x; then
60448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60449$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60450        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60451      fi
60452
60453      # Use eval to expand a potential ~
60454      eval path="$path"
60455      if test ! -f "$path" && test ! -d "$path"; then
60456        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60457      fi
60458
60459      if test -d "$path"; then
60460        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60461      else
60462        dir="`$DIRNAME "$path"`"
60463        base="`$BASENAME "$path"`"
60464        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60465      fi
60466    fi
60467  fi
60468
60469
60470  # Only process if variable expands to non-empty
60471
60472  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60473    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60474
60475  # Input might be given as Windows format, start by converting to
60476  # unix format.
60477  path="$POTENTIAL_FREETYPE_LIB_PATH"
60478  new_path=`$CYGPATH -u "$path"`
60479
60480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60483  # "foo.exe" is OK but "foo" is an error.
60484  #
60485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60486  # It is also a way to make sure we got the proper file name for the real test later on.
60487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60488  if test "x$test_shortpath" = x; then
60489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60490$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60491    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60492  fi
60493
60494  # Call helper function which possibly converts this using DOS-style short mode.
60495  # If so, the updated path is stored in $new_path.
60496
60497  input_path="$new_path"
60498  # Check if we need to convert this using DOS-style short mode. If the path
60499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60500  # take no chances and rewrite it.
60501  # Note: m4 eats our [], so we need to use [ and ] instead.
60502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60503  if test "x$has_forbidden_chars" != x; then
60504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60508      # Going to short mode and back again did indeed matter. Since short mode is
60509      # case insensitive, let's make it lowercase to improve readability.
60510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60511      # Now convert it back to Unix-style (cygpath)
60512      input_path=`$CYGPATH -u "$shortmode_path"`
60513      new_path="$input_path"
60514    fi
60515  fi
60516
60517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60518  if test "x$test_cygdrive_prefix" = x; then
60519    # As a simple fix, exclude /usr/bin since it's not a real path.
60520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60522      # a path prefixed by /cygdrive for fixpath to work.
60523      new_path="$CYGWIN_ROOT_PATH$input_path"
60524    fi
60525  fi
60526
60527
60528  if test "x$path" != "x$new_path"; then
60529    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60531$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60532  fi
60533
60534    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60535
60536  path="$POTENTIAL_FREETYPE_LIB_PATH"
60537  has_colon=`$ECHO $path | $GREP ^.:`
60538  new_path="$path"
60539  if test "x$has_colon" = x; then
60540    # Not in mixed or Windows style, start by that.
60541    new_path=`cmd //c echo $path`
60542  fi
60543
60544
60545  input_path="$new_path"
60546  # Check if we need to convert this using DOS-style short mode. If the path
60547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60548  # take no chances and rewrite it.
60549  # Note: m4 eats our [], so we need to use [ and ] instead.
60550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60551  if test "x$has_forbidden_chars" != x; then
60552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60554  fi
60555
60556
60557  windows_path="$new_path"
60558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60559    unix_path=`$CYGPATH -u "$windows_path"`
60560    new_path="$unix_path"
60561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60563    new_path="$unix_path"
60564  fi
60565
60566  if test "x$path" != "x$new_path"; then
60567    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60569$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60570  fi
60571
60572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60574
60575    else
60576      # We're on a unix platform. Hooray! :)
60577      path="$POTENTIAL_FREETYPE_LIB_PATH"
60578      has_space=`$ECHO "$path" | $GREP " "`
60579      if test "x$has_space" != x; then
60580        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60581$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60582        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60583      fi
60584
60585      # Use eval to expand a potential ~
60586      eval path="$path"
60587      if test ! -f "$path" && test ! -d "$path"; then
60588        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60589      fi
60590
60591      if test -d "$path"; then
60592        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60593      else
60594        dir="`$DIRNAME "$path"`"
60595        base="`$BASENAME "$path"`"
60596        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60597      fi
60598    fi
60599  fi
60600
60601
60602    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60604$as_echo_n "checking for freetype includes... " >&6; }
60605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60606$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60607    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60608    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60609$as_echo_n "checking for freetype libraries... " >&6; }
60610    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60611$as_echo "$FREETYPE_LIB_PATH" >&6; }
60612  fi
60613
60614          fi
60615
60616          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60617            if test "x$FOUND_FREETYPE" != xyes; then
60618              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60619              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60620
60621  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60622  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60623  METHOD="well-known location"
60624
60625  # Let's start with an optimistic view of the world :-)
60626  FOUND_FREETYPE=yes
60627
60628  # First look for the canonical freetype main include file ft2build.h.
60629  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60630    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60631    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60632    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60633      # Fail.
60634      FOUND_FREETYPE=no
60635    fi
60636  fi
60637
60638  if test "x$FOUND_FREETYPE" = xyes; then
60639    # Include file found, let's continue the sanity check.
60640    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60641$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60642
60643    # Reset to default value
60644    FREETYPE_BASE_NAME=freetype
60645    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60646    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60647      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60648          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60649        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60650        # for the .6 version explicitly.
60651        FREETYPE_BASE_NAME=freetype.6
60652        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60653        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60654$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60655      else
60656        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60657$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60658        FOUND_FREETYPE=no
60659      fi
60660    else
60661      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60662        # On Windows, we will need both .lib and .dll file.
60663        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60664          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60665$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60666          FOUND_FREETYPE=no
60667        fi
60668      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60669          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60670        # Found lib in isa dir, use that instead.
60671        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60672        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60673$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60674      fi
60675    fi
60676  fi
60677
60678  if test "x$FOUND_FREETYPE" = xyes; then
60679
60680  # Only process if variable expands to non-empty
60681
60682  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60683    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60684
60685  # Input might be given as Windows format, start by converting to
60686  # unix format.
60687  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60688  new_path=`$CYGPATH -u "$path"`
60689
60690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60693  # "foo.exe" is OK but "foo" is an error.
60694  #
60695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60696  # It is also a way to make sure we got the proper file name for the real test later on.
60697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60698  if test "x$test_shortpath" = x; then
60699    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60700$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60701    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60702  fi
60703
60704  # Call helper function which possibly converts this using DOS-style short mode.
60705  # If so, the updated path is stored in $new_path.
60706
60707  input_path="$new_path"
60708  # Check if we need to convert this using DOS-style short mode. If the path
60709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60710  # take no chances and rewrite it.
60711  # Note: m4 eats our [], so we need to use [ and ] instead.
60712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60713  if test "x$has_forbidden_chars" != x; then
60714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60718      # Going to short mode and back again did indeed matter. Since short mode is
60719      # case insensitive, let's make it lowercase to improve readability.
60720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60721      # Now convert it back to Unix-style (cygpath)
60722      input_path=`$CYGPATH -u "$shortmode_path"`
60723      new_path="$input_path"
60724    fi
60725  fi
60726
60727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60728  if test "x$test_cygdrive_prefix" = x; then
60729    # As a simple fix, exclude /usr/bin since it's not a real path.
60730    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60732      # a path prefixed by /cygdrive for fixpath to work.
60733      new_path="$CYGWIN_ROOT_PATH$input_path"
60734    fi
60735  fi
60736
60737
60738  if test "x$path" != "x$new_path"; then
60739    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60741$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60742  fi
60743
60744    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60745
60746  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60747  has_colon=`$ECHO $path | $GREP ^.:`
60748  new_path="$path"
60749  if test "x$has_colon" = x; then
60750    # Not in mixed or Windows style, start by that.
60751    new_path=`cmd //c echo $path`
60752  fi
60753
60754
60755  input_path="$new_path"
60756  # Check if we need to convert this using DOS-style short mode. If the path
60757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60758  # take no chances and rewrite it.
60759  # Note: m4 eats our [], so we need to use [ and ] instead.
60760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60761  if test "x$has_forbidden_chars" != x; then
60762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60764  fi
60765
60766
60767  windows_path="$new_path"
60768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60769    unix_path=`$CYGPATH -u "$windows_path"`
60770    new_path="$unix_path"
60771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60773    new_path="$unix_path"
60774  fi
60775
60776  if test "x$path" != "x$new_path"; then
60777    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60779$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60780  fi
60781
60782  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60783  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60784
60785    else
60786      # We're on a unix platform. Hooray! :)
60787      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60788      has_space=`$ECHO "$path" | $GREP " "`
60789      if test "x$has_space" != x; then
60790        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60791$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60792        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60793      fi
60794
60795      # Use eval to expand a potential ~
60796      eval path="$path"
60797      if test ! -f "$path" && test ! -d "$path"; then
60798        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60799      fi
60800
60801      if test -d "$path"; then
60802        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60803      else
60804        dir="`$DIRNAME "$path"`"
60805        base="`$BASENAME "$path"`"
60806        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60807      fi
60808    fi
60809  fi
60810
60811
60812  # Only process if variable expands to non-empty
60813
60814  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60815    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60816
60817  # Input might be given as Windows format, start by converting to
60818  # unix format.
60819  path="$POTENTIAL_FREETYPE_LIB_PATH"
60820  new_path=`$CYGPATH -u "$path"`
60821
60822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60825  # "foo.exe" is OK but "foo" is an error.
60826  #
60827  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60828  # It is also a way to make sure we got the proper file name for the real test later on.
60829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60830  if test "x$test_shortpath" = x; then
60831    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60832$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60833    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60834  fi
60835
60836  # Call helper function which possibly converts this using DOS-style short mode.
60837  # If so, the updated path is stored in $new_path.
60838
60839  input_path="$new_path"
60840  # Check if we need to convert this using DOS-style short mode. If the path
60841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60842  # take no chances and rewrite it.
60843  # Note: m4 eats our [], so we need to use [ and ] instead.
60844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60845  if test "x$has_forbidden_chars" != x; then
60846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60850      # Going to short mode and back again did indeed matter. Since short mode is
60851      # case insensitive, let's make it lowercase to improve readability.
60852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60853      # Now convert it back to Unix-style (cygpath)
60854      input_path=`$CYGPATH -u "$shortmode_path"`
60855      new_path="$input_path"
60856    fi
60857  fi
60858
60859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60860  if test "x$test_cygdrive_prefix" = x; then
60861    # As a simple fix, exclude /usr/bin since it's not a real path.
60862    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60864      # a path prefixed by /cygdrive for fixpath to work.
60865      new_path="$CYGWIN_ROOT_PATH$input_path"
60866    fi
60867  fi
60868
60869
60870  if test "x$path" != "x$new_path"; then
60871    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60873$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60874  fi
60875
60876    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60877
60878  path="$POTENTIAL_FREETYPE_LIB_PATH"
60879  has_colon=`$ECHO $path | $GREP ^.:`
60880  new_path="$path"
60881  if test "x$has_colon" = x; then
60882    # Not in mixed or Windows style, start by that.
60883    new_path=`cmd //c echo $path`
60884  fi
60885
60886
60887  input_path="$new_path"
60888  # Check if we need to convert this using DOS-style short mode. If the path
60889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60890  # take no chances and rewrite it.
60891  # Note: m4 eats our [], so we need to use [ and ] instead.
60892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60893  if test "x$has_forbidden_chars" != x; then
60894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60896  fi
60897
60898
60899  windows_path="$new_path"
60900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60901    unix_path=`$CYGPATH -u "$windows_path"`
60902    new_path="$unix_path"
60903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60905    new_path="$unix_path"
60906  fi
60907
60908  if test "x$path" != "x$new_path"; then
60909    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60911$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60912  fi
60913
60914  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60915  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60916
60917    else
60918      # We're on a unix platform. Hooray! :)
60919      path="$POTENTIAL_FREETYPE_LIB_PATH"
60920      has_space=`$ECHO "$path" | $GREP " "`
60921      if test "x$has_space" != x; then
60922        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60923$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60924        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60925      fi
60926
60927      # Use eval to expand a potential ~
60928      eval path="$path"
60929      if test ! -f "$path" && test ! -d "$path"; then
60930        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60931      fi
60932
60933      if test -d "$path"; then
60934        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60935      else
60936        dir="`$DIRNAME "$path"`"
60937        base="`$BASENAME "$path"`"
60938        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60939      fi
60940    fi
60941  fi
60942
60943
60944    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60946$as_echo_n "checking for freetype includes... " >&6; }
60947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60948$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60949    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60950    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60951$as_echo_n "checking for freetype libraries... " >&6; }
60952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60953$as_echo "$FREETYPE_LIB_PATH" >&6; }
60954  fi
60955
60956            fi
60957          fi
60958
60959          if test "x$FOUND_FREETYPE" != xyes; then
60960            FREETYPE_BASE_DIR="$SYSROOT/usr"
60961            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60962
60963  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60964  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
60965  METHOD="well-known location"
60966
60967  # Let's start with an optimistic view of the world :-)
60968  FOUND_FREETYPE=yes
60969
60970  # First look for the canonical freetype main include file ft2build.h.
60971  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60972    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60973    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60974    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60975      # Fail.
60976      FOUND_FREETYPE=no
60977    fi
60978  fi
60979
60980  if test "x$FOUND_FREETYPE" = xyes; then
60981    # Include file found, let's continue the sanity check.
60982    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60983$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60984
60985    # Reset to default value
60986    FREETYPE_BASE_NAME=freetype
60987    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60988    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60989      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60990          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60991        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60992        # for the .6 version explicitly.
60993        FREETYPE_BASE_NAME=freetype.6
60994        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60995        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60996$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60997      else
60998        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60999$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61000        FOUND_FREETYPE=no
61001      fi
61002    else
61003      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61004        # On Windows, we will need both .lib and .dll file.
61005        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61006          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61007$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61008          FOUND_FREETYPE=no
61009        fi
61010      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61011          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61012        # Found lib in isa dir, use that instead.
61013        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61014        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61015$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61016      fi
61017    fi
61018  fi
61019
61020  if test "x$FOUND_FREETYPE" = xyes; then
61021
61022  # Only process if variable expands to non-empty
61023
61024  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61026
61027  # Input might be given as Windows format, start by converting to
61028  # unix format.
61029  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61030  new_path=`$CYGPATH -u "$path"`
61031
61032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61035  # "foo.exe" is OK but "foo" is an error.
61036  #
61037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61038  # It is also a way to make sure we got the proper file name for the real test later on.
61039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61040  if test "x$test_shortpath" = x; then
61041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61042$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61043    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61044  fi
61045
61046  # Call helper function which possibly converts this using DOS-style short mode.
61047  # If so, the updated path is stored in $new_path.
61048
61049  input_path="$new_path"
61050  # Check if we need to convert this using DOS-style short mode. If the path
61051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61052  # take no chances and rewrite it.
61053  # Note: m4 eats our [], so we need to use [ and ] instead.
61054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61055  if test "x$has_forbidden_chars" != x; then
61056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61060      # Going to short mode and back again did indeed matter. Since short mode is
61061      # case insensitive, let's make it lowercase to improve readability.
61062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61063      # Now convert it back to Unix-style (cygpath)
61064      input_path=`$CYGPATH -u "$shortmode_path"`
61065      new_path="$input_path"
61066    fi
61067  fi
61068
61069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61070  if test "x$test_cygdrive_prefix" = x; then
61071    # As a simple fix, exclude /usr/bin since it's not a real path.
61072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61074      # a path prefixed by /cygdrive for fixpath to work.
61075      new_path="$CYGWIN_ROOT_PATH$input_path"
61076    fi
61077  fi
61078
61079
61080  if test "x$path" != "x$new_path"; then
61081    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61083$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61084  fi
61085
61086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61087
61088  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61089  has_colon=`$ECHO $path | $GREP ^.:`
61090  new_path="$path"
61091  if test "x$has_colon" = x; then
61092    # Not in mixed or Windows style, start by that.
61093    new_path=`cmd //c echo $path`
61094  fi
61095
61096
61097  input_path="$new_path"
61098  # Check if we need to convert this using DOS-style short mode. If the path
61099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61100  # take no chances and rewrite it.
61101  # Note: m4 eats our [], so we need to use [ and ] instead.
61102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61103  if test "x$has_forbidden_chars" != x; then
61104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61106  fi
61107
61108
61109  windows_path="$new_path"
61110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61111    unix_path=`$CYGPATH -u "$windows_path"`
61112    new_path="$unix_path"
61113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61115    new_path="$unix_path"
61116  fi
61117
61118  if test "x$path" != "x$new_path"; then
61119    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61121$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61122  fi
61123
61124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61126
61127    else
61128      # We're on a unix platform. Hooray! :)
61129      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61130      has_space=`$ECHO "$path" | $GREP " "`
61131      if test "x$has_space" != x; then
61132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61133$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61135      fi
61136
61137      # Use eval to expand a potential ~
61138      eval path="$path"
61139      if test ! -f "$path" && test ! -d "$path"; then
61140        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61141      fi
61142
61143      if test -d "$path"; then
61144        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61145      else
61146        dir="`$DIRNAME "$path"`"
61147        base="`$BASENAME "$path"`"
61148        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61149      fi
61150    fi
61151  fi
61152
61153
61154  # Only process if variable expands to non-empty
61155
61156  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61158
61159  # Input might be given as Windows format, start by converting to
61160  # unix format.
61161  path="$POTENTIAL_FREETYPE_LIB_PATH"
61162  new_path=`$CYGPATH -u "$path"`
61163
61164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61167  # "foo.exe" is OK but "foo" is an error.
61168  #
61169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61170  # It is also a way to make sure we got the proper file name for the real test later on.
61171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61172  if test "x$test_shortpath" = x; then
61173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61174$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61175    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61176  fi
61177
61178  # Call helper function which possibly converts this using DOS-style short mode.
61179  # If so, the updated path is stored in $new_path.
61180
61181  input_path="$new_path"
61182  # Check if we need to convert this using DOS-style short mode. If the path
61183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61184  # take no chances and rewrite it.
61185  # Note: m4 eats our [], so we need to use [ and ] instead.
61186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61187  if test "x$has_forbidden_chars" != x; then
61188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61192      # Going to short mode and back again did indeed matter. Since short mode is
61193      # case insensitive, let's make it lowercase to improve readability.
61194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61195      # Now convert it back to Unix-style (cygpath)
61196      input_path=`$CYGPATH -u "$shortmode_path"`
61197      new_path="$input_path"
61198    fi
61199  fi
61200
61201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61202  if test "x$test_cygdrive_prefix" = x; then
61203    # As a simple fix, exclude /usr/bin since it's not a real path.
61204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61206      # a path prefixed by /cygdrive for fixpath to work.
61207      new_path="$CYGWIN_ROOT_PATH$input_path"
61208    fi
61209  fi
61210
61211
61212  if test "x$path" != "x$new_path"; then
61213    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61215$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61216  fi
61217
61218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61219
61220  path="$POTENTIAL_FREETYPE_LIB_PATH"
61221  has_colon=`$ECHO $path | $GREP ^.:`
61222  new_path="$path"
61223  if test "x$has_colon" = x; then
61224    # Not in mixed or Windows style, start by that.
61225    new_path=`cmd //c echo $path`
61226  fi
61227
61228
61229  input_path="$new_path"
61230  # Check if we need to convert this using DOS-style short mode. If the path
61231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61232  # take no chances and rewrite it.
61233  # Note: m4 eats our [], so we need to use [ and ] instead.
61234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61235  if test "x$has_forbidden_chars" != x; then
61236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61238  fi
61239
61240
61241  windows_path="$new_path"
61242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61243    unix_path=`$CYGPATH -u "$windows_path"`
61244    new_path="$unix_path"
61245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61247    new_path="$unix_path"
61248  fi
61249
61250  if test "x$path" != "x$new_path"; then
61251    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61253$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61254  fi
61255
61256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61258
61259    else
61260      # We're on a unix platform. Hooray! :)
61261      path="$POTENTIAL_FREETYPE_LIB_PATH"
61262      has_space=`$ECHO "$path" | $GREP " "`
61263      if test "x$has_space" != x; then
61264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61265$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61267      fi
61268
61269      # Use eval to expand a potential ~
61270      eval path="$path"
61271      if test ! -f "$path" && test ! -d "$path"; then
61272        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61273      fi
61274
61275      if test -d "$path"; then
61276        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61277      else
61278        dir="`$DIRNAME "$path"`"
61279        base="`$BASENAME "$path"`"
61280        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61281      fi
61282    fi
61283  fi
61284
61285
61286    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61288$as_echo_n "checking for freetype includes... " >&6; }
61289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61290$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61291    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61293$as_echo_n "checking for freetype libraries... " >&6; }
61294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61295$as_echo "$FREETYPE_LIB_PATH" >&6; }
61296  fi
61297
61298            else
61299
61300  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61301  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61302  METHOD="well-known location"
61303
61304  # Let's start with an optimistic view of the world :-)
61305  FOUND_FREETYPE=yes
61306
61307  # First look for the canonical freetype main include file ft2build.h.
61308  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61309    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61310    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61311    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61312      # Fail.
61313      FOUND_FREETYPE=no
61314    fi
61315  fi
61316
61317  if test "x$FOUND_FREETYPE" = xyes; then
61318    # Include file found, let's continue the sanity check.
61319    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61320$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61321
61322    # Reset to default value
61323    FREETYPE_BASE_NAME=freetype
61324    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61325    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61326      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61327          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61328        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61329        # for the .6 version explicitly.
61330        FREETYPE_BASE_NAME=freetype.6
61331        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61332        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61333$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61334      else
61335        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61336$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61337        FOUND_FREETYPE=no
61338      fi
61339    else
61340      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61341        # On Windows, we will need both .lib and .dll file.
61342        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61343          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61344$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61345          FOUND_FREETYPE=no
61346        fi
61347      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61348          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61349        # Found lib in isa dir, use that instead.
61350        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61351        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61352$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61353      fi
61354    fi
61355  fi
61356
61357  if test "x$FOUND_FREETYPE" = xyes; then
61358
61359  # Only process if variable expands to non-empty
61360
61361  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61363
61364  # Input might be given as Windows format, start by converting to
61365  # unix format.
61366  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61367  new_path=`$CYGPATH -u "$path"`
61368
61369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61372  # "foo.exe" is OK but "foo" is an error.
61373  #
61374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61375  # It is also a way to make sure we got the proper file name for the real test later on.
61376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61377  if test "x$test_shortpath" = x; then
61378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61379$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61380    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61381  fi
61382
61383  # Call helper function which possibly converts this using DOS-style short mode.
61384  # If so, the updated path is stored in $new_path.
61385
61386  input_path="$new_path"
61387  # Check if we need to convert this using DOS-style short mode. If the path
61388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61389  # take no chances and rewrite it.
61390  # Note: m4 eats our [], so we need to use [ and ] instead.
61391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61392  if test "x$has_forbidden_chars" != x; then
61393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61397      # Going to short mode and back again did indeed matter. Since short mode is
61398      # case insensitive, let's make it lowercase to improve readability.
61399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61400      # Now convert it back to Unix-style (cygpath)
61401      input_path=`$CYGPATH -u "$shortmode_path"`
61402      new_path="$input_path"
61403    fi
61404  fi
61405
61406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61407  if test "x$test_cygdrive_prefix" = x; then
61408    # As a simple fix, exclude /usr/bin since it's not a real path.
61409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61411      # a path prefixed by /cygdrive for fixpath to work.
61412      new_path="$CYGWIN_ROOT_PATH$input_path"
61413    fi
61414  fi
61415
61416
61417  if test "x$path" != "x$new_path"; then
61418    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61420$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61421  fi
61422
61423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61424
61425  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61426  has_colon=`$ECHO $path | $GREP ^.:`
61427  new_path="$path"
61428  if test "x$has_colon" = x; then
61429    # Not in mixed or Windows style, start by that.
61430    new_path=`cmd //c echo $path`
61431  fi
61432
61433
61434  input_path="$new_path"
61435  # Check if we need to convert this using DOS-style short mode. If the path
61436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61437  # take no chances and rewrite it.
61438  # Note: m4 eats our [], so we need to use [ and ] instead.
61439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61440  if test "x$has_forbidden_chars" != x; then
61441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61443  fi
61444
61445
61446  windows_path="$new_path"
61447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61448    unix_path=`$CYGPATH -u "$windows_path"`
61449    new_path="$unix_path"
61450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61452    new_path="$unix_path"
61453  fi
61454
61455  if test "x$path" != "x$new_path"; then
61456    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61458$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61459  fi
61460
61461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61463
61464    else
61465      # We're on a unix platform. Hooray! :)
61466      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61467      has_space=`$ECHO "$path" | $GREP " "`
61468      if test "x$has_space" != x; then
61469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61470$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61472      fi
61473
61474      # Use eval to expand a potential ~
61475      eval path="$path"
61476      if test ! -f "$path" && test ! -d "$path"; then
61477        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61478      fi
61479
61480      if test -d "$path"; then
61481        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61482      else
61483        dir="`$DIRNAME "$path"`"
61484        base="`$BASENAME "$path"`"
61485        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61486      fi
61487    fi
61488  fi
61489
61490
61491  # Only process if variable expands to non-empty
61492
61493  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61494    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61495
61496  # Input might be given as Windows format, start by converting to
61497  # unix format.
61498  path="$POTENTIAL_FREETYPE_LIB_PATH"
61499  new_path=`$CYGPATH -u "$path"`
61500
61501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61504  # "foo.exe" is OK but "foo" is an error.
61505  #
61506  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61507  # It is also a way to make sure we got the proper file name for the real test later on.
61508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61509  if test "x$test_shortpath" = x; then
61510    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61511$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61512    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61513  fi
61514
61515  # Call helper function which possibly converts this using DOS-style short mode.
61516  # If so, the updated path is stored in $new_path.
61517
61518  input_path="$new_path"
61519  # Check if we need to convert this using DOS-style short mode. If the path
61520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61521  # take no chances and rewrite it.
61522  # Note: m4 eats our [], so we need to use [ and ] instead.
61523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61524  if test "x$has_forbidden_chars" != x; then
61525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61529      # Going to short mode and back again did indeed matter. Since short mode is
61530      # case insensitive, let's make it lowercase to improve readability.
61531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61532      # Now convert it back to Unix-style (cygpath)
61533      input_path=`$CYGPATH -u "$shortmode_path"`
61534      new_path="$input_path"
61535    fi
61536  fi
61537
61538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61539  if test "x$test_cygdrive_prefix" = x; then
61540    # As a simple fix, exclude /usr/bin since it's not a real path.
61541    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61543      # a path prefixed by /cygdrive for fixpath to work.
61544      new_path="$CYGWIN_ROOT_PATH$input_path"
61545    fi
61546  fi
61547
61548
61549  if test "x$path" != "x$new_path"; then
61550    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61552$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61553  fi
61554
61555    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61556
61557  path="$POTENTIAL_FREETYPE_LIB_PATH"
61558  has_colon=`$ECHO $path | $GREP ^.:`
61559  new_path="$path"
61560  if test "x$has_colon" = x; then
61561    # Not in mixed or Windows style, start by that.
61562    new_path=`cmd //c echo $path`
61563  fi
61564
61565
61566  input_path="$new_path"
61567  # Check if we need to convert this using DOS-style short mode. If the path
61568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61569  # take no chances and rewrite it.
61570  # Note: m4 eats our [], so we need to use [ and ] instead.
61571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61572  if test "x$has_forbidden_chars" != x; then
61573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61574    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61575  fi
61576
61577
61578  windows_path="$new_path"
61579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61580    unix_path=`$CYGPATH -u "$windows_path"`
61581    new_path="$unix_path"
61582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61584    new_path="$unix_path"
61585  fi
61586
61587  if test "x$path" != "x$new_path"; then
61588    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61590$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61591  fi
61592
61593  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61594  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61595
61596    else
61597      # We're on a unix platform. Hooray! :)
61598      path="$POTENTIAL_FREETYPE_LIB_PATH"
61599      has_space=`$ECHO "$path" | $GREP " "`
61600      if test "x$has_space" != x; then
61601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61602$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61603        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61604      fi
61605
61606      # Use eval to expand a potential ~
61607      eval path="$path"
61608      if test ! -f "$path" && test ! -d "$path"; then
61609        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61610      fi
61611
61612      if test -d "$path"; then
61613        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61614      else
61615        dir="`$DIRNAME "$path"`"
61616        base="`$BASENAME "$path"`"
61617        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61618      fi
61619    fi
61620  fi
61621
61622
61623    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61625$as_echo_n "checking for freetype includes... " >&6; }
61626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61627$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61628    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61629    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61630$as_echo_n "checking for freetype libraries... " >&6; }
61631    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61632$as_echo "$FREETYPE_LIB_PATH" >&6; }
61633  fi
61634
61635              if test "x$FOUND_FREETYPE" != xyes; then
61636
61637  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61638  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61639  METHOD="well-known location"
61640
61641  # Let's start with an optimistic view of the world :-)
61642  FOUND_FREETYPE=yes
61643
61644  # First look for the canonical freetype main include file ft2build.h.
61645  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61646    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61647    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61648    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61649      # Fail.
61650      FOUND_FREETYPE=no
61651    fi
61652  fi
61653
61654  if test "x$FOUND_FREETYPE" = xyes; then
61655    # Include file found, let's continue the sanity check.
61656    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61657$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61658
61659    # Reset to default value
61660    FREETYPE_BASE_NAME=freetype
61661    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61662    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61663      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61664          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61665        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61666        # for the .6 version explicitly.
61667        FREETYPE_BASE_NAME=freetype.6
61668        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61669        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61670$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61671      else
61672        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61673$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61674        FOUND_FREETYPE=no
61675      fi
61676    else
61677      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61678        # On Windows, we will need both .lib and .dll file.
61679        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61680          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61681$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61682          FOUND_FREETYPE=no
61683        fi
61684      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61685          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61686        # Found lib in isa dir, use that instead.
61687        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61688        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61689$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61690      fi
61691    fi
61692  fi
61693
61694  if test "x$FOUND_FREETYPE" = xyes; then
61695
61696  # Only process if variable expands to non-empty
61697
61698  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61700
61701  # Input might be given as Windows format, start by converting to
61702  # unix format.
61703  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61704  new_path=`$CYGPATH -u "$path"`
61705
61706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61709  # "foo.exe" is OK but "foo" is an error.
61710  #
61711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61712  # It is also a way to make sure we got the proper file name for the real test later on.
61713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61714  if test "x$test_shortpath" = x; then
61715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61716$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61717    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61718  fi
61719
61720  # Call helper function which possibly converts this using DOS-style short mode.
61721  # If so, the updated path is stored in $new_path.
61722
61723  input_path="$new_path"
61724  # Check if we need to convert this using DOS-style short mode. If the path
61725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61726  # take no chances and rewrite it.
61727  # Note: m4 eats our [], so we need to use [ and ] instead.
61728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61729  if test "x$has_forbidden_chars" != x; then
61730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61734      # Going to short mode and back again did indeed matter. Since short mode is
61735      # case insensitive, let's make it lowercase to improve readability.
61736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61737      # Now convert it back to Unix-style (cygpath)
61738      input_path=`$CYGPATH -u "$shortmode_path"`
61739      new_path="$input_path"
61740    fi
61741  fi
61742
61743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61744  if test "x$test_cygdrive_prefix" = x; then
61745    # As a simple fix, exclude /usr/bin since it's not a real path.
61746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61748      # a path prefixed by /cygdrive for fixpath to work.
61749      new_path="$CYGWIN_ROOT_PATH$input_path"
61750    fi
61751  fi
61752
61753
61754  if test "x$path" != "x$new_path"; then
61755    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61758  fi
61759
61760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61761
61762  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61763  has_colon=`$ECHO $path | $GREP ^.:`
61764  new_path="$path"
61765  if test "x$has_colon" = x; then
61766    # Not in mixed or Windows style, start by that.
61767    new_path=`cmd //c echo $path`
61768  fi
61769
61770
61771  input_path="$new_path"
61772  # Check if we need to convert this using DOS-style short mode. If the path
61773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61774  # take no chances and rewrite it.
61775  # Note: m4 eats our [], so we need to use [ and ] instead.
61776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61777  if test "x$has_forbidden_chars" != x; then
61778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61780  fi
61781
61782
61783  windows_path="$new_path"
61784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61785    unix_path=`$CYGPATH -u "$windows_path"`
61786    new_path="$unix_path"
61787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61789    new_path="$unix_path"
61790  fi
61791
61792  if test "x$path" != "x$new_path"; then
61793    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61795$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61796  fi
61797
61798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61800
61801    else
61802      # We're on a unix platform. Hooray! :)
61803      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61804      has_space=`$ECHO "$path" | $GREP " "`
61805      if test "x$has_space" != x; then
61806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61807$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61808        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61809      fi
61810
61811      # Use eval to expand a potential ~
61812      eval path="$path"
61813      if test ! -f "$path" && test ! -d "$path"; then
61814        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61815      fi
61816
61817      if test -d "$path"; then
61818        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61819      else
61820        dir="`$DIRNAME "$path"`"
61821        base="`$BASENAME "$path"`"
61822        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61823      fi
61824    fi
61825  fi
61826
61827
61828  # Only process if variable expands to non-empty
61829
61830  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61832
61833  # Input might be given as Windows format, start by converting to
61834  # unix format.
61835  path="$POTENTIAL_FREETYPE_LIB_PATH"
61836  new_path=`$CYGPATH -u "$path"`
61837
61838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61841  # "foo.exe" is OK but "foo" is an error.
61842  #
61843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61844  # It is also a way to make sure we got the proper file name for the real test later on.
61845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61846  if test "x$test_shortpath" = x; then
61847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61848$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61849    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61850  fi
61851
61852  # Call helper function which possibly converts this using DOS-style short mode.
61853  # If so, the updated path is stored in $new_path.
61854
61855  input_path="$new_path"
61856  # Check if we need to convert this using DOS-style short mode. If the path
61857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61858  # take no chances and rewrite it.
61859  # Note: m4 eats our [], so we need to use [ and ] instead.
61860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61861  if test "x$has_forbidden_chars" != x; then
61862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61866      # Going to short mode and back again did indeed matter. Since short mode is
61867      # case insensitive, let's make it lowercase to improve readability.
61868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61869      # Now convert it back to Unix-style (cygpath)
61870      input_path=`$CYGPATH -u "$shortmode_path"`
61871      new_path="$input_path"
61872    fi
61873  fi
61874
61875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61876  if test "x$test_cygdrive_prefix" = x; then
61877    # As a simple fix, exclude /usr/bin since it's not a real path.
61878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61880      # a path prefixed by /cygdrive for fixpath to work.
61881      new_path="$CYGWIN_ROOT_PATH$input_path"
61882    fi
61883  fi
61884
61885
61886  if test "x$path" != "x$new_path"; then
61887    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61889$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61890  fi
61891
61892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61893
61894  path="$POTENTIAL_FREETYPE_LIB_PATH"
61895  has_colon=`$ECHO $path | $GREP ^.:`
61896  new_path="$path"
61897  if test "x$has_colon" = x; then
61898    # Not in mixed or Windows style, start by that.
61899    new_path=`cmd //c echo $path`
61900  fi
61901
61902
61903  input_path="$new_path"
61904  # Check if we need to convert this using DOS-style short mode. If the path
61905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61906  # take no chances and rewrite it.
61907  # Note: m4 eats our [], so we need to use [ and ] instead.
61908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61909  if test "x$has_forbidden_chars" != x; then
61910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61912  fi
61913
61914
61915  windows_path="$new_path"
61916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61917    unix_path=`$CYGPATH -u "$windows_path"`
61918    new_path="$unix_path"
61919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61921    new_path="$unix_path"
61922  fi
61923
61924  if test "x$path" != "x$new_path"; then
61925    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61927$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61928  fi
61929
61930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61932
61933    else
61934      # We're on a unix platform. Hooray! :)
61935      path="$POTENTIAL_FREETYPE_LIB_PATH"
61936      has_space=`$ECHO "$path" | $GREP " "`
61937      if test "x$has_space" != x; then
61938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61939$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61940        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61941      fi
61942
61943      # Use eval to expand a potential ~
61944      eval path="$path"
61945      if test ! -f "$path" && test ! -d "$path"; then
61946        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61947      fi
61948
61949      if test -d "$path"; then
61950        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61951      else
61952        dir="`$DIRNAME "$path"`"
61953        base="`$BASENAME "$path"`"
61954        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61955      fi
61956    fi
61957  fi
61958
61959
61960    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61961    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61962$as_echo_n "checking for freetype includes... " >&6; }
61963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61964$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61965    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61967$as_echo_n "checking for freetype libraries... " >&6; }
61968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61969$as_echo "$FREETYPE_LIB_PATH" >&6; }
61970  fi
61971
61972              fi
61973            fi
61974          fi
61975        fi
61976      fi # end check in well-known locations
61977
61978      if test "x$FOUND_FREETYPE" != xyes; then
61979
61980  # Print a helpful message on how to acquire the necessary build dependency.
61981  # freetype is the help tag: freetype, cups, alsa etc
61982  MISSING_DEPENDENCY=freetype
61983
61984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61985    cygwin_help $MISSING_DEPENDENCY
61986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61987    msys_help $MISSING_DEPENDENCY
61988  else
61989    PKGHANDLER_COMMAND=
61990
61991    case $PKGHANDLER in
61992      apt-get)
61993        apt_help     $MISSING_DEPENDENCY ;;
61994      yum)
61995        yum_help     $MISSING_DEPENDENCY ;;
61996      port)
61997        port_help    $MISSING_DEPENDENCY ;;
61998      pkgutil)
61999        pkgutil_help $MISSING_DEPENDENCY ;;
62000      pkgadd)
62001        pkgadd_help  $MISSING_DEPENDENCY ;;
62002    esac
62003
62004    if test "x$PKGHANDLER_COMMAND" != x; then
62005      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62006    fi
62007  fi
62008
62009        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62010      fi
62011    fi # end user specified settings
62012
62013    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62014    if test "x$FREETYPE_CFLAGS" = x; then
62015
62016  # Only process if variable expands to non-empty
62017
62018  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62020
62021  # Input might be given as Windows format, start by converting to
62022  # unix format.
62023  path="$FREETYPE_INCLUDE_PATH"
62024  new_path=`$CYGPATH -u "$path"`
62025
62026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62029  # "foo.exe" is OK but "foo" is an error.
62030  #
62031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62032  # It is also a way to make sure we got the proper file name for the real test later on.
62033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62034  if test "x$test_shortpath" = x; then
62035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62036$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62037    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62038  fi
62039
62040  # Call helper function which possibly converts this using DOS-style short mode.
62041  # If so, the updated path is stored in $new_path.
62042
62043  input_path="$new_path"
62044  # Check if we need to convert this using DOS-style short mode. If the path
62045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62046  # take no chances and rewrite it.
62047  # Note: m4 eats our [], so we need to use [ and ] instead.
62048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62049  if test "x$has_forbidden_chars" != x; then
62050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62054      # Going to short mode and back again did indeed matter. Since short mode is
62055      # case insensitive, let's make it lowercase to improve readability.
62056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62057      # Now convert it back to Unix-style (cygpath)
62058      input_path=`$CYGPATH -u "$shortmode_path"`
62059      new_path="$input_path"
62060    fi
62061  fi
62062
62063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62064  if test "x$test_cygdrive_prefix" = x; then
62065    # As a simple fix, exclude /usr/bin since it's not a real path.
62066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62068      # a path prefixed by /cygdrive for fixpath to work.
62069      new_path="$CYGWIN_ROOT_PATH$input_path"
62070    fi
62071  fi
62072
62073
62074  if test "x$path" != "x$new_path"; then
62075    FREETYPE_INCLUDE_PATH="$new_path"
62076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62077$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62078  fi
62079
62080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62081
62082  path="$FREETYPE_INCLUDE_PATH"
62083  has_colon=`$ECHO $path | $GREP ^.:`
62084  new_path="$path"
62085  if test "x$has_colon" = x; then
62086    # Not in mixed or Windows style, start by that.
62087    new_path=`cmd //c echo $path`
62088  fi
62089
62090
62091  input_path="$new_path"
62092  # Check if we need to convert this using DOS-style short mode. If the path
62093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62094  # take no chances and rewrite it.
62095  # Note: m4 eats our [], so we need to use [ and ] instead.
62096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62097  if test "x$has_forbidden_chars" != x; then
62098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62100  fi
62101
62102
62103  windows_path="$new_path"
62104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62105    unix_path=`$CYGPATH -u "$windows_path"`
62106    new_path="$unix_path"
62107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62109    new_path="$unix_path"
62110  fi
62111
62112  if test "x$path" != "x$new_path"; then
62113    FREETYPE_INCLUDE_PATH="$new_path"
62114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62115$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62116  fi
62117
62118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62120
62121    else
62122      # We're on a unix platform. Hooray! :)
62123      path="$FREETYPE_INCLUDE_PATH"
62124      has_space=`$ECHO "$path" | $GREP " "`
62125      if test "x$has_space" != x; then
62126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62127$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62128        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62129      fi
62130
62131      # Use eval to expand a potential ~
62132      eval path="$path"
62133      if test ! -f "$path" && test ! -d "$path"; then
62134        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62135      fi
62136
62137      if test -d "$path"; then
62138        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62139      else
62140        dir="`$DIRNAME "$path"`"
62141        base="`$BASENAME "$path"`"
62142        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62143      fi
62144    fi
62145  fi
62146
62147      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62148        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62149      else
62150        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62151      fi
62152    fi
62153
62154    if test "x$FREETYPE_LIBS" = x; then
62155
62156  # Only process if variable expands to non-empty
62157
62158  if test "x$FREETYPE_LIB_PATH" != x; then
62159    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62160
62161  # Input might be given as Windows format, start by converting to
62162  # unix format.
62163  path="$FREETYPE_LIB_PATH"
62164  new_path=`$CYGPATH -u "$path"`
62165
62166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62169  # "foo.exe" is OK but "foo" is an error.
62170  #
62171  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62172  # It is also a way to make sure we got the proper file name for the real test later on.
62173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62174  if test "x$test_shortpath" = x; then
62175    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62176$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62177    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62178  fi
62179
62180  # Call helper function which possibly converts this using DOS-style short mode.
62181  # If so, the updated path is stored in $new_path.
62182
62183  input_path="$new_path"
62184  # Check if we need to convert this using DOS-style short mode. If the path
62185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62186  # take no chances and rewrite it.
62187  # Note: m4 eats our [], so we need to use [ and ] instead.
62188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62189  if test "x$has_forbidden_chars" != x; then
62190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62194      # Going to short mode and back again did indeed matter. Since short mode is
62195      # case insensitive, let's make it lowercase to improve readability.
62196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62197      # Now convert it back to Unix-style (cygpath)
62198      input_path=`$CYGPATH -u "$shortmode_path"`
62199      new_path="$input_path"
62200    fi
62201  fi
62202
62203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62204  if test "x$test_cygdrive_prefix" = x; then
62205    # As a simple fix, exclude /usr/bin since it's not a real path.
62206    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62208      # a path prefixed by /cygdrive for fixpath to work.
62209      new_path="$CYGWIN_ROOT_PATH$input_path"
62210    fi
62211  fi
62212
62213
62214  if test "x$path" != "x$new_path"; then
62215    FREETYPE_LIB_PATH="$new_path"
62216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62217$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62218  fi
62219
62220    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62221
62222  path="$FREETYPE_LIB_PATH"
62223  has_colon=`$ECHO $path | $GREP ^.:`
62224  new_path="$path"
62225  if test "x$has_colon" = x; then
62226    # Not in mixed or Windows style, start by that.
62227    new_path=`cmd //c echo $path`
62228  fi
62229
62230
62231  input_path="$new_path"
62232  # Check if we need to convert this using DOS-style short mode. If the path
62233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62234  # take no chances and rewrite it.
62235  # Note: m4 eats our [], so we need to use [ and ] instead.
62236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62237  if test "x$has_forbidden_chars" != x; then
62238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62240  fi
62241
62242
62243  windows_path="$new_path"
62244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62245    unix_path=`$CYGPATH -u "$windows_path"`
62246    new_path="$unix_path"
62247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62249    new_path="$unix_path"
62250  fi
62251
62252  if test "x$path" != "x$new_path"; then
62253    FREETYPE_LIB_PATH="$new_path"
62254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62255$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62256  fi
62257
62258  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62259  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62260
62261    else
62262      # We're on a unix platform. Hooray! :)
62263      path="$FREETYPE_LIB_PATH"
62264      has_space=`$ECHO "$path" | $GREP " "`
62265      if test "x$has_space" != x; then
62266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62267$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62268        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62269      fi
62270
62271      # Use eval to expand a potential ~
62272      eval path="$path"
62273      if test ! -f "$path" && test ! -d "$path"; then
62274        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62275      fi
62276
62277      if test -d "$path"; then
62278        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62279      else
62280        dir="`$DIRNAME "$path"`"
62281        base="`$BASENAME "$path"`"
62282        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62283      fi
62284    fi
62285  fi
62286
62287      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62288        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62289      else
62290        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62291      fi
62292    fi
62293
62294    # Try to compile it
62295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62296$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62297    ac_ext=cpp
62298ac_cpp='$CXXCPP $CPPFLAGS'
62299ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62300ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62301ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62302
62303    PREV_CXXCFLAGS="$CXXFLAGS"
62304    PREV_LIBS="$LIBS"
62305    PREV_CXX="$CXX"
62306    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62307    LIBS="$LIBS $FREETYPE_LIBS"
62308    CXX="$FIXPATH $CXX"
62309    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62310/* end confdefs.h.  */
62311
62312          #include<ft2build.h>
62313          #include FT_FREETYPE_H
62314          int main () {
62315            FT_Init_FreeType(NULL);
62316            return 0;
62317          }
62318
62319_ACEOF
62320if ac_fn_cxx_try_link "$LINENO"; then :
62321
62322          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62323$as_echo "yes" >&6; }
62324
62325else
62326
62327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62328$as_echo "no" >&6; }
62329          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62330$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62331          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62332$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62333
62334
62335  # Print a helpful message on how to acquire the necessary build dependency.
62336  # freetype is the help tag: freetype, cups, alsa etc
62337  MISSING_DEPENDENCY=freetype
62338
62339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62340    cygwin_help $MISSING_DEPENDENCY
62341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62342    msys_help $MISSING_DEPENDENCY
62343  else
62344    PKGHANDLER_COMMAND=
62345
62346    case $PKGHANDLER in
62347      apt-get)
62348        apt_help     $MISSING_DEPENDENCY ;;
62349      yum)
62350        yum_help     $MISSING_DEPENDENCY ;;
62351      port)
62352        port_help    $MISSING_DEPENDENCY ;;
62353      pkgutil)
62354        pkgutil_help $MISSING_DEPENDENCY ;;
62355      pkgadd)
62356        pkgadd_help  $MISSING_DEPENDENCY ;;
62357    esac
62358
62359    if test "x$PKGHANDLER_COMMAND" != x; then
62360      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62361    fi
62362  fi
62363
62364
62365          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62366
62367
62368fi
62369rm -f core conftest.err conftest.$ac_objext \
62370    conftest$ac_exeext conftest.$ac_ext
62371    CXXCFLAGS="$PREV_CXXFLAGS"
62372    LIBS="$PREV_LIBS"
62373    CXX="$PREV_CXX"
62374    ac_ext=cpp
62375ac_cpp='$CXXCPP $CPPFLAGS'
62376ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62377ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62378ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62379
62380
62381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62382$as_echo_n "checking if we should bundle freetype... " >&6; }
62383    if test "x$BUNDLE_FREETYPE" = xyes; then
62384      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62385    fi
62386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62387$as_echo "$BUNDLE_FREETYPE" >&6; }
62388
62389  fi # end freetype needed
62390
62391
62392
62393
62394
62395
62396
62397# Check whether --with-alsa was given.
62398if test "${with_alsa+set}" = set; then :
62399  withval=$with_alsa;
62400fi
62401
62402
62403# Check whether --with-alsa-include was given.
62404if test "${with_alsa_include+set}" = set; then :
62405  withval=$with_alsa_include;
62406fi
62407
62408
62409# Check whether --with-alsa-lib was given.
62410if test "${with_alsa_lib+set}" = set; then :
62411  withval=$with_alsa_lib;
62412fi
62413
62414
62415  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62416    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62417        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62418        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62419      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62420$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62421    fi
62422    ALSA_CFLAGS=
62423    ALSA_LIBS=
62424  else
62425    ALSA_FOUND=no
62426
62427    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62428      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62429    fi
62430
62431    if test "x${with_alsa}" != x; then
62432      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62433      ALSA_CFLAGS="-I${with_alsa}/include"
62434      ALSA_FOUND=yes
62435    fi
62436    if test "x${with_alsa_include}" != x; then
62437      ALSA_CFLAGS="-I${with_alsa_include}"
62438      ALSA_FOUND=yes
62439    fi
62440    if test "x${with_alsa_lib}" != x; then
62441      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62442      ALSA_FOUND=yes
62443    fi
62444    # Do not try pkg-config if we have a sysroot set.
62445    if test "x$SYSROOT" = x; then
62446      if test "x$ALSA_FOUND" = xno; then
62447
62448pkg_failed=no
62449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62450$as_echo_n "checking for ALSA... " >&6; }
62451
62452if test -n "$ALSA_CFLAGS"; then
62453    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62454 elif test -n "$PKG_CONFIG"; then
62455    if test -n "$PKG_CONFIG" && \
62456    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62457  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62458  ac_status=$?
62459  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62460  test $ac_status = 0; }; then
62461  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62462else
62463  pkg_failed=yes
62464fi
62465 else
62466    pkg_failed=untried
62467fi
62468if test -n "$ALSA_LIBS"; then
62469    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62470 elif test -n "$PKG_CONFIG"; then
62471    if test -n "$PKG_CONFIG" && \
62472    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62473  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62474  ac_status=$?
62475  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62476  test $ac_status = 0; }; then
62477  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62478else
62479  pkg_failed=yes
62480fi
62481 else
62482    pkg_failed=untried
62483fi
62484
62485
62486
62487if test $pkg_failed = yes; then
62488
62489if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62490        _pkg_short_errors_supported=yes
62491else
62492        _pkg_short_errors_supported=no
62493fi
62494        if test $_pkg_short_errors_supported = yes; then
62495	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62496        else
62497	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62498        fi
62499	# Put the nasty error message in config.log where it belongs
62500	echo "$ALSA_PKG_ERRORS" >&5
62501
62502	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62503$as_echo "no" >&6; }
62504                ALSA_FOUND=no
62505elif test $pkg_failed = untried; then
62506	ALSA_FOUND=no
62507else
62508	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62509	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62511$as_echo "yes" >&6; }
62512	ALSA_FOUND=yes
62513fi
62514      fi
62515    fi
62516    if test "x$ALSA_FOUND" = xno; then
62517      for ac_header in alsa/asoundlib.h
62518do :
62519  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62520if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62521  cat >>confdefs.h <<_ACEOF
62522#define HAVE_ALSA_ASOUNDLIB_H 1
62523_ACEOF
62524
62525            ALSA_FOUND=yes
62526            ALSA_CFLAGS=-Iignoreme
62527            ALSA_LIBS=-lasound
62528            DEFAULT_ALSA=yes
62529
62530else
62531  ALSA_FOUND=no
62532
62533fi
62534
62535done
62536
62537    fi
62538    if test "x$ALSA_FOUND" = xno; then
62539
62540  # Print a helpful message on how to acquire the necessary build dependency.
62541  # alsa is the help tag: freetype, cups, alsa etc
62542  MISSING_DEPENDENCY=alsa
62543
62544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62545    cygwin_help $MISSING_DEPENDENCY
62546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62547    msys_help $MISSING_DEPENDENCY
62548  else
62549    PKGHANDLER_COMMAND=
62550
62551    case $PKGHANDLER in
62552      apt-get)
62553        apt_help     $MISSING_DEPENDENCY ;;
62554      yum)
62555        yum_help     $MISSING_DEPENDENCY ;;
62556      port)
62557        port_help    $MISSING_DEPENDENCY ;;
62558      pkgutil)
62559        pkgutil_help $MISSING_DEPENDENCY ;;
62560      pkgadd)
62561        pkgadd_help  $MISSING_DEPENDENCY ;;
62562    esac
62563
62564    if test "x$PKGHANDLER_COMMAND" != x; then
62565      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62566    fi
62567  fi
62568
62569      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62570    fi
62571  fi
62572
62573
62574
62575
62576
62577
62578# Check whether --with-libffi was given.
62579if test "${with_libffi+set}" = set; then :
62580  withval=$with_libffi;
62581fi
62582
62583
62584# Check whether --with-libffi-include was given.
62585if test "${with_libffi_include+set}" = set; then :
62586  withval=$with_libffi_include;
62587fi
62588
62589
62590# Check whether --with-libffi-lib was given.
62591if test "${with_libffi_lib+set}" = set; then :
62592  withval=$with_libffi_lib;
62593fi
62594
62595  # Check whether --enable-libffi-bundling was given.
62596if test "${enable_libffi_bundling+set}" = set; then :
62597  enableval=$enable_libffi_bundling;
62598fi
62599
62600
62601  if test "x$NEEDS_LIB_FFI" = xfalse; then
62602    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62603        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62604        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62605      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62606$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62607    fi
62608    LIBFFI_CFLAGS=
62609    LIBFFI_LIBS=
62610  else
62611    LIBFFI_FOUND=no
62612
62613    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62614      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62615    fi
62616
62617    if test "x${with_libffi}" != x; then
62618      LIBFFI_LIB_PATH="${with_libffi}/lib"
62619      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62620      LIBFFI_CFLAGS="-I${with_libffi}/include"
62621      LIBFFI_FOUND=yes
62622    fi
62623    if test "x${with_libffi_include}" != x; then
62624      LIBFFI_CFLAGS="-I${with_libffi_include}"
62625      LIBFFI_FOUND=yes
62626    fi
62627    if test "x${with_libffi_lib}" != x; then
62628      LIBFFI_LIB_PATH="${with_libffi_lib}"
62629      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62630      LIBFFI_FOUND=yes
62631    fi
62632    # Do not try pkg-config if we have a sysroot set.
62633    if test "x$SYSROOT" = x; then
62634      if test "x$LIBFFI_FOUND" = xno; then
62635        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62636
62637pkg_failed=no
62638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62639$as_echo_n "checking for LIBFFI... " >&6; }
62640
62641if test -n "$LIBFFI_CFLAGS"; then
62642    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62643 elif test -n "$PKG_CONFIG"; then
62644    if test -n "$PKG_CONFIG" && \
62645    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62646  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62647  ac_status=$?
62648  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62649  test $ac_status = 0; }; then
62650  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62651else
62652  pkg_failed=yes
62653fi
62654 else
62655    pkg_failed=untried
62656fi
62657if test -n "$LIBFFI_LIBS"; then
62658    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62659 elif test -n "$PKG_CONFIG"; then
62660    if test -n "$PKG_CONFIG" && \
62661    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62662  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62663  ac_status=$?
62664  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62665  test $ac_status = 0; }; then
62666  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62667else
62668  pkg_failed=yes
62669fi
62670 else
62671    pkg_failed=untried
62672fi
62673
62674
62675
62676if test $pkg_failed = yes; then
62677
62678if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62679        _pkg_short_errors_supported=yes
62680else
62681        _pkg_short_errors_supported=no
62682fi
62683        if test $_pkg_short_errors_supported = yes; then
62684	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62685        else
62686	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62687        fi
62688	# Put the nasty error message in config.log where it belongs
62689	echo "$LIBFFI_PKG_ERRORS" >&5
62690
62691	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62692$as_echo "no" >&6; }
62693                LIBFFI_FOUND=no
62694elif test $pkg_failed = untried; then
62695	LIBFFI_FOUND=no
62696else
62697	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62698	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62699        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62700$as_echo "yes" >&6; }
62701	LIBFFI_FOUND=yes
62702fi
62703      fi
62704    fi
62705    if test "x$LIBFFI_FOUND" = xno; then
62706      for ac_header in ffi.h
62707do :
62708  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62709if test "x$ac_cv_header_ffi_h" = xyes; then :
62710  cat >>confdefs.h <<_ACEOF
62711#define HAVE_FFI_H 1
62712_ACEOF
62713
62714            LIBFFI_FOUND=yes
62715            LIBFFI_CFLAGS=
62716            LIBFFI_LIBS=-lffi
62717
62718else
62719  LIBFFI_FOUND=no
62720
62721fi
62722
62723done
62724
62725    fi
62726    if test "x$LIBFFI_FOUND" = xno; then
62727
62728  # Print a helpful message on how to acquire the necessary build dependency.
62729  # ffi is the help tag: freetype, cups, alsa etc
62730  MISSING_DEPENDENCY=ffi
62731
62732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62733    cygwin_help $MISSING_DEPENDENCY
62734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62735    msys_help $MISSING_DEPENDENCY
62736  else
62737    PKGHANDLER_COMMAND=
62738
62739    case $PKGHANDLER in
62740      apt-get)
62741        apt_help     $MISSING_DEPENDENCY ;;
62742      yum)
62743        yum_help     $MISSING_DEPENDENCY ;;
62744      port)
62745        port_help    $MISSING_DEPENDENCY ;;
62746      pkgutil)
62747        pkgutil_help $MISSING_DEPENDENCY ;;
62748      pkgadd)
62749        pkgadd_help  $MISSING_DEPENDENCY ;;
62750    esac
62751
62752    if test "x$PKGHANDLER_COMMAND" != x; then
62753      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62754    fi
62755  fi
62756
62757      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62758    fi
62759
62760    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62761$as_echo_n "checking if libffi works... " >&6; }
62762    ac_ext=c
62763ac_cpp='$CPP $CPPFLAGS'
62764ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62765ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62766ac_compiler_gnu=$ac_cv_c_compiler_gnu
62767
62768    OLD_CFLAGS="$CFLAGS"
62769    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62770    OLD_LIBS="$LIBS"
62771    LIBS="$LIBS $LIBFFI_LIBS"
62772    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62773/* end confdefs.h.  */
62774#include <ffi.h>
62775int
62776main ()
62777{
62778
62779          ffi_call(NULL, NULL, NULL, NULL);
62780          return 0;
62781
62782  ;
62783  return 0;
62784}
62785_ACEOF
62786if ac_fn_c_try_link "$LINENO"; then :
62787  LIBFFI_WORKS=yes
62788else
62789  LIBFFI_WORKS=no
62790
62791fi
62792rm -f core conftest.err conftest.$ac_objext \
62793    conftest$ac_exeext conftest.$ac_ext
62794    CFLAGS="$OLD_CFLAGS"
62795    LIBS="$OLD_LIBS"
62796    ac_ext=cpp
62797ac_cpp='$CXXCPP $CPPFLAGS'
62798ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62799ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62800ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62801
62802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62803$as_echo "$LIBFFI_WORKS" >&6; }
62804
62805    if test "x$LIBFFI_WORKS" = xno; then
62806
62807  # Print a helpful message on how to acquire the necessary build dependency.
62808  # ffi is the help tag: freetype, cups, alsa etc
62809  MISSING_DEPENDENCY=ffi
62810
62811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62812    cygwin_help $MISSING_DEPENDENCY
62813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62814    msys_help $MISSING_DEPENDENCY
62815  else
62816    PKGHANDLER_COMMAND=
62817
62818    case $PKGHANDLER in
62819      apt-get)
62820        apt_help     $MISSING_DEPENDENCY ;;
62821      yum)
62822        yum_help     $MISSING_DEPENDENCY ;;
62823      port)
62824        port_help    $MISSING_DEPENDENCY ;;
62825      pkgutil)
62826        pkgutil_help $MISSING_DEPENDENCY ;;
62827      pkgadd)
62828        pkgadd_help  $MISSING_DEPENDENCY ;;
62829    esac
62830
62831    if test "x$PKGHANDLER_COMMAND" != x; then
62832      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62833    fi
62834  fi
62835
62836      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62837    fi
62838
62839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
62840$as_echo_n "checking if libffi should be bundled... " >&6; }
62841    if test "x$enable_libffi_bundling" = "x"; then
62842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62843$as_echo "no" >&6; }
62844      ENABLE_LIBFFI_BUNDLING=false
62845    elif  test "x$enable_libffi_bundling" = "xno"; then
62846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
62847$as_echo "no, forced" >&6; }
62848      ENABLE_LIBFFI_BUNDLING=false
62849    elif  test "x$enable_libffi_bundling" = "xyes"; then
62850      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
62851$as_echo "yes, forced" >&6; }
62852      ENABLE_LIBFFI_BUNDLING=true
62853    else
62854      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
62855    fi
62856
62857    # Find the libffi.so.X to bundle
62858    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
62859      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
62860$as_echo_n "checking for libffi lib file location... " >&6; }
62861      if test "x${LIBFFI_LIB_PATH}" != x; then
62862        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
62863          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
62864        else
62865          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
62866        fi
62867      else
62868        # If we don't have an explicit path, look in a few obvious places
62869        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
62870          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
62871            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
62872          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
62873            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
62874          else
62875            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62876          fi
62877        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
62878          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
62879            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
62880          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
62881            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
62882          else
62883            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62884          fi
62885        else
62886          # Fallback on the default /usr/lib dir
62887          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
62888            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
62889          else
62890            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62891          fi
62892        fi
62893      fi
62894      # Make sure the wildcard is evaluated
62895      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
62896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
62897$as_echo "${LIBFFI_LIB_FILE}" >&6; }
62898    fi
62899  fi
62900
62901
62902
62903
62904
62905
62906
62907  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62908    # Extract the first word of "llvm-config", so it can be a program name with args.
62909set dummy llvm-config; ac_word=$2
62910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62911$as_echo_n "checking for $ac_word... " >&6; }
62912if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62913  $as_echo_n "(cached) " >&6
62914else
62915  if test -n "$LLVM_CONFIG"; then
62916  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62917else
62918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62919for as_dir in $PATH
62920do
62921  IFS=$as_save_IFS
62922  test -z "$as_dir" && as_dir=.
62923    for ac_exec_ext in '' $ac_executable_extensions; do
62924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62925    ac_cv_prog_LLVM_CONFIG="llvm-config"
62926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62927    break 2
62928  fi
62929done
62930  done
62931IFS=$as_save_IFS
62932
62933fi
62934fi
62935LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62936if test -n "$LLVM_CONFIG"; then
62937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62938$as_echo "$LLVM_CONFIG" >&6; }
62939else
62940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62941$as_echo "no" >&6; }
62942fi
62943
62944
62945
62946    if test "x$LLVM_CONFIG" != xllvm-config; then
62947      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62948    fi
62949
62950    llvm_components="jit mcjit engine nativecodegen native"
62951    unset LLVM_CFLAGS
62952    for flag in $("$LLVM_CONFIG" --cxxflags); do
62953      if echo "${flag}" | grep -q '^-[ID]'; then
62954        if test "${flag}" != "-D_DEBUG" ; then
62955          if test "${LLVM_CFLAGS}" != "" ; then
62956            LLVM_CFLAGS="${LLVM_CFLAGS} "
62957          fi
62958          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
62959        fi
62960      fi
62961    done
62962    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
62963    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
62964
62965    unset LLVM_LDFLAGS
62966    for flag in $("${LLVM_CONFIG}" --ldflags); do
62967      if echo "${flag}" | grep -q '^-L'; then
62968        if test "${LLVM_LDFLAGS}" != ""; then
62969          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
62970        fi
62971        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
62972      fi
62973    done
62974
62975    unset LLVM_LIBS
62976    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
62977      if echo "${flag}" | grep -q '^-l'; then
62978        if test "${LLVM_LIBS}" != ""; then
62979          LLVM_LIBS="${LLVM_LIBS} "
62980        fi
62981        LLVM_LIBS="${LLVM_LIBS}${flag}"
62982      fi
62983    done
62984
62985    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
62986    # always properly detect -ltinfo
62987    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
62988
62989
62990
62991
62992  fi
62993
62994
62995
62996# Check whether --with-libjpeg was given.
62997if test "${with_libjpeg+set}" = set; then :
62998  withval=$with_libjpeg;
62999fi
63000
63001
63002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63003$as_echo_n "checking for which libjpeg to use... " >&6; }
63004  # default is bundled
63005  DEFAULT_LIBJPEG=bundled
63006  # if user didn't specify, use DEFAULT_LIBJPEG
63007  if test "x${with_libjpeg}" = "x"; then
63008    with_libjpeg=${DEFAULT_LIBJPEG}
63009  fi
63010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63011$as_echo "${with_libjpeg}" >&6; }
63012
63013  if test "x${with_libjpeg}" = "xbundled"; then
63014    USE_EXTERNAL_LIBJPEG=false
63015  elif test "x${with_libjpeg}" = "xsystem"; then
63016    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63017if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63018
63019else
63020   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63021fi
63022
63023
63024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63025$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63026if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63027  $as_echo_n "(cached) " >&6
63028else
63029  ac_check_lib_save_LIBS=$LIBS
63030LIBS="-ljpeg  $LIBS"
63031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63032/* end confdefs.h.  */
63033
63034/* Override any GCC internal prototype to avoid an error.
63035   Use char because int might match the return type of a GCC
63036   builtin and then its argument prototype would still apply.  */
63037#ifdef __cplusplus
63038extern "C"
63039#endif
63040char jpeg_CreateDecompress ();
63041int
63042main ()
63043{
63044return jpeg_CreateDecompress ();
63045  ;
63046  return 0;
63047}
63048_ACEOF
63049if ac_fn_cxx_try_link "$LINENO"; then :
63050  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63051else
63052  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63053fi
63054rm -f core conftest.err conftest.$ac_objext \
63055    conftest$ac_exeext conftest.$ac_ext
63056LIBS=$ac_check_lib_save_LIBS
63057fi
63058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63059$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63060if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63061  cat >>confdefs.h <<_ACEOF
63062#define HAVE_LIBJPEG 1
63063_ACEOF
63064
63065  LIBS="-ljpeg $LIBS"
63066
63067else
63068   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63069fi
63070
63071
63072    USE_EXTERNAL_LIBJPEG=true
63073  else
63074    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63075  fi
63076
63077
63078
63079
63080
63081# Check whether --with-giflib was given.
63082if test "${with_giflib+set}" = set; then :
63083  withval=$with_giflib;
63084fi
63085
63086
63087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63088$as_echo_n "checking for which giflib to use... " >&6; }
63089  # default is bundled
63090  DEFAULT_GIFLIB=bundled
63091  # if user didn't specify, use DEFAULT_GIFLIB
63092  if test "x${with_giflib}" = "x"; then
63093    with_giflib=${DEFAULT_GIFLIB}
63094  fi
63095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63096$as_echo "${with_giflib}" >&6; }
63097
63098  if test "x${with_giflib}" = "xbundled"; then
63099    USE_EXTERNAL_LIBGIF=false
63100  elif test "x${with_giflib}" = "xsystem"; then
63101    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63102if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63103
63104else
63105   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63106fi
63107
63108
63109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63110$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63111if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63112  $as_echo_n "(cached) " >&6
63113else
63114  ac_check_lib_save_LIBS=$LIBS
63115LIBS="-lgif  $LIBS"
63116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63117/* end confdefs.h.  */
63118
63119/* Override any GCC internal prototype to avoid an error.
63120   Use char because int might match the return type of a GCC
63121   builtin and then its argument prototype would still apply.  */
63122#ifdef __cplusplus
63123extern "C"
63124#endif
63125char DGifGetCode ();
63126int
63127main ()
63128{
63129return DGifGetCode ();
63130  ;
63131  return 0;
63132}
63133_ACEOF
63134if ac_fn_cxx_try_link "$LINENO"; then :
63135  ac_cv_lib_gif_DGifGetCode=yes
63136else
63137  ac_cv_lib_gif_DGifGetCode=no
63138fi
63139rm -f core conftest.err conftest.$ac_objext \
63140    conftest$ac_exeext conftest.$ac_ext
63141LIBS=$ac_check_lib_save_LIBS
63142fi
63143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63144$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63145if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63146  cat >>confdefs.h <<_ACEOF
63147#define HAVE_LIBGIF 1
63148_ACEOF
63149
63150  LIBS="-lgif $LIBS"
63151
63152else
63153   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63154fi
63155
63156
63157    USE_EXTERNAL_LIBGIF=true
63158  else
63159    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63160  fi
63161
63162
63163
63164
63165
63166# Check whether --with-libpng was given.
63167if test "${with_libpng+set}" = set; then :
63168  withval=$with_libpng;
63169fi
63170
63171
63172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63173$as_echo_n "checking for which libpng to use... " >&6; }
63174
63175  # default is bundled
63176  DEFAULT_LIBPNG=bundled
63177  # if user didn't specify, use DEFAULT_LIBPNG
63178  if test "x${with_libpng}" = "x"; then
63179      with_libpng=${DEFAULT_LIBPNG}
63180  fi
63181
63182  if test "x${with_libpng}" = "xbundled"; then
63183      USE_EXTERNAL_LIBPNG=false
63184      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63185$as_echo "bundled" >&6; }
63186  elif test "x${with_libpng}" = "xsystem"; then
63187
63188pkg_failed=no
63189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63190$as_echo_n "checking for PNG... " >&6; }
63191
63192if test -n "$PNG_CFLAGS"; then
63193    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63194 elif test -n "$PKG_CONFIG"; then
63195    if test -n "$PKG_CONFIG" && \
63196    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63197  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63198  ac_status=$?
63199  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63200  test $ac_status = 0; }; then
63201  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63202else
63203  pkg_failed=yes
63204fi
63205 else
63206    pkg_failed=untried
63207fi
63208if test -n "$PNG_LIBS"; then
63209    pkg_cv_PNG_LIBS="$PNG_LIBS"
63210 elif test -n "$PKG_CONFIG"; then
63211    if test -n "$PKG_CONFIG" && \
63212    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63213  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63214  ac_status=$?
63215  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63216  test $ac_status = 0; }; then
63217  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63218else
63219  pkg_failed=yes
63220fi
63221 else
63222    pkg_failed=untried
63223fi
63224
63225
63226
63227if test $pkg_failed = yes; then
63228
63229if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63230        _pkg_short_errors_supported=yes
63231else
63232        _pkg_short_errors_supported=no
63233fi
63234        if test $_pkg_short_errors_supported = yes; then
63235	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63236        else
63237	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63238        fi
63239	# Put the nasty error message in config.log where it belongs
63240	echo "$PNG_PKG_ERRORS" >&5
63241
63242	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63243$as_echo "no" >&6; }
63244                 LIBPNG_FOUND=no
63245elif test $pkg_failed = untried; then
63246	 LIBPNG_FOUND=no
63247else
63248	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63249	PNG_LIBS=$pkg_cv_PNG_LIBS
63250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63251$as_echo "yes" >&6; }
63252	 LIBPNG_FOUND=yes
63253fi
63254      if test "x${LIBPNG_FOUND}" = "xyes"; then
63255          USE_EXTERNAL_LIBPNG=true
63256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63257$as_echo "system" >&6; }
63258      else
63259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63260$as_echo "system not found" >&6; }
63261          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63262      fi
63263  else
63264      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63265  fi
63266
63267
63268
63269
63270
63271# Check whether --with-zlib was given.
63272if test "${with_zlib+set}" = set; then :
63273  withval=$with_zlib;
63274fi
63275
63276
63277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63278$as_echo_n "checking for compress in -lz... " >&6; }
63279if ${ac_cv_lib_z_compress+:} false; then :
63280  $as_echo_n "(cached) " >&6
63281else
63282  ac_check_lib_save_LIBS=$LIBS
63283LIBS="-lz  $LIBS"
63284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63285/* end confdefs.h.  */
63286
63287/* Override any GCC internal prototype to avoid an error.
63288   Use char because int might match the return type of a GCC
63289   builtin and then its argument prototype would still apply.  */
63290#ifdef __cplusplus
63291extern "C"
63292#endif
63293char compress ();
63294int
63295main ()
63296{
63297return compress ();
63298  ;
63299  return 0;
63300}
63301_ACEOF
63302if ac_fn_cxx_try_link "$LINENO"; then :
63303  ac_cv_lib_z_compress=yes
63304else
63305  ac_cv_lib_z_compress=no
63306fi
63307rm -f core conftest.err conftest.$ac_objext \
63308    conftest$ac_exeext conftest.$ac_ext
63309LIBS=$ac_check_lib_save_LIBS
63310fi
63311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63312$as_echo "$ac_cv_lib_z_compress" >&6; }
63313if test "x$ac_cv_lib_z_compress" = xyes; then :
63314   ZLIB_FOUND=yes
63315else
63316   ZLIB_FOUND=no
63317fi
63318
63319
63320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63321$as_echo_n "checking for which zlib to use... " >&6; }
63322
63323  DEFAULT_ZLIB=system
63324  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63325    # On windows default is bundled...on others default is system
63326    DEFAULT_ZLIB=bundled
63327  fi
63328
63329  if test "x${ZLIB_FOUND}" != "xyes"; then
63330    # If we don't find any system...set default to bundled
63331    DEFAULT_ZLIB=bundled
63332  fi
63333
63334  # If user didn't specify, use DEFAULT_ZLIB
63335  if test "x${with_zlib}" = "x"; then
63336    with_zlib=${DEFAULT_ZLIB}
63337  fi
63338
63339  if test "x${with_zlib}" = "xbundled"; then
63340    USE_EXTERNAL_LIBZ=false
63341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63342$as_echo "bundled" >&6; }
63343  elif test "x${with_zlib}" = "xsystem"; then
63344    if test "x${ZLIB_FOUND}" = "xyes"; then
63345      USE_EXTERNAL_LIBZ=true
63346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63347$as_echo "system" >&6; }
63348    else
63349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63350$as_echo "system not found" >&6; }
63351      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63352    fi
63353  else
63354    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63355  fi
63356
63357
63358
63359
63360
63361# Check whether --with-lcms was given.
63362if test "${with_lcms+set}" = set; then :
63363  withval=$with_lcms;
63364fi
63365
63366
63367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63368$as_echo_n "checking for which lcms to use... " >&6; }
63369
63370  DEFAULT_LCMS=bundled
63371  # If user didn't specify, use DEFAULT_LCMS
63372  if test "x${with_lcms}" = "x"; then
63373      with_lcms=${DEFAULT_LCMS}
63374  fi
63375
63376  if test "x${with_lcms}" = "xbundled"; then
63377    USE_EXTERNAL_LCMS=false
63378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63379$as_echo "bundled" >&6; }
63380  elif test "x${with_lcms}" = "xsystem"; then
63381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63382$as_echo "system" >&6; }
63383
63384pkg_failed=no
63385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63386$as_echo_n "checking for LCMS... " >&6; }
63387
63388if test -n "$LCMS_CFLAGS"; then
63389    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63390 elif test -n "$PKG_CONFIG"; then
63391    if test -n "$PKG_CONFIG" && \
63392    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63393  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63394  ac_status=$?
63395  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63396  test $ac_status = 0; }; then
63397  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63398else
63399  pkg_failed=yes
63400fi
63401 else
63402    pkg_failed=untried
63403fi
63404if test -n "$LCMS_LIBS"; then
63405    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63406 elif test -n "$PKG_CONFIG"; then
63407    if test -n "$PKG_CONFIG" && \
63408    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63409  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63410  ac_status=$?
63411  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63412  test $ac_status = 0; }; then
63413  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63414else
63415  pkg_failed=yes
63416fi
63417 else
63418    pkg_failed=untried
63419fi
63420
63421
63422
63423if test $pkg_failed = yes; then
63424
63425if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63426        _pkg_short_errors_supported=yes
63427else
63428        _pkg_short_errors_supported=no
63429fi
63430        if test $_pkg_short_errors_supported = yes; then
63431	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63432        else
63433	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63434        fi
63435	# Put the nasty error message in config.log where it belongs
63436	echo "$LCMS_PKG_ERRORS" >&5
63437
63438	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63439$as_echo "no" >&6; }
63440                LCMS_FOUND=no
63441elif test $pkg_failed = untried; then
63442	LCMS_FOUND=no
63443else
63444	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63445	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63447$as_echo "yes" >&6; }
63448	LCMS_FOUND=yes
63449fi
63450    if test "x${LCMS_FOUND}" = "xyes"; then
63451      USE_EXTERNAL_LCMS=true
63452    else
63453      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63454    fi
63455  else
63456    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63457  fi
63458
63459
63460
63461
63462
63463
63464
63465
63466
63467
63468
63469  # Setup libm (the maths library)
63470  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63472$as_echo_n "checking for cos in -lm... " >&6; }
63473if ${ac_cv_lib_m_cos+:} false; then :
63474  $as_echo_n "(cached) " >&6
63475else
63476  ac_check_lib_save_LIBS=$LIBS
63477LIBS="-lm  $LIBS"
63478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63479/* end confdefs.h.  */
63480
63481/* Override any GCC internal prototype to avoid an error.
63482   Use char because int might match the return type of a GCC
63483   builtin and then its argument prototype would still apply.  */
63484#ifdef __cplusplus
63485extern "C"
63486#endif
63487char cos ();
63488int
63489main ()
63490{
63491return cos ();
63492  ;
63493  return 0;
63494}
63495_ACEOF
63496if ac_fn_cxx_try_link "$LINENO"; then :
63497  ac_cv_lib_m_cos=yes
63498else
63499  ac_cv_lib_m_cos=no
63500fi
63501rm -f core conftest.err conftest.$ac_objext \
63502    conftest$ac_exeext conftest.$ac_ext
63503LIBS=$ac_check_lib_save_LIBS
63504fi
63505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63506$as_echo "$ac_cv_lib_m_cos" >&6; }
63507if test "x$ac_cv_lib_m_cos" = xyes; then :
63508  cat >>confdefs.h <<_ACEOF
63509#define HAVE_LIBM 1
63510_ACEOF
63511
63512  LIBS="-lm $LIBS"
63513
63514else
63515
63516        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63517$as_echo "$as_me: Maths library was not found" >&6;}
63518
63519fi
63520
63521    LIBM="-lm"
63522  else
63523    LIBM=""
63524  fi
63525
63526
63527  # Setup libdl (for dynamic library loading)
63528  save_LIBS="$LIBS"
63529  LIBS=""
63530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63531$as_echo_n "checking for dlopen in -ldl... " >&6; }
63532if ${ac_cv_lib_dl_dlopen+:} false; then :
63533  $as_echo_n "(cached) " >&6
63534else
63535  ac_check_lib_save_LIBS=$LIBS
63536LIBS="-ldl  $LIBS"
63537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63538/* end confdefs.h.  */
63539
63540/* Override any GCC internal prototype to avoid an error.
63541   Use char because int might match the return type of a GCC
63542   builtin and then its argument prototype would still apply.  */
63543#ifdef __cplusplus
63544extern "C"
63545#endif
63546char dlopen ();
63547int
63548main ()
63549{
63550return dlopen ();
63551  ;
63552  return 0;
63553}
63554_ACEOF
63555if ac_fn_cxx_try_link "$LINENO"; then :
63556  ac_cv_lib_dl_dlopen=yes
63557else
63558  ac_cv_lib_dl_dlopen=no
63559fi
63560rm -f core conftest.err conftest.$ac_objext \
63561    conftest$ac_exeext conftest.$ac_ext
63562LIBS=$ac_check_lib_save_LIBS
63563fi
63564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63565$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63566if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63567  cat >>confdefs.h <<_ACEOF
63568#define HAVE_LIBDL 1
63569_ACEOF
63570
63571  LIBS="-ldl $LIBS"
63572
63573fi
63574
63575  LIBDL="$LIBS"
63576
63577  LIBS="$save_LIBS"
63578
63579  # Deprecated libraries, keep the flags for backwards compatibility
63580  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63581
63582
63583# Check whether --with-dxsdk was given.
63584if test "${with_dxsdk+set}" = set; then :
63585  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63586$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63587fi
63588
63589
63590
63591
63592# Check whether --with-dxsdk-lib was given.
63593if test "${with_dxsdk_lib+set}" = set; then :
63594  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63595$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63596fi
63597
63598
63599
63600
63601# Check whether --with-dxsdk-include was given.
63602if test "${with_dxsdk_include+set}" = set; then :
63603  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63604$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63605fi
63606
63607
63608  fi
63609
63610  # Control if libzip can use mmap. Available for purposes of overriding.
63611  LIBZIP_CAN_USE_MMAP=true
63612
63613
63614
63615  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63616    # Find the root of the Solaris Studio installation from the compiler path
63617    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63618    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63620$as_echo_n "checking for libstlport.so.1... " >&6; }
63621    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63622      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63623      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63624    fi
63625    if test -f "$STLPORT_LIB"; then
63626      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63627$as_echo "yes, $STLPORT_LIB" >&6; }
63628
63629  # Only process if variable expands to non-empty
63630
63631  if test "x$STLPORT_LIB" != x; then
63632    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63633
63634  # Input might be given as Windows format, start by converting to
63635  # unix format.
63636  path="$STLPORT_LIB"
63637  new_path=`$CYGPATH -u "$path"`
63638
63639  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63640  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63641  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63642  # "foo.exe" is OK but "foo" is an error.
63643  #
63644  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63645  # It is also a way to make sure we got the proper file name for the real test later on.
63646  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63647  if test "x$test_shortpath" = x; then
63648    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63649$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63650    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63651  fi
63652
63653  # Call helper function which possibly converts this using DOS-style short mode.
63654  # If so, the updated path is stored in $new_path.
63655
63656  input_path="$new_path"
63657  # Check if we need to convert this using DOS-style short mode. If the path
63658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63659  # take no chances and rewrite it.
63660  # Note: m4 eats our [], so we need to use [ and ] instead.
63661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63662  if test "x$has_forbidden_chars" != x; then
63663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63667      # Going to short mode and back again did indeed matter. Since short mode is
63668      # case insensitive, let's make it lowercase to improve readability.
63669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63670      # Now convert it back to Unix-style (cygpath)
63671      input_path=`$CYGPATH -u "$shortmode_path"`
63672      new_path="$input_path"
63673    fi
63674  fi
63675
63676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63677  if test "x$test_cygdrive_prefix" = x; then
63678    # As a simple fix, exclude /usr/bin since it's not a real path.
63679    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63681      # a path prefixed by /cygdrive for fixpath to work.
63682      new_path="$CYGWIN_ROOT_PATH$input_path"
63683    fi
63684  fi
63685
63686
63687  if test "x$path" != "x$new_path"; then
63688    STLPORT_LIB="$new_path"
63689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63690$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63691  fi
63692
63693    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63694
63695  path="$STLPORT_LIB"
63696  has_colon=`$ECHO $path | $GREP ^.:`
63697  new_path="$path"
63698  if test "x$has_colon" = x; then
63699    # Not in mixed or Windows style, start by that.
63700    new_path=`cmd //c echo $path`
63701  fi
63702
63703
63704  input_path="$new_path"
63705  # Check if we need to convert this using DOS-style short mode. If the path
63706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63707  # take no chances and rewrite it.
63708  # Note: m4 eats our [], so we need to use [ and ] instead.
63709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63710  if test "x$has_forbidden_chars" != x; then
63711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63713  fi
63714
63715
63716  windows_path="$new_path"
63717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63718    unix_path=`$CYGPATH -u "$windows_path"`
63719    new_path="$unix_path"
63720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63722    new_path="$unix_path"
63723  fi
63724
63725  if test "x$path" != "x$new_path"; then
63726    STLPORT_LIB="$new_path"
63727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63728$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63729  fi
63730
63731  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63732  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63733
63734    else
63735      # We're on a unix platform. Hooray! :)
63736      path="$STLPORT_LIB"
63737      has_space=`$ECHO "$path" | $GREP " "`
63738      if test "x$has_space" != x; then
63739        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63740$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63741        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63742      fi
63743
63744      # Use eval to expand a potential ~
63745      eval path="$path"
63746      if test ! -f "$path" && test ! -d "$path"; then
63747        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63748      fi
63749
63750      if test -d "$path"; then
63751        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63752      else
63753        dir="`$DIRNAME "$path"`"
63754        base="`$BASENAME "$path"`"
63755        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63756      fi
63757    fi
63758  fi
63759
63760    else
63761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63762$as_echo "no, not found at $STLPORT_LIB" >&6; }
63763      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63764    fi
63765
63766  fi
63767
63768
63769
63770
63771
63772
63773
63774
63775
63776
63777
63778
63779
63780
63781###############################################################################
63782#
63783# We need to do some final tweaking, when everything else is done.
63784#
63785###############################################################################
63786
63787
63788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63789$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63790
63791  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63792    ENABLE_INTREE_EC=yes
63793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63794$as_echo "yes" >&6; }
63795  else
63796    ENABLE_INTREE_EC=no
63797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63798$as_echo "no" >&6; }
63799  fi
63800
63801
63802
63803
63804  # Check whether --enable-jtreg-failure-handler was given.
63805if test "${enable_jtreg_failure_handler+set}" = set; then :
63806  enableval=$enable_jtreg_failure_handler;
63807fi
63808
63809
63810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63811$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63812
63813  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63814    if test "x$JT_HOME" = "x"; then
63815      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63816    else
63817      BUILD_FAILURE_HANDLER=true
63818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63819$as_echo "yes, forced" >&6; }
63820    fi
63821  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63822    BUILD_FAILURE_HANDLER=false
63823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63824$as_echo "no, forced" >&6; }
63825  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63826      || test "x$enable_jtreg_failure_handler" = "x"; then
63827    if test "x$JT_HOME" = "x"; then
63828      BUILD_FAILURE_HANDLER=false
63829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63830$as_echo "no, missing jtreg" >&6; }
63831    else
63832      BUILD_FAILURE_HANDLER=true
63833      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63834$as_echo "yes, jtreg present" >&6; }
63835    fi
63836  else
63837    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63838  fi
63839
63840
63841
63842
63843  # Check whether --enable-generate-classlist was given.
63844if test "${enable_generate_classlist+set}" = set; then :
63845  enableval=$enable_generate_classlist;
63846fi
63847
63848
63849  # Check if it's likely that it's possible to generate the classlist. Depending
63850  # on exact jvm configuration it could be possible anyway.
63851  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63852    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63853  else
63854    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63855  fi
63856
63857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63858$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63859  if test "x$enable_generate_classlist" = "xyes"; then
63860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63861$as_echo "yes, forced" >&6; }
63862    ENABLE_GENERATE_CLASSLIST="true"
63863    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63864      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63865$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63866    fi
63867  elif test "x$enable_generate_classlist" = "xno"; then
63868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63869$as_echo "no, forced" >&6; }
63870    ENABLE_GENERATE_CLASSLIST="false"
63871  elif test "x$enable_generate_classlist" = "x"; then
63872    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63874$as_echo "yes" >&6; }
63875      ENABLE_GENERATE_CLASSLIST="true"
63876    else
63877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63878$as_echo "no" >&6; }
63879      ENABLE_GENERATE_CLASSLIST="false"
63880    fi
63881  else
63882    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63883  fi
63884
63885
63886
63887
63888###############################################################################
63889#
63890# Configure parts of the build that only affect the build performance,
63891# not the result.
63892#
63893###############################################################################
63894
63895
63896  # How many cores do we have on this build system?
63897
63898# Check whether --with-num-cores was given.
63899if test "${with_num_cores+set}" = set; then :
63900  withval=$with_num_cores;
63901fi
63902
63903  if test "x$with_num_cores" = x; then
63904    # The number of cores were not specified, try to probe them.
63905
63906  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63907$as_echo_n "checking for number of cores... " >&6; }
63908  NUM_CORES=1
63909  FOUND_CORES=no
63910
63911  if test -f /proc/cpuinfo; then
63912    # Looks like a Linux (or cygwin) system
63913    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63914    FOUND_CORES=yes
63915  elif test -x /usr/sbin/psrinfo; then
63916    # Looks like a Solaris system
63917    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63918    FOUND_CORES=yes
63919  elif test -x /usr/sbin/sysctl; then
63920    # Looks like a MacOSX system
63921    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63922    FOUND_CORES=yes
63923  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63924    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63925    FOUND_CORES=yes
63926  elif test -n "$NUMBER_OF_PROCESSORS"; then
63927    # On windows, look in the env
63928    NUM_CORES=$NUMBER_OF_PROCESSORS
63929    FOUND_CORES=yes
63930  fi
63931
63932  if test "x$FOUND_CORES" = xyes; then
63933    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63934$as_echo "$NUM_CORES" >&6; }
63935  else
63936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63937$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63938    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63939$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63940  fi
63941
63942  else
63943    NUM_CORES=$with_num_cores
63944  fi
63945
63946
63947
63948  # How much memory do we have on this build system?
63949
63950# Check whether --with-memory-size was given.
63951if test "${with_memory_size+set}" = set; then :
63952  withval=$with_memory_size;
63953fi
63954
63955  if test "x$with_memory_size" = x; then
63956    # The memory size was not specified, try to probe it.
63957
63958  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
63959$as_echo_n "checking for memory size... " >&6; }
63960  # Default to 1024 MB
63961  MEMORY_SIZE=1024
63962  FOUND_MEM=no
63963
63964  if test -f /proc/meminfo; then
63965    # Looks like a Linux (or cygwin) system
63966    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
63967    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
63968    FOUND_MEM=yes
63969  elif test -x /usr/sbin/prtconf; then
63970    # Looks like a Solaris or AIX system
63971    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
63972    FOUND_MEM=yes
63973  elif test -x /usr/sbin/sysctl; then
63974    # Looks like a MacOSX system
63975    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
63976    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63977    FOUND_MEM=yes
63978  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
63979    # Windows, but without cygwin
63980    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
63981    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63982    FOUND_MEM=yes
63983  fi
63984
63985  if test "x$FOUND_MEM" = xyes; then
63986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
63987$as_echo "$MEMORY_SIZE MB" >&6; }
63988  else
63989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
63990$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
63991    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
63992$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
63993  fi
63994
63995  else
63996    MEMORY_SIZE=$with_memory_size
63997  fi
63998
63999
64000
64001  # Provide a decent default number of parallel jobs for make depending on
64002  # number of cores, amount of memory and machine architecture.
64003
64004# Check whether --with-jobs was given.
64005if test "${with_jobs+set}" = set; then :
64006  withval=$with_jobs;
64007fi
64008
64009  if test "x$with_jobs" = x; then
64010    # Number of jobs was not specified, calculate.
64011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64012$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64013    # Approximate memory in GB.
64014    memory_gb=`expr $MEMORY_SIZE / 1024`
64015    # Pick the lowest of memory in gb and number of cores.
64016    if test "$memory_gb" -lt "$NUM_CORES"; then
64017      JOBS="$memory_gb"
64018    else
64019      JOBS="$NUM_CORES"
64020    fi
64021    if test "$JOBS" -eq "0"; then
64022      JOBS=1
64023    fi
64024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64025$as_echo "$JOBS" >&6; }
64026  else
64027    JOBS=$with_jobs
64028  fi
64029
64030
64031
64032  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64033
64034# Check whether --with-test-jobs was given.
64035if test "${with_test_jobs+set}" = set; then :
64036  withval=$with_test_jobs;
64037fi
64038
64039  if test "x$with_test_jobs" = x; then
64040      TEST_JOBS=0
64041  else
64042      TEST_JOBS=$with_test_jobs
64043  fi
64044
64045
64046
64047# Setup arguments for the boot jdk (after cores and memory have been setup)
64048
64049  ##############################################################################
64050  #
64051  # Specify jvm options for anything that is run with the Boot JDK.
64052  # Not all JVM:s accept the same arguments on the command line.
64053  #
64054
64055# Check whether --with-boot-jdk-jvmargs was given.
64056if test "${with_boot_jdk_jvmargs+set}" = set; then :
64057  withval=$with_boot_jdk_jvmargs;
64058fi
64059
64060
64061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64062$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64063
64064  # Disable special log output when a debug build is used as Boot JDK...
64065
64066  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64067  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64068  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64069  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64070  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64071  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64072    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64073    JVM_ARG_OK=true
64074  else
64075    $ECHO "Arg failed:" >&5
64076    $ECHO "$OUTPUT" >&5
64077    JVM_ARG_OK=false
64078  fi
64079
64080
64081  # Force en-US environment
64082
64083  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64084  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64085  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64086  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64087  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64088  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64089    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64090    JVM_ARG_OK=true
64091  else
64092    $ECHO "Arg failed:" >&5
64093    $ECHO "$OUTPUT" >&5
64094    JVM_ARG_OK=false
64095  fi
64096
64097
64098  # Apply user provided options.
64099
64100  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64101  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64102  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64103  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64104  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64105  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64106    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64107    JVM_ARG_OK=true
64108  else
64109    $ECHO "Arg failed:" >&5
64110    $ECHO "$OUTPUT" >&5
64111    JVM_ARG_OK=false
64112  fi
64113
64114
64115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64116$as_echo "$boot_jdk_jvmargs" >&6; }
64117
64118  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64119  JAVA_FLAGS=$boot_jdk_jvmargs
64120
64121
64122
64123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64124$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64125
64126  # Starting amount of heap memory.
64127
64128  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64129  $ECHO "Command: $JAVA -Xms64M -version" >&5
64130  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64131  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64132  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64133  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64134    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64135    JVM_ARG_OK=true
64136  else
64137    $ECHO "Arg failed:" >&5
64138    $ECHO "$OUTPUT" >&5
64139    JVM_ARG_OK=false
64140  fi
64141
64142  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64143
64144  # Maximum amount of heap memory and stack size.
64145  JVM_HEAP_LIMIT_32="1024"
64146  # Running a 64 bit JVM allows for and requires a bigger heap
64147  JVM_HEAP_LIMIT_64="1600"
64148  STACK_SIZE_32=768
64149  STACK_SIZE_64=1536
64150  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64151  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64152    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64153  fi
64154  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64155    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64156  fi
64157  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64158    JVM_HEAP_LIMIT_32=512
64159    JVM_HEAP_LIMIT_64=512
64160  fi
64161
64162  if test "x$BOOT_JDK_BITS" = "x32"; then
64163    STACK_SIZE=$STACK_SIZE_32
64164    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64165  else
64166    STACK_SIZE=$STACK_SIZE_64
64167    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64168  fi
64169
64170  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64171  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64172  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64173  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64174  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64175  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64176    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64177    JVM_ARG_OK=true
64178  else
64179    $ECHO "Arg failed:" >&5
64180    $ECHO "$OUTPUT" >&5
64181    JVM_ARG_OK=false
64182  fi
64183
64184
64185  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64186  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64187  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64188  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64189  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64190  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64191    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64192    JVM_ARG_OK=true
64193  else
64194    $ECHO "Arg failed:" >&5
64195    $ECHO "$OUTPUT" >&5
64196    JVM_ARG_OK=false
64197  fi
64198
64199
64200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64201$as_echo "$boot_jdk_jvmargs_big" >&6; }
64202
64203  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64204
64205
64206  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64207    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64208    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64209  else
64210    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64211    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64212  fi
64213  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64214  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64216$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64218$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64219
64220
64221  # By default, the main javac compilations use big
64222  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64223
64224
64225  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64226$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64227
64228  # Use serial gc for small short lived tools if possible
64229
64230  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64231  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64232  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64233  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64234  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64235  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64236    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64237    JVM_ARG_OK=true
64238  else
64239    $ECHO "Arg failed:" >&5
64240    $ECHO "$OUTPUT" >&5
64241    JVM_ARG_OK=false
64242  fi
64243
64244
64245  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64246  $ECHO "Command: $JAVA -Xms32M -version" >&5
64247  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64248  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64249  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64250  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64251    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64252    JVM_ARG_OK=true
64253  else
64254    $ECHO "Arg failed:" >&5
64255    $ECHO "$OUTPUT" >&5
64256    JVM_ARG_OK=false
64257  fi
64258
64259
64260  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64261  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64262  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64263  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64264  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64265  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64266    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64267    JVM_ARG_OK=true
64268  else
64269    $ECHO "Arg failed:" >&5
64270    $ECHO "$OUTPUT" >&5
64271    JVM_ARG_OK=false
64272  fi
64273
64274
64275  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64276  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64277  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64278  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64279  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64280  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64281    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64282    JVM_ARG_OK=true
64283  else
64284    $ECHO "Arg failed:" >&5
64285    $ECHO "$OUTPUT" >&5
64286    JVM_ARG_OK=false
64287  fi
64288
64289
64290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64291$as_echo "$boot_jdk_jvmargs_small" >&6; }
64292
64293  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64294
64295
64296  JAVA_TOOL_FLAGS_SMALL=""
64297  for f in $JAVA_FLAGS_SMALL; do
64298    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64299  done
64300
64301
64302
64303# Setup smart javac (after cores and memory have been setup)
64304
64305
64306# Check whether --with-sjavac-server-java was given.
64307if test "${with_sjavac_server_java+set}" = set; then :
64308  withval=$with_sjavac_server_java;
64309fi
64310
64311
64312  if test "x$with_sjavac_server_java" != x; then
64313    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64314    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64315    if test "x$FOUND_VERSION" = x; then
64316      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64317    fi
64318  else
64319    SJAVAC_SERVER_JAVA="$JAVA"
64320  fi
64321
64322
64323  if test "$MEMORY_SIZE" -gt "3000"; then
64324
64325  $ECHO "Check if jvm arg is ok: -d64" >&5
64326  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64327  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64328  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64329  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64330  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64331    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64332    JVM_ARG_OK=true
64333  else
64334    $ECHO "Arg failed:" >&5
64335    $ECHO "$OUTPUT" >&5
64336    JVM_ARG_OK=false
64337  fi
64338
64339    if test "$JVM_ARG_OK" = true; then
64340      JVM_64BIT=true
64341      JVM_ARG_OK=false
64342    fi
64343  fi
64344
64345  MX_VALUE=`expr $MEMORY_SIZE / 2`
64346  if test "$JVM_64BIT" = true; then
64347    # Set ms lower than mx since more than one instance of the server might
64348    # get launched at the same time before they figure out which instance won.
64349    MS_VALUE=512
64350    if test "$MX_VALUE" -gt "2048"; then
64351      MX_VALUE=2048
64352    fi
64353  else
64354    MS_VALUE=256
64355    if test "$MX_VALUE" -gt "1500"; then
64356      MX_VALUE=1500
64357    fi
64358  fi
64359  if test "$MX_VALUE" -lt "512"; then
64360    MX_VALUE=512
64361  fi
64362
64363  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64364  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64365  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64366  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64367  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64368  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64369    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64370    JVM_ARG_OK=true
64371  else
64372    $ECHO "Arg failed:" >&5
64373    $ECHO "$OUTPUT" >&5
64374    JVM_ARG_OK=false
64375  fi
64376
64377
64378
64379  # Check whether --enable-sjavac was given.
64380if test "${enable_sjavac+set}" = set; then :
64381  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64382else
64383  ENABLE_SJAVAC="no"
64384fi
64385
64386  if test "x$JVM_ARG_OK" = "xfalse"; then
64387    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64388$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64389    ENABLE_SJAVAC="no"
64390  fi
64391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64392$as_echo_n "checking whether to use sjavac... " >&6; }
64393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64394$as_echo "$ENABLE_SJAVAC" >&6; }
64395
64396
64397  # Check whether --enable-javac-server was given.
64398if test "${enable_javac_server+set}" = set; then :
64399  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64400else
64401  ENABLE_JAVAC_SERVER="yes"
64402fi
64403
64404  if test "x$JVM_ARG_OK" = "xfalse"; then
64405    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64406$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64407    ENABLE_JAVAC_SERVER="no"
64408  fi
64409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64410$as_echo_n "checking whether to use javac server... " >&6; }
64411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64412$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64413
64414
64415  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64416    # When using a server javac, the small client instances do not need much
64417    # resources.
64418    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64419  fi
64420
64421
64422# Setup use of icecc if requested
64423
64424  # Check whether --enable-icecc was given.
64425if test "${enable_icecc+set}" = set; then :
64426  enableval=$enable_icecc;
64427fi
64428
64429
64430  if test "x${enable_icecc}" = "xyes"; then
64431
64432
64433
64434  # Publish this variable in the help.
64435
64436
64437  if [ -z "${ICECC_CMD+x}" ]; then
64438    # The variable is not set by user, try to locate tool using the code snippet
64439    for ac_prog in icecc
64440do
64441  # Extract the first word of "$ac_prog", so it can be a program name with args.
64442set dummy $ac_prog; ac_word=$2
64443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64444$as_echo_n "checking for $ac_word... " >&6; }
64445if ${ac_cv_path_ICECC_CMD+:} false; then :
64446  $as_echo_n "(cached) " >&6
64447else
64448  case $ICECC_CMD in
64449  [\\/]* | ?:[\\/]*)
64450  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64451  ;;
64452  *)
64453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64454for as_dir in $PATH
64455do
64456  IFS=$as_save_IFS
64457  test -z "$as_dir" && as_dir=.
64458    for ac_exec_ext in '' $ac_executable_extensions; do
64459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64460    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64462    break 2
64463  fi
64464done
64465  done
64466IFS=$as_save_IFS
64467
64468  ;;
64469esac
64470fi
64471ICECC_CMD=$ac_cv_path_ICECC_CMD
64472if test -n "$ICECC_CMD"; then
64473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64474$as_echo "$ICECC_CMD" >&6; }
64475else
64476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64477$as_echo "no" >&6; }
64478fi
64479
64480
64481  test -n "$ICECC_CMD" && break
64482done
64483
64484  else
64485    # The variable is set, but is it from the command line or the environment?
64486
64487    # Try to remove the string !ICECC_CMD! from our list.
64488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64490      # If it failed, the variable was not from the command line. Ignore it,
64491      # but warn the user (except for BASH, which is always set by the calling BASH).
64492      if test "xICECC_CMD" != xBASH; then
64493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64494$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64495      fi
64496      # Try to locate tool using the code snippet
64497      for ac_prog in icecc
64498do
64499  # Extract the first word of "$ac_prog", so it can be a program name with args.
64500set dummy $ac_prog; ac_word=$2
64501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64502$as_echo_n "checking for $ac_word... " >&6; }
64503if ${ac_cv_path_ICECC_CMD+:} false; then :
64504  $as_echo_n "(cached) " >&6
64505else
64506  case $ICECC_CMD in
64507  [\\/]* | ?:[\\/]*)
64508  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64509  ;;
64510  *)
64511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64512for as_dir in $PATH
64513do
64514  IFS=$as_save_IFS
64515  test -z "$as_dir" && as_dir=.
64516    for ac_exec_ext in '' $ac_executable_extensions; do
64517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64518    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64520    break 2
64521  fi
64522done
64523  done
64524IFS=$as_save_IFS
64525
64526  ;;
64527esac
64528fi
64529ICECC_CMD=$ac_cv_path_ICECC_CMD
64530if test -n "$ICECC_CMD"; then
64531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64532$as_echo "$ICECC_CMD" >&6; }
64533else
64534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64535$as_echo "no" >&6; }
64536fi
64537
64538
64539  test -n "$ICECC_CMD" && break
64540done
64541
64542    else
64543      # If it succeeded, then it was overridden by the user. We will use it
64544      # for the tool.
64545
64546      # First remove it from the list of overridden variables, so we can test
64547      # for unknown variables in the end.
64548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64549
64550      # Check if we try to supply an empty value
64551      if test "x$ICECC_CMD" = x; then
64552        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64553$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64555$as_echo_n "checking for ICECC_CMD... " >&6; }
64556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64557$as_echo "disabled" >&6; }
64558      else
64559        # Check if the provided tool contains a complete path.
64560        tool_specified="$ICECC_CMD"
64561        tool_basename="${tool_specified##*/}"
64562        if test "x$tool_basename" = "x$tool_specified"; then
64563          # A command without a complete path is provided, search $PATH.
64564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64565$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64566          # Extract the first word of "$tool_basename", so it can be a program name with args.
64567set dummy $tool_basename; ac_word=$2
64568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64569$as_echo_n "checking for $ac_word... " >&6; }
64570if ${ac_cv_path_ICECC_CMD+:} false; then :
64571  $as_echo_n "(cached) " >&6
64572else
64573  case $ICECC_CMD in
64574  [\\/]* | ?:[\\/]*)
64575  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64576  ;;
64577  *)
64578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64579for as_dir in $PATH
64580do
64581  IFS=$as_save_IFS
64582  test -z "$as_dir" && as_dir=.
64583    for ac_exec_ext in '' $ac_executable_extensions; do
64584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64585    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64587    break 2
64588  fi
64589done
64590  done
64591IFS=$as_save_IFS
64592
64593  ;;
64594esac
64595fi
64596ICECC_CMD=$ac_cv_path_ICECC_CMD
64597if test -n "$ICECC_CMD"; then
64598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64599$as_echo "$ICECC_CMD" >&6; }
64600else
64601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64602$as_echo "no" >&6; }
64603fi
64604
64605
64606          if test "x$ICECC_CMD" = x; then
64607            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64608          fi
64609        else
64610          # Otherwise we believe it is a complete path. Use it as it is.
64611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64612$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64613          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64614$as_echo_n "checking for ICECC_CMD... " >&6; }
64615          if test ! -x "$tool_specified"; then
64616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64617$as_echo "not found" >&6; }
64618            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64619          fi
64620          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64621$as_echo "$tool_specified" >&6; }
64622        fi
64623      fi
64624    fi
64625
64626  fi
64627
64628
64629
64630  if test "x$ICECC_CMD" = x; then
64631    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64632  fi
64633
64634
64635    old_path="$PATH"
64636
64637    # Look for icecc-create-env in some known places
64638    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64639
64640
64641
64642  # Publish this variable in the help.
64643
64644
64645  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64646    # The variable is not set by user, try to locate tool using the code snippet
64647    for ac_prog in icecc-create-env
64648do
64649  # Extract the first word of "$ac_prog", so it can be a program name with args.
64650set dummy $ac_prog; ac_word=$2
64651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64652$as_echo_n "checking for $ac_word... " >&6; }
64653if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64654  $as_echo_n "(cached) " >&6
64655else
64656  case $ICECC_CREATE_ENV in
64657  [\\/]* | ?:[\\/]*)
64658  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64659  ;;
64660  *)
64661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64662for as_dir in $PATH
64663do
64664  IFS=$as_save_IFS
64665  test -z "$as_dir" && as_dir=.
64666    for ac_exec_ext in '' $ac_executable_extensions; do
64667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64668    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64670    break 2
64671  fi
64672done
64673  done
64674IFS=$as_save_IFS
64675
64676  ;;
64677esac
64678fi
64679ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64680if test -n "$ICECC_CREATE_ENV"; then
64681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64682$as_echo "$ICECC_CREATE_ENV" >&6; }
64683else
64684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64685$as_echo "no" >&6; }
64686fi
64687
64688
64689  test -n "$ICECC_CREATE_ENV" && break
64690done
64691
64692  else
64693    # The variable is set, but is it from the command line or the environment?
64694
64695    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64698      # If it failed, the variable was not from the command line. Ignore it,
64699      # but warn the user (except for BASH, which is always set by the calling BASH).
64700      if test "xICECC_CREATE_ENV" != xBASH; then
64701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64702$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64703      fi
64704      # Try to locate tool using the code snippet
64705      for ac_prog in icecc-create-env
64706do
64707  # Extract the first word of "$ac_prog", so it can be a program name with args.
64708set dummy $ac_prog; ac_word=$2
64709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64710$as_echo_n "checking for $ac_word... " >&6; }
64711if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64712  $as_echo_n "(cached) " >&6
64713else
64714  case $ICECC_CREATE_ENV in
64715  [\\/]* | ?:[\\/]*)
64716  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64717  ;;
64718  *)
64719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64720for as_dir in $PATH
64721do
64722  IFS=$as_save_IFS
64723  test -z "$as_dir" && as_dir=.
64724    for ac_exec_ext in '' $ac_executable_extensions; do
64725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64726    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64728    break 2
64729  fi
64730done
64731  done
64732IFS=$as_save_IFS
64733
64734  ;;
64735esac
64736fi
64737ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64738if test -n "$ICECC_CREATE_ENV"; then
64739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64740$as_echo "$ICECC_CREATE_ENV" >&6; }
64741else
64742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64743$as_echo "no" >&6; }
64744fi
64745
64746
64747  test -n "$ICECC_CREATE_ENV" && break
64748done
64749
64750    else
64751      # If it succeeded, then it was overridden by the user. We will use it
64752      # for the tool.
64753
64754      # First remove it from the list of overridden variables, so we can test
64755      # for unknown variables in the end.
64756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64757
64758      # Check if we try to supply an empty value
64759      if test "x$ICECC_CREATE_ENV" = x; then
64760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64761$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64763$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64765$as_echo "disabled" >&6; }
64766      else
64767        # Check if the provided tool contains a complete path.
64768        tool_specified="$ICECC_CREATE_ENV"
64769        tool_basename="${tool_specified##*/}"
64770        if test "x$tool_basename" = "x$tool_specified"; then
64771          # A command without a complete path is provided, search $PATH.
64772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64773$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64774          # Extract the first word of "$tool_basename", so it can be a program name with args.
64775set dummy $tool_basename; ac_word=$2
64776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64777$as_echo_n "checking for $ac_word... " >&6; }
64778if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64779  $as_echo_n "(cached) " >&6
64780else
64781  case $ICECC_CREATE_ENV in
64782  [\\/]* | ?:[\\/]*)
64783  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64784  ;;
64785  *)
64786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64787for as_dir in $PATH
64788do
64789  IFS=$as_save_IFS
64790  test -z "$as_dir" && as_dir=.
64791    for ac_exec_ext in '' $ac_executable_extensions; do
64792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64793    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64795    break 2
64796  fi
64797done
64798  done
64799IFS=$as_save_IFS
64800
64801  ;;
64802esac
64803fi
64804ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64805if test -n "$ICECC_CREATE_ENV"; then
64806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64807$as_echo "$ICECC_CREATE_ENV" >&6; }
64808else
64809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64810$as_echo "no" >&6; }
64811fi
64812
64813
64814          if test "x$ICECC_CREATE_ENV" = x; then
64815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64816          fi
64817        else
64818          # Otherwise we believe it is a complete path. Use it as it is.
64819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64820$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64822$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64823          if test ! -x "$tool_specified"; then
64824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64825$as_echo "not found" >&6; }
64826            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64827          fi
64828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64829$as_echo "$tool_specified" >&6; }
64830        fi
64831      fi
64832    fi
64833
64834  fi
64835
64836
64837
64838  if test "x$ICECC_CREATE_ENV" = x; then
64839    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64840  fi
64841
64842
64843    # Use icecc-create-env to create a minimal compilation environment that can
64844    # be sent to the other hosts in the icecream cluster.
64845    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64846    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64847    # Older versions of icecc does not have the --gcc parameter
64848    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64849      icecc_gcc_arg="--gcc"
64850    fi
64851    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64852
64853  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64854      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64855          ${icecc_create_env_log} 2>&1 )
64856  if test "$?" != "0"; then
64857    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64858$as_echo "$as_me: icecc-create-env output:" >&6;}
64859    cat \
64860          ${icecc_create_env_log}
64861    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64862  fi
64863
64864    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64865      # For clang, the icecc compilerwrapper is needed. It usually resides next
64866      # to icecc-create-env.
64867
64868
64869
64870  # Publish this variable in the help.
64871
64872
64873  if [ -z "${ICECC_WRAPPER+x}" ]; then
64874    # The variable is not set by user, try to locate tool using the code snippet
64875    for ac_prog in compilerwrapper
64876do
64877  # Extract the first word of "$ac_prog", so it can be a program name with args.
64878set dummy $ac_prog; ac_word=$2
64879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64880$as_echo_n "checking for $ac_word... " >&6; }
64881if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64882  $as_echo_n "(cached) " >&6
64883else
64884  case $ICECC_WRAPPER in
64885  [\\/]* | ?:[\\/]*)
64886  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64887  ;;
64888  *)
64889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64890for as_dir in $PATH
64891do
64892  IFS=$as_save_IFS
64893  test -z "$as_dir" && as_dir=.
64894    for ac_exec_ext in '' $ac_executable_extensions; do
64895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64896    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64898    break 2
64899  fi
64900done
64901  done
64902IFS=$as_save_IFS
64903
64904  ;;
64905esac
64906fi
64907ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64908if test -n "$ICECC_WRAPPER"; then
64909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64910$as_echo "$ICECC_WRAPPER" >&6; }
64911else
64912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64913$as_echo "no" >&6; }
64914fi
64915
64916
64917  test -n "$ICECC_WRAPPER" && break
64918done
64919
64920  else
64921    # The variable is set, but is it from the command line or the environment?
64922
64923    # Try to remove the string !ICECC_WRAPPER! from our list.
64924    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64925    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64926      # If it failed, the variable was not from the command line. Ignore it,
64927      # but warn the user (except for BASH, which is always set by the calling BASH).
64928      if test "xICECC_WRAPPER" != xBASH; then
64929        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64930$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64931      fi
64932      # Try to locate tool using the code snippet
64933      for ac_prog in compilerwrapper
64934do
64935  # Extract the first word of "$ac_prog", so it can be a program name with args.
64936set dummy $ac_prog; ac_word=$2
64937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64938$as_echo_n "checking for $ac_word... " >&6; }
64939if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64940  $as_echo_n "(cached) " >&6
64941else
64942  case $ICECC_WRAPPER in
64943  [\\/]* | ?:[\\/]*)
64944  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64945  ;;
64946  *)
64947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64948for as_dir in $PATH
64949do
64950  IFS=$as_save_IFS
64951  test -z "$as_dir" && as_dir=.
64952    for ac_exec_ext in '' $ac_executable_extensions; do
64953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64954    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64956    break 2
64957  fi
64958done
64959  done
64960IFS=$as_save_IFS
64961
64962  ;;
64963esac
64964fi
64965ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64966if test -n "$ICECC_WRAPPER"; then
64967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64968$as_echo "$ICECC_WRAPPER" >&6; }
64969else
64970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64971$as_echo "no" >&6; }
64972fi
64973
64974
64975  test -n "$ICECC_WRAPPER" && break
64976done
64977
64978    else
64979      # If it succeeded, then it was overridden by the user. We will use it
64980      # for the tool.
64981
64982      # First remove it from the list of overridden variables, so we can test
64983      # for unknown variables in the end.
64984      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64985
64986      # Check if we try to supply an empty value
64987      if test "x$ICECC_WRAPPER" = x; then
64988        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
64989$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
64990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64991$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64993$as_echo "disabled" >&6; }
64994      else
64995        # Check if the provided tool contains a complete path.
64996        tool_specified="$ICECC_WRAPPER"
64997        tool_basename="${tool_specified##*/}"
64998        if test "x$tool_basename" = "x$tool_specified"; then
64999          # A command without a complete path is provided, search $PATH.
65000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65001$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65002          # Extract the first word of "$tool_basename", so it can be a program name with args.
65003set dummy $tool_basename; ac_word=$2
65004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65005$as_echo_n "checking for $ac_word... " >&6; }
65006if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65007  $as_echo_n "(cached) " >&6
65008else
65009  case $ICECC_WRAPPER in
65010  [\\/]* | ?:[\\/]*)
65011  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65012  ;;
65013  *)
65014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65015for as_dir in $PATH
65016do
65017  IFS=$as_save_IFS
65018  test -z "$as_dir" && as_dir=.
65019    for ac_exec_ext in '' $ac_executable_extensions; do
65020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65021    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65023    break 2
65024  fi
65025done
65026  done
65027IFS=$as_save_IFS
65028
65029  ;;
65030esac
65031fi
65032ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65033if test -n "$ICECC_WRAPPER"; then
65034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65035$as_echo "$ICECC_WRAPPER" >&6; }
65036else
65037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65038$as_echo "no" >&6; }
65039fi
65040
65041
65042          if test "x$ICECC_WRAPPER" = x; then
65043            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65044          fi
65045        else
65046          # Otherwise we believe it is a complete path. Use it as it is.
65047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65048$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65049          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65050$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65051          if test ! -x "$tool_specified"; then
65052            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65053$as_echo "not found" >&6; }
65054            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65055          fi
65056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65057$as_echo "$tool_specified" >&6; }
65058        fi
65059      fi
65060    fi
65061
65062  fi
65063
65064
65065
65066  if test "x$ICECC_WRAPPER" = x; then
65067    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65068  fi
65069
65070
65071
65072  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65073      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65074  if test "$?" != "0"; then
65075    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65076$as_echo "$as_me: icecc-create-env output:" >&6;}
65077    cat ${icecc_create_env_log}
65078    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65079  fi
65080
65081    else
65082      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65083    fi
65084    PATH="$old_path"
65085    # The bundle with the compiler gets a name based on checksums. Parse log file
65086    # to find it.
65087    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65088    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65089    if test ! -f ${ICECC_ENV_BUNDLE}; then
65090      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65091    fi
65092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65093$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65095$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65096    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65097
65098    if test "x${COMPILE_TYPE}" = "xcross"; then
65099      # If cross compiling, create a separate env package for the build compiler
65100      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65101      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65102      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65103
65104  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65105      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65106            ${icecc_create_env_log_build} 2>&1 )
65107  if test "$?" != "0"; then
65108    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65109$as_echo "$as_me: icecc-create-env output:" >&6;}
65110    cat \
65111            ${icecc_create_env_log_build}
65112    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65113  fi
65114
65115      elif test "x${BUILD_CC##*/}" = "xclang"; then
65116
65117  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65118      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65119  if test "$?" != "0"; then
65120    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65121$as_echo "$as_me: icecc-create-env output:" >&6;}
65122    cat ${icecc_create_env_log_build}
65123    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65124  fi
65125
65126      else
65127        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65128      fi
65129      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65130      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65131      if test ! -f ${ICECC_ENV_BUNDLE}; then
65132        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65133      fi
65134      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65135$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65137$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65138      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65139          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65140    else
65141      BUILD_ICECC="${ICECC}"
65142    fi
65143
65144
65145  fi
65146
65147
65148# Can the C/C++ compiler use precompiled headers?
65149
65150
65151  ###############################################################################
65152  #
65153  # Can the C/C++ compiler use precompiled headers?
65154  #
65155  # Check whether --enable-precompiled-headers was given.
65156if test "${enable_precompiled_headers+set}" = set; then :
65157  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65158else
65159  ENABLE_PRECOMPH=yes
65160fi
65161
65162
65163  USE_PRECOMPILED_HEADER=1
65164  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65165$as_echo_n "checking If precompiled header is enabled... " >&6; }
65166  if test "x$ENABLE_PRECOMPH" = xno; then
65167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65168$as_echo "no, forced" >&6; }
65169    USE_PRECOMPILED_HEADER=0
65170  elif test "x$ICECC" != "x"; then
65171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65172$as_echo "no, does not work effectively with icecc" >&6; }
65173    USE_PRECOMPILED_HEADER=0
65174  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65176$as_echo "no, does not work with Solaris Studio" >&6; }
65177    USE_PRECOMPILED_HEADER=0
65178  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65180$as_echo "no, does not work with xlc" >&6; }
65181    USE_PRECOMPILED_HEADER=0
65182  else
65183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65184$as_echo "yes" >&6; }
65185  fi
65186
65187  if test "x$ENABLE_PRECOMPH" = xyes; then
65188    # Check that the compiler actually supports precomp headers.
65189    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65190      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65191$as_echo_n "checking that precompiled headers work... " >&6; }
65192      echo "int alfa();" > conftest.h
65193      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65194      if test ! -f conftest.hpp.gch; then
65195        USE_PRECOMPILED_HEADER=0
65196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65197$as_echo "no" >&6; }
65198      else
65199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65200$as_echo "yes" >&6; }
65201      fi
65202      $RM conftest.h conftest.hpp.gch
65203    fi
65204  fi
65205
65206
65207
65208
65209# Setup use of ccache, if available
65210
65211  # Check whether --enable-ccache was given.
65212if test "${enable_ccache+set}" = set; then :
65213  enableval=$enable_ccache;
65214fi
65215
65216
65217  CCACHE_STATUS=
65218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65219$as_echo_n "checking is ccache enabled... " >&6; }
65220  if test "x$enable_ccache" = xyes; then
65221    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65223$as_echo "yes" >&6; }
65224      OLD_PATH="$PATH"
65225      if test "x$TOOLCHAIN_PATH" != x; then
65226        PATH=$TOOLCHAIN_PATH:$PATH
65227      fi
65228
65229
65230
65231  # Publish this variable in the help.
65232
65233
65234  if [ -z "${CCACHE+x}" ]; then
65235    # The variable is not set by user, try to locate tool using the code snippet
65236    for ac_prog in ccache
65237do
65238  # Extract the first word of "$ac_prog", so it can be a program name with args.
65239set dummy $ac_prog; ac_word=$2
65240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65241$as_echo_n "checking for $ac_word... " >&6; }
65242if ${ac_cv_path_CCACHE+:} false; then :
65243  $as_echo_n "(cached) " >&6
65244else
65245  case $CCACHE in
65246  [\\/]* | ?:[\\/]*)
65247  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65248  ;;
65249  *)
65250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65251for as_dir in $PATH
65252do
65253  IFS=$as_save_IFS
65254  test -z "$as_dir" && as_dir=.
65255    for ac_exec_ext in '' $ac_executable_extensions; do
65256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65257    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65259    break 2
65260  fi
65261done
65262  done
65263IFS=$as_save_IFS
65264
65265  ;;
65266esac
65267fi
65268CCACHE=$ac_cv_path_CCACHE
65269if test -n "$CCACHE"; then
65270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65271$as_echo "$CCACHE" >&6; }
65272else
65273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65274$as_echo "no" >&6; }
65275fi
65276
65277
65278  test -n "$CCACHE" && break
65279done
65280
65281  else
65282    # The variable is set, but is it from the command line or the environment?
65283
65284    # Try to remove the string !CCACHE! from our list.
65285    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65286    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65287      # If it failed, the variable was not from the command line. Ignore it,
65288      # but warn the user (except for BASH, which is always set by the calling BASH).
65289      if test "xCCACHE" != xBASH; then
65290        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65291$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65292      fi
65293      # Try to locate tool using the code snippet
65294      for ac_prog in ccache
65295do
65296  # Extract the first word of "$ac_prog", so it can be a program name with args.
65297set dummy $ac_prog; ac_word=$2
65298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65299$as_echo_n "checking for $ac_word... " >&6; }
65300if ${ac_cv_path_CCACHE+:} false; then :
65301  $as_echo_n "(cached) " >&6
65302else
65303  case $CCACHE in
65304  [\\/]* | ?:[\\/]*)
65305  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65306  ;;
65307  *)
65308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65309for as_dir in $PATH
65310do
65311  IFS=$as_save_IFS
65312  test -z "$as_dir" && as_dir=.
65313    for ac_exec_ext in '' $ac_executable_extensions; do
65314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65315    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65317    break 2
65318  fi
65319done
65320  done
65321IFS=$as_save_IFS
65322
65323  ;;
65324esac
65325fi
65326CCACHE=$ac_cv_path_CCACHE
65327if test -n "$CCACHE"; then
65328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65329$as_echo "$CCACHE" >&6; }
65330else
65331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65332$as_echo "no" >&6; }
65333fi
65334
65335
65336  test -n "$CCACHE" && break
65337done
65338
65339    else
65340      # If it succeeded, then it was overridden by the user. We will use it
65341      # for the tool.
65342
65343      # First remove it from the list of overridden variables, so we can test
65344      # for unknown variables in the end.
65345      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65346
65347      # Check if we try to supply an empty value
65348      if test "x$CCACHE" = x; then
65349        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65350$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65351        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65352$as_echo_n "checking for CCACHE... " >&6; }
65353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65354$as_echo "disabled" >&6; }
65355      else
65356        # Check if the provided tool contains a complete path.
65357        tool_specified="$CCACHE"
65358        tool_basename="${tool_specified##*/}"
65359        if test "x$tool_basename" = "x$tool_specified"; then
65360          # A command without a complete path is provided, search $PATH.
65361          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65362$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65363          # Extract the first word of "$tool_basename", so it can be a program name with args.
65364set dummy $tool_basename; ac_word=$2
65365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65366$as_echo_n "checking for $ac_word... " >&6; }
65367if ${ac_cv_path_CCACHE+:} false; then :
65368  $as_echo_n "(cached) " >&6
65369else
65370  case $CCACHE in
65371  [\\/]* | ?:[\\/]*)
65372  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65373  ;;
65374  *)
65375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65376for as_dir in $PATH
65377do
65378  IFS=$as_save_IFS
65379  test -z "$as_dir" && as_dir=.
65380    for ac_exec_ext in '' $ac_executable_extensions; do
65381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65382    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65384    break 2
65385  fi
65386done
65387  done
65388IFS=$as_save_IFS
65389
65390  ;;
65391esac
65392fi
65393CCACHE=$ac_cv_path_CCACHE
65394if test -n "$CCACHE"; then
65395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65396$as_echo "$CCACHE" >&6; }
65397else
65398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65399$as_echo "no" >&6; }
65400fi
65401
65402
65403          if test "x$CCACHE" = x; then
65404            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65405          fi
65406        else
65407          # Otherwise we believe it is a complete path. Use it as it is.
65408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65409$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65410          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65411$as_echo_n "checking for CCACHE... " >&6; }
65412          if test ! -x "$tool_specified"; then
65413            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65414$as_echo "not found" >&6; }
65415            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65416          fi
65417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65418$as_echo "$tool_specified" >&6; }
65419        fi
65420      fi
65421    fi
65422
65423  fi
65424
65425
65426
65427  if test "x$CCACHE" = x; then
65428    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65429  fi
65430
65431
65432      PATH="$OLD_PATH"
65433      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65434      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65435    else
65436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65437$as_echo "no" >&6; }
65438      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65439$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65440    fi
65441  elif test "x$enable_ccache" = xno; then
65442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65443$as_echo "no, explicitly disabled" >&6; }
65444    CCACHE_STATUS="Disabled"
65445  elif test "x$enable_ccache" = x; then
65446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65447$as_echo "no" >&6; }
65448  else
65449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65450$as_echo "unknown" >&6; }
65451    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65452  fi
65453
65454
65455
65456# Check whether --with-ccache-dir was given.
65457if test "${with_ccache_dir+set}" = set; then :
65458  withval=$with_ccache_dir;
65459fi
65460
65461
65462  if test "x$with_ccache_dir" != x; then
65463    # When using a non home ccache directory, assume the use is to share ccache files
65464    # with other users. Thus change the umask.
65465    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65466    if test "x$CCACHE" = x; then
65467      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65468$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65469    fi
65470  fi
65471
65472  if test "x$CCACHE" != x; then
65473
65474  if test "x$CCACHE" != x; then
65475    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
65476      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65477          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
65478      if test "x$HAS_BAD_CCACHE" != "x"; then
65479        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
65480      fi
65481    fi
65482    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65483      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65484          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65485      if test "x$HAS_BAD_CCACHE" != "x"; then
65486        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65487      fi
65488      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65489$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65490      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65491      PUSHED_FLAGS="$CXXFLAGS"
65492      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65493      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65494/* end confdefs.h.  */
65495
65496int
65497main ()
65498{
65499
65500  ;
65501  return 0;
65502}
65503_ACEOF
65504if ac_fn_cxx_try_compile "$LINENO"; then :
65505  CC_KNOWS_CCACHE_TRICK=yes
65506else
65507  CC_KNOWS_CCACHE_TRICK=no
65508fi
65509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65510      CXXFLAGS="$PUSHED_FLAGS"
65511      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65513$as_echo "yes" >&6; }
65514        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65515
65516        CCACHE_SLOPPINESS=pch_defines,time_macros
65517      else
65518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65519$as_echo "no" >&6; }
65520        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65521      fi
65522    fi
65523
65524    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65525        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65526
65527    if test "x$SET_CCACHE_DIR" != x; then
65528      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65529      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65530    fi
65531  fi
65532
65533  fi
65534
65535
65536###############################################################################
65537#
65538# And now the finish...
65539#
65540###############################################################################
65541
65542# Check for some common pitfalls
65543
65544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65545    file_to_test="$SRC_ROOT/LICENSE"
65546    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65547      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
65548    fi
65549  fi
65550
65551
65552  # Did user specify any unknown variables?
65553
65554  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65555    # Replace the separating ! with spaces before presenting for end user.
65556    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65557    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65558$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65559  fi
65560
65561
65562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65563$as_echo_n "checking if build directory is on local disk... " >&6; }
65564
65565  # df -l lists only local disks; if the given directory is not found then
65566  # a non-zero exit code is given
65567  if test "x$DF" = x; then
65568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65569      # msys does not have df; use Windows "net use" instead.
65570      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65571      if test "x$IS_NETWORK_DISK" = x; then
65572        OUTPUT_DIR_IS_LOCAL="yes"
65573      else
65574        OUTPUT_DIR_IS_LOCAL="no"
65575      fi
65576    else
65577      # No df here, say it's local
65578      OUTPUT_DIR_IS_LOCAL="yes"
65579    fi
65580  else
65581    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65582      OUTPUT_DIR_IS_LOCAL="yes"
65583    else
65584      OUTPUT_DIR_IS_LOCAL="no"
65585    fi
65586  fi
65587
65588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65589$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65590
65591
65592
65593  # Check if the user has any old-style ALT_ variables set.
65594  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65595
65596  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65597  # Since we can't properly handle the dependencies for this, warn the user about the situation
65598  if test -e $OUTPUT_ROOT/spec.gmk; then
65599    IS_RECONFIGURE=yes
65600  else
65601    IS_RECONFIGURE=no
65602  fi
65603
65604
65605# At the end, call the custom hook. (Dummy macro if no custom sources available)
65606
65607
65608# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65609
65610  # Keep feature lists sorted and free of duplicates
65611  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65612  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65613  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65614  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65615  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65616  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65617  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65618
65619  # Validate features
65620  for variant in $JVM_VARIANTS; do
65621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65622$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65623    features_var_name=JVM_FEATURES_$variant
65624    JVM_FEATURES_TO_TEST=${!features_var_name}
65625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65626$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65627    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65628    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65629    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65630    if test "x$INVALID_FEATURES" != x; then
65631      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65632    fi
65633  done
65634
65635
65636# We're messing a bit with internal autoconf variables to put the config.status
65637# in the output directory instead of the current directory.
65638CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65639
65640# Create the actual output files. Now the main work of configure is done.
65641cat >confcache <<\_ACEOF
65642# This file is a shell script that caches the results of configure
65643# tests run on this system so they can be shared between configure
65644# scripts and configure runs, see configure's option --config-cache.
65645# It is not useful on other systems.  If it contains results you don't
65646# want to keep, you may remove or edit it.
65647#
65648# config.status only pays attention to the cache file if you give it
65649# the --recheck option to rerun configure.
65650#
65651# `ac_cv_env_foo' variables (set or unset) will be overridden when
65652# loading this file, other *unset* `ac_cv_foo' will be assigned the
65653# following values.
65654
65655_ACEOF
65656
65657# The following way of writing the cache mishandles newlines in values,
65658# but we know of no workaround that is simple, portable, and efficient.
65659# So, we kill variables containing newlines.
65660# Ultrix sh set writes to stderr and can't be redirected directly,
65661# and sets the high bit in the cache file unless we assign to the vars.
65662(
65663  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65664    eval ac_val=\$$ac_var
65665    case $ac_val in #(
65666    *${as_nl}*)
65667      case $ac_var in #(
65668      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65669$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65670      esac
65671      case $ac_var in #(
65672      _ | IFS | as_nl) ;; #(
65673      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65674      *) { eval $ac_var=; unset $ac_var;} ;;
65675      esac ;;
65676    esac
65677  done
65678
65679  (set) 2>&1 |
65680    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65681    *${as_nl}ac_space=\ *)
65682      # `set' does not quote correctly, so add quotes: double-quote
65683      # substitution turns \\\\ into \\, and sed turns \\ into \.
65684      sed -n \
65685	"s/'/'\\\\''/g;
65686	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65687      ;; #(
65688    *)
65689      # `set' quotes correctly as required by POSIX, so do not add quotes.
65690      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65691      ;;
65692    esac |
65693    sort
65694) |
65695  sed '
65696     /^ac_cv_env_/b end
65697     t clear
65698     :clear
65699     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65700     t end
65701     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65702     :end' >>confcache
65703if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65704  if test -w "$cache_file"; then
65705    if test "x$cache_file" != "x/dev/null"; then
65706      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65707$as_echo "$as_me: updating cache $cache_file" >&6;}
65708      if test ! -f "$cache_file" || test -h "$cache_file"; then
65709	cat confcache >"$cache_file"
65710      else
65711        case $cache_file in #(
65712        */* | ?:*)
65713	  mv -f confcache "$cache_file"$$ &&
65714	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65715        *)
65716	  mv -f confcache "$cache_file" ;;
65717	esac
65718      fi
65719    fi
65720  else
65721    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65722$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65723  fi
65724fi
65725rm -f confcache
65726
65727test "x$prefix" = xNONE && prefix=$ac_default_prefix
65728# Let make expand exec_prefix.
65729test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65730
65731# Transform confdefs.h into DEFS.
65732# Protect against shell expansion while executing Makefile rules.
65733# Protect against Makefile macro expansion.
65734#
65735# If the first sed substitution is executed (which looks for macros that
65736# take arguments), then branch to the quote section.  Otherwise,
65737# look for a macro that doesn't take arguments.
65738ac_script='
65739:mline
65740/\\$/{
65741 N
65742 s,\\\n,,
65743 b mline
65744}
65745t clear
65746:clear
65747s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65748t quote
65749s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65750t quote
65751b any
65752:quote
65753s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65754s/\[/\\&/g
65755s/\]/\\&/g
65756s/\$/$$/g
65757H
65758:any
65759${
65760	g
65761	s/^\n//
65762	s/\n/ /g
65763	p
65764}
65765'
65766DEFS=`sed -n "$ac_script" confdefs.h`
65767
65768
65769ac_libobjs=
65770ac_ltlibobjs=
65771U=
65772for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65773  # 1. Remove the extension, and $U if already installed.
65774  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65775  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65776  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65777  #    will be set to the directory where LIBOBJS objects are built.
65778  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65779  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65780done
65781LIBOBJS=$ac_libobjs
65782
65783LTLIBOBJS=$ac_ltlibobjs
65784
65785
65786
65787: "${CONFIG_STATUS=./config.status}"
65788ac_write_fail=0
65789ac_clean_files_save=$ac_clean_files
65790ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65791{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65792$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65793as_write_fail=0
65794cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65795#! $SHELL
65796# Generated by $as_me.
65797# Run this file to recreate the current configuration.
65798# Compiler output produced by configure, useful for debugging
65799# configure, is in config.log if it exists.
65800
65801debug=false
65802ac_cs_recheck=false
65803ac_cs_silent=false
65804
65805SHELL=\${CONFIG_SHELL-$SHELL}
65806export SHELL
65807_ASEOF
65808cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65809## -------------------- ##
65810## M4sh Initialization. ##
65811## -------------------- ##
65812
65813# Be more Bourne compatible
65814DUALCASE=1; export DUALCASE # for MKS sh
65815if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65816  emulate sh
65817  NULLCMD=:
65818  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65819  # is contrary to our usage.  Disable this feature.
65820  alias -g '${1+"$@"}'='"$@"'
65821  setopt NO_GLOB_SUBST
65822else
65823  case `(set -o) 2>/dev/null` in #(
65824  *posix*) :
65825    set -o posix ;; #(
65826  *) :
65827     ;;
65828esac
65829fi
65830
65831
65832as_nl='
65833'
65834export as_nl
65835# Printing a long string crashes Solaris 7 /usr/bin/printf.
65836as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65837as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65838as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65839# Prefer a ksh shell builtin over an external printf program on Solaris,
65840# but without wasting forks for bash or zsh.
65841if test -z "$BASH_VERSION$ZSH_VERSION" \
65842    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65843  as_echo='print -r --'
65844  as_echo_n='print -rn --'
65845elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65846  as_echo='printf %s\n'
65847  as_echo_n='printf %s'
65848else
65849  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65850    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65851    as_echo_n='/usr/ucb/echo -n'
65852  else
65853    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65854    as_echo_n_body='eval
65855      arg=$1;
65856      case $arg in #(
65857      *"$as_nl"*)
65858	expr "X$arg" : "X\\(.*\\)$as_nl";
65859	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65860      esac;
65861      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65862    '
65863    export as_echo_n_body
65864    as_echo_n='sh -c $as_echo_n_body as_echo'
65865  fi
65866  export as_echo_body
65867  as_echo='sh -c $as_echo_body as_echo'
65868fi
65869
65870# The user is always right.
65871if test "${PATH_SEPARATOR+set}" != set; then
65872  PATH_SEPARATOR=:
65873  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65874    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65875      PATH_SEPARATOR=';'
65876  }
65877fi
65878
65879
65880# IFS
65881# We need space, tab and new line, in precisely that order.  Quoting is
65882# there to prevent editors from complaining about space-tab.
65883# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65884# splitting by setting IFS to empty value.)
65885IFS=" ""	$as_nl"
65886
65887# Find who we are.  Look in the path if we contain no directory separator.
65888as_myself=
65889case $0 in #((
65890  *[\\/]* ) as_myself=$0 ;;
65891  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65892for as_dir in $PATH
65893do
65894  IFS=$as_save_IFS
65895  test -z "$as_dir" && as_dir=.
65896    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65897  done
65898IFS=$as_save_IFS
65899
65900     ;;
65901esac
65902# We did not find ourselves, most probably we were run as `sh COMMAND'
65903# in which case we are not to be found in the path.
65904if test "x$as_myself" = x; then
65905  as_myself=$0
65906fi
65907if test ! -f "$as_myself"; then
65908  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65909  exit 1
65910fi
65911
65912# Unset variables that we do not need and which cause bugs (e.g. in
65913# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65914# suppresses any "Segmentation fault" message there.  '((' could
65915# trigger a bug in pdksh 5.2.14.
65916for as_var in BASH_ENV ENV MAIL MAILPATH
65917do eval test x\${$as_var+set} = xset \
65918  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65919done
65920PS1='$ '
65921PS2='> '
65922PS4='+ '
65923
65924# NLS nuisances.
65925LC_ALL=C
65926export LC_ALL
65927LANGUAGE=C
65928export LANGUAGE
65929
65930# CDPATH.
65931(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65932
65933
65934# as_fn_error STATUS ERROR [LINENO LOG_FD]
65935# ----------------------------------------
65936# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65937# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65938# script with STATUS, using 1 if that was 0.
65939as_fn_error ()
65940{
65941  as_status=$1; test $as_status -eq 0 && as_status=1
65942  if test "$4"; then
65943    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65944    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65945  fi
65946  $as_echo "$as_me: error: $2" >&2
65947  as_fn_exit $as_status
65948} # as_fn_error
65949
65950
65951# as_fn_set_status STATUS
65952# -----------------------
65953# Set $? to STATUS, without forking.
65954as_fn_set_status ()
65955{
65956  return $1
65957} # as_fn_set_status
65958
65959# as_fn_exit STATUS
65960# -----------------
65961# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65962as_fn_exit ()
65963{
65964  set +e
65965  as_fn_set_status $1
65966  exit $1
65967} # as_fn_exit
65968
65969# as_fn_unset VAR
65970# ---------------
65971# Portably unset VAR.
65972as_fn_unset ()
65973{
65974  { eval $1=; unset $1;}
65975}
65976as_unset=as_fn_unset
65977# as_fn_append VAR VALUE
65978# ----------------------
65979# Append the text in VALUE to the end of the definition contained in VAR. Take
65980# advantage of any shell optimizations that allow amortized linear growth over
65981# repeated appends, instead of the typical quadratic growth present in naive
65982# implementations.
65983if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65984  eval 'as_fn_append ()
65985  {
65986    eval $1+=\$2
65987  }'
65988else
65989  as_fn_append ()
65990  {
65991    eval $1=\$$1\$2
65992  }
65993fi # as_fn_append
65994
65995# as_fn_arith ARG...
65996# ------------------
65997# Perform arithmetic evaluation on the ARGs, and store the result in the
65998# global $as_val. Take advantage of shells that can avoid forks. The arguments
65999# must be portable across $(()) and expr.
66000if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66001  eval 'as_fn_arith ()
66002  {
66003    as_val=$(( $* ))
66004  }'
66005else
66006  as_fn_arith ()
66007  {
66008    as_val=`expr "$@" || test $? -eq 1`
66009  }
66010fi # as_fn_arith
66011
66012
66013if expr a : '\(a\)' >/dev/null 2>&1 &&
66014   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66015  as_expr=expr
66016else
66017  as_expr=false
66018fi
66019
66020if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66021  as_basename=basename
66022else
66023  as_basename=false
66024fi
66025
66026if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66027  as_dirname=dirname
66028else
66029  as_dirname=false
66030fi
66031
66032as_me=`$as_basename -- "$0" ||
66033$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66034	 X"$0" : 'X\(//\)$' \| \
66035	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66036$as_echo X/"$0" |
66037    sed '/^.*\/\([^/][^/]*\)\/*$/{
66038	    s//\1/
66039	    q
66040	  }
66041	  /^X\/\(\/\/\)$/{
66042	    s//\1/
66043	    q
66044	  }
66045	  /^X\/\(\/\).*/{
66046	    s//\1/
66047	    q
66048	  }
66049	  s/.*/./; q'`
66050
66051# Avoid depending upon Character Ranges.
66052as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66053as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66054as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66055as_cr_digits='0123456789'
66056as_cr_alnum=$as_cr_Letters$as_cr_digits
66057
66058ECHO_C= ECHO_N= ECHO_T=
66059case `echo -n x` in #(((((
66060-n*)
66061  case `echo 'xy\c'` in
66062  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66063  xy)  ECHO_C='\c';;
66064  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66065       ECHO_T='	';;
66066  esac;;
66067*)
66068  ECHO_N='-n';;
66069esac
66070
66071rm -f conf$$ conf$$.exe conf$$.file
66072if test -d conf$$.dir; then
66073  rm -f conf$$.dir/conf$$.file
66074else
66075  rm -f conf$$.dir
66076  mkdir conf$$.dir 2>/dev/null
66077fi
66078if (echo >conf$$.file) 2>/dev/null; then
66079  if ln -s conf$$.file conf$$ 2>/dev/null; then
66080    as_ln_s='ln -s'
66081    # ... but there are two gotchas:
66082    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66083    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66084    # In both cases, we have to default to `cp -pR'.
66085    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66086      as_ln_s='cp -pR'
66087  elif ln conf$$.file conf$$ 2>/dev/null; then
66088    as_ln_s=ln
66089  else
66090    as_ln_s='cp -pR'
66091  fi
66092else
66093  as_ln_s='cp -pR'
66094fi
66095rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66096rmdir conf$$.dir 2>/dev/null
66097
66098
66099# as_fn_mkdir_p
66100# -------------
66101# Create "$as_dir" as a directory, including parents if necessary.
66102as_fn_mkdir_p ()
66103{
66104
66105  case $as_dir in #(
66106  -*) as_dir=./$as_dir;;
66107  esac
66108  test -d "$as_dir" || eval $as_mkdir_p || {
66109    as_dirs=
66110    while :; do
66111      case $as_dir in #(
66112      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66113      *) as_qdir=$as_dir;;
66114      esac
66115      as_dirs="'$as_qdir' $as_dirs"
66116      as_dir=`$as_dirname -- "$as_dir" ||
66117$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66118	 X"$as_dir" : 'X\(//\)[^/]' \| \
66119	 X"$as_dir" : 'X\(//\)$' \| \
66120	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66121$as_echo X"$as_dir" |
66122    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66123	    s//\1/
66124	    q
66125	  }
66126	  /^X\(\/\/\)[^/].*/{
66127	    s//\1/
66128	    q
66129	  }
66130	  /^X\(\/\/\)$/{
66131	    s//\1/
66132	    q
66133	  }
66134	  /^X\(\/\).*/{
66135	    s//\1/
66136	    q
66137	  }
66138	  s/.*/./; q'`
66139      test -d "$as_dir" && break
66140    done
66141    test -z "$as_dirs" || eval "mkdir $as_dirs"
66142  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66143
66144
66145} # as_fn_mkdir_p
66146if mkdir -p . 2>/dev/null; then
66147  as_mkdir_p='mkdir -p "$as_dir"'
66148else
66149  test -d ./-p && rmdir ./-p
66150  as_mkdir_p=false
66151fi
66152
66153
66154# as_fn_executable_p FILE
66155# -----------------------
66156# Test if FILE is an executable regular file.
66157as_fn_executable_p ()
66158{
66159  test -f "$1" && test -x "$1"
66160} # as_fn_executable_p
66161as_test_x='test -x'
66162as_executable_p=as_fn_executable_p
66163
66164# Sed expression to map a string onto a valid CPP name.
66165as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66166
66167# Sed expression to map a string onto a valid variable name.
66168as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66169
66170
66171exec 6>&1
66172## ----------------------------------- ##
66173## Main body of $CONFIG_STATUS script. ##
66174## ----------------------------------- ##
66175_ASEOF
66176test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66177
66178cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66179# Save the log message, to keep $0 and so on meaningful, and to
66180# report actual input values of CONFIG_FILES etc. instead of their
66181# values after options handling.
66182ac_log="
66183This file was extended by OpenJDK $as_me jdk9, which was
66184generated by GNU Autoconf 2.69.  Invocation command line was
66185
66186  CONFIG_FILES    = $CONFIG_FILES
66187  CONFIG_HEADERS  = $CONFIG_HEADERS
66188  CONFIG_LINKS    = $CONFIG_LINKS
66189  CONFIG_COMMANDS = $CONFIG_COMMANDS
66190  $ $0 $@
66191
66192on `(hostname || uname -n) 2>/dev/null | sed 1q`
66193"
66194
66195_ACEOF
66196
66197case $ac_config_files in *"
66198"*) set x $ac_config_files; shift; ac_config_files=$*;;
66199esac
66200
66201
66202
66203cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66204# Files that config.status was made for.
66205config_files="$ac_config_files"
66206
66207_ACEOF
66208
66209cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66210ac_cs_usage="\
66211\`$as_me' instantiates files and other configuration actions
66212from templates according to the current configuration.  Unless the files
66213and actions are specified as TAGs, all are instantiated by default.
66214
66215Usage: $0 [OPTION]... [TAG]...
66216
66217  -h, --help       print this help, then exit
66218  -V, --version    print version number and configuration settings, then exit
66219      --config     print configuration, then exit
66220  -q, --quiet, --silent
66221                   do not print progress messages
66222  -d, --debug      don't remove temporary files
66223      --recheck    update $as_me by reconfiguring in the same conditions
66224      --file=FILE[:TEMPLATE]
66225                   instantiate the configuration file FILE
66226
66227Configuration files:
66228$config_files
66229
66230Report bugs to <build-dev@openjdk.java.net>.
66231OpenJDK home page: <http://openjdk.java.net>."
66232
66233_ACEOF
66234cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66235ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66236ac_cs_version="\\
66237OpenJDK config.status jdk9
66238configured by $0, generated by GNU Autoconf 2.69,
66239  with options \\"\$ac_cs_config\\"
66240
66241Copyright (C) 2012 Free Software Foundation, Inc.
66242This config.status script is free software; the Free Software Foundation
66243gives unlimited permission to copy, distribute and modify it."
66244
66245ac_pwd='$ac_pwd'
66246srcdir='$srcdir'
66247AWK='$AWK'
66248test -n "\$AWK" || AWK=awk
66249_ACEOF
66250
66251cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66252# The default lists apply if the user does not specify any file.
66253ac_need_defaults=:
66254while test $# != 0
66255do
66256  case $1 in
66257  --*=?*)
66258    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66259    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66260    ac_shift=:
66261    ;;
66262  --*=)
66263    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66264    ac_optarg=
66265    ac_shift=:
66266    ;;
66267  *)
66268    ac_option=$1
66269    ac_optarg=$2
66270    ac_shift=shift
66271    ;;
66272  esac
66273
66274  case $ac_option in
66275  # Handling of the options.
66276  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66277    ac_cs_recheck=: ;;
66278  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66279    $as_echo "$ac_cs_version"; exit ;;
66280  --config | --confi | --conf | --con | --co | --c )
66281    $as_echo "$ac_cs_config"; exit ;;
66282  --debug | --debu | --deb | --de | --d | -d )
66283    debug=: ;;
66284  --file | --fil | --fi | --f )
66285    $ac_shift
66286    case $ac_optarg in
66287    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66288    '') as_fn_error $? "missing file argument" ;;
66289    esac
66290    as_fn_append CONFIG_FILES " '$ac_optarg'"
66291    ac_need_defaults=false;;
66292  --he | --h |  --help | --hel | -h )
66293    $as_echo "$ac_cs_usage"; exit ;;
66294  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66295  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66296    ac_cs_silent=: ;;
66297
66298  # This is an error.
66299  -*) as_fn_error $? "unrecognized option: \`$1'
66300Try \`$0 --help' for more information." ;;
66301
66302  *) as_fn_append ac_config_targets " $1"
66303     ac_need_defaults=false ;;
66304
66305  esac
66306  shift
66307done
66308
66309ac_configure_extra_args=
66310
66311if $ac_cs_silent; then
66312  exec 6>/dev/null
66313  ac_configure_extra_args="$ac_configure_extra_args --silent"
66314fi
66315
66316_ACEOF
66317cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66318if \$ac_cs_recheck; then
66319  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66320  shift
66321  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66322  CONFIG_SHELL='$SHELL'
66323  export CONFIG_SHELL
66324  exec "\$@"
66325fi
66326
66327_ACEOF
66328cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66329exec 5>>config.log
66330{
66331  echo
66332  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66333## Running $as_me. ##
66334_ASBOX
66335  $as_echo "$ac_log"
66336} >&5
66337
66338_ACEOF
66339cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66340_ACEOF
66341
66342cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66343
66344# Handling of arguments.
66345for ac_config_target in $ac_config_targets
66346do
66347  case $ac_config_target in
66348    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66349    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66350    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66351    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66352    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66353
66354  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66355  esac
66356done
66357
66358
66359# If the user did not use the arguments to specify the items to instantiate,
66360# then the envvar interface is used.  Set only those that are not.
66361# We use the long form for the default assignment because of an extremely
66362# bizarre bug on SunOS 4.1.3.
66363if $ac_need_defaults; then
66364  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66365fi
66366
66367# Have a temporary directory for convenience.  Make it in the build tree
66368# simply because there is no reason against having it here, and in addition,
66369# creating and moving files from /tmp can sometimes cause problems.
66370# Hook for its removal unless debugging.
66371# Note that there is a small window in which the directory will not be cleaned:
66372# after its creation but before its name has been assigned to `$tmp'.
66373$debug ||
66374{
66375  tmp= ac_tmp=
66376  trap 'exit_status=$?
66377  : "${ac_tmp:=$tmp}"
66378  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66379' 0
66380  trap 'as_fn_exit 1' 1 2 13 15
66381}
66382# Create a (secure) tmp directory for tmp files.
66383
66384{
66385  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66386  test -d "$tmp"
66387}  ||
66388{
66389  tmp=./conf$$-$RANDOM
66390  (umask 077 && mkdir "$tmp")
66391} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66392ac_tmp=$tmp
66393
66394# Set up the scripts for CONFIG_FILES section.
66395# No need to generate them if there are no CONFIG_FILES.
66396# This happens for instance with `./config.status config.h'.
66397if test -n "$CONFIG_FILES"; then
66398
66399
66400ac_cr=`echo X | tr X '\015'`
66401# On cygwin, bash can eat \r inside `` if the user requested igncr.
66402# But we know of no other shell where ac_cr would be empty at this
66403# point, so we can use a bashism as a fallback.
66404if test "x$ac_cr" = x; then
66405  eval ac_cr=\$\'\\r\'
66406fi
66407ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66408if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66409  ac_cs_awk_cr='\\r'
66410else
66411  ac_cs_awk_cr=$ac_cr
66412fi
66413
66414echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66415_ACEOF
66416
66417
66418{
66419  echo "cat >conf$$subs.awk <<_ACEOF" &&
66420  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66421  echo "_ACEOF"
66422} >conf$$subs.sh ||
66423  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66424ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66425ac_delim='%!_!# '
66426for ac_last_try in false false false false false :; do
66427  . ./conf$$subs.sh ||
66428    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66429
66430  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66431  if test $ac_delim_n = $ac_delim_num; then
66432    break
66433  elif $ac_last_try; then
66434    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66435  else
66436    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66437  fi
66438done
66439rm -f conf$$subs.sh
66440
66441cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66442cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66443_ACEOF
66444sed -n '
66445h
66446s/^/S["/; s/!.*/"]=/
66447p
66448g
66449s/^[^!]*!//
66450:repl
66451t repl
66452s/'"$ac_delim"'$//
66453t delim
66454:nl
66455h
66456s/\(.\{148\}\)..*/\1/
66457t more1
66458s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66459p
66460n
66461b repl
66462:more1
66463s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66464p
66465g
66466s/.\{148\}//
66467t nl
66468:delim
66469h
66470s/\(.\{148\}\)..*/\1/
66471t more2
66472s/["\\]/\\&/g; s/^/"/; s/$/"/
66473p
66474b
66475:more2
66476s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66477p
66478g
66479s/.\{148\}//
66480t delim
66481' <conf$$subs.awk | sed '
66482/^[^""]/{
66483  N
66484  s/\n//
66485}
66486' >>$CONFIG_STATUS || ac_write_fail=1
66487rm -f conf$$subs.awk
66488cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66489_ACAWK
66490cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66491  for (key in S) S_is_set[key] = 1
66492  FS = ""
66493
66494}
66495{
66496  line = $ 0
66497  nfields = split(line, field, "@")
66498  substed = 0
66499  len = length(field[1])
66500  for (i = 2; i < nfields; i++) {
66501    key = field[i]
66502    keylen = length(key)
66503    if (S_is_set[key]) {
66504      value = S[key]
66505      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66506      len += length(value) + length(field[++i])
66507      substed = 1
66508    } else
66509      len += 1 + keylen
66510  }
66511
66512  print line
66513}
66514
66515_ACAWK
66516_ACEOF
66517cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66518if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66519  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66520else
66521  cat
66522fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66523  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66524_ACEOF
66525
66526# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66527# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66528# trailing colons and then remove the whole line if VPATH becomes empty
66529# (actually we leave an empty line to preserve line numbers).
66530if test "x$srcdir" = x.; then
66531  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66532h
66533s///
66534s/^/:/
66535s/[	 ]*$/:/
66536s/:\$(srcdir):/:/g
66537s/:\${srcdir}:/:/g
66538s/:@srcdir@:/:/g
66539s/^:*//
66540s/:*$//
66541x
66542s/\(=[	 ]*\).*/\1/
66543G
66544s/\n//
66545s/^[^=]*=[	 ]*$//
66546}'
66547fi
66548
66549cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66550fi # test -n "$CONFIG_FILES"
66551
66552
66553eval set X "  :F $CONFIG_FILES      "
66554shift
66555for ac_tag
66556do
66557  case $ac_tag in
66558  :[FHLC]) ac_mode=$ac_tag; continue;;
66559  esac
66560  case $ac_mode$ac_tag in
66561  :[FHL]*:*);;
66562  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66563  :[FH]-) ac_tag=-:-;;
66564  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66565  esac
66566  ac_save_IFS=$IFS
66567  IFS=:
66568  set x $ac_tag
66569  IFS=$ac_save_IFS
66570  shift
66571  ac_file=$1
66572  shift
66573
66574  case $ac_mode in
66575  :L) ac_source=$1;;
66576  :[FH])
66577    ac_file_inputs=
66578    for ac_f
66579    do
66580      case $ac_f in
66581      -) ac_f="$ac_tmp/stdin";;
66582      *) # Look for the file first in the build tree, then in the source tree
66583	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66584	 # because $ac_f cannot contain `:'.
66585	 test -f "$ac_f" ||
66586	   case $ac_f in
66587	   [\\/$]*) false;;
66588	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66589	   esac ||
66590	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66591      esac
66592      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66593      as_fn_append ac_file_inputs " '$ac_f'"
66594    done
66595
66596    # Let's still pretend it is `configure' which instantiates (i.e., don't
66597    # use $as_me), people would be surprised to read:
66598    #    /* config.h.  Generated by config.status.  */
66599    configure_input='Generated from '`
66600	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66601	`' by configure.'
66602    if test x"$ac_file" != x-; then
66603      configure_input="$ac_file.  $configure_input"
66604      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66605$as_echo "$as_me: creating $ac_file" >&6;}
66606    fi
66607    # Neutralize special characters interpreted by sed in replacement strings.
66608    case $configure_input in #(
66609    *\&* | *\|* | *\\* )
66610       ac_sed_conf_input=`$as_echo "$configure_input" |
66611       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66612    *) ac_sed_conf_input=$configure_input;;
66613    esac
66614
66615    case $ac_tag in
66616    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66617      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66618    esac
66619    ;;
66620  esac
66621
66622  ac_dir=`$as_dirname -- "$ac_file" ||
66623$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66624	 X"$ac_file" : 'X\(//\)[^/]' \| \
66625	 X"$ac_file" : 'X\(//\)$' \| \
66626	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66627$as_echo X"$ac_file" |
66628    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66629	    s//\1/
66630	    q
66631	  }
66632	  /^X\(\/\/\)[^/].*/{
66633	    s//\1/
66634	    q
66635	  }
66636	  /^X\(\/\/\)$/{
66637	    s//\1/
66638	    q
66639	  }
66640	  /^X\(\/\).*/{
66641	    s//\1/
66642	    q
66643	  }
66644	  s/.*/./; q'`
66645  as_dir="$ac_dir"; as_fn_mkdir_p
66646  ac_builddir=.
66647
66648case "$ac_dir" in
66649.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66650*)
66651  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66652  # A ".." for each directory in $ac_dir_suffix.
66653  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66654  case $ac_top_builddir_sub in
66655  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66656  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66657  esac ;;
66658esac
66659ac_abs_top_builddir=$ac_pwd
66660ac_abs_builddir=$ac_pwd$ac_dir_suffix
66661# for backward compatibility:
66662ac_top_builddir=$ac_top_build_prefix
66663
66664case $srcdir in
66665  .)  # We are building in place.
66666    ac_srcdir=.
66667    ac_top_srcdir=$ac_top_builddir_sub
66668    ac_abs_top_srcdir=$ac_pwd ;;
66669  [\\/]* | ?:[\\/]* )  # Absolute name.
66670    ac_srcdir=$srcdir$ac_dir_suffix;
66671    ac_top_srcdir=$srcdir
66672    ac_abs_top_srcdir=$srcdir ;;
66673  *) # Relative name.
66674    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66675    ac_top_srcdir=$ac_top_build_prefix$srcdir
66676    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66677esac
66678ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66679
66680
66681  case $ac_mode in
66682  :F)
66683  #
66684  # CONFIG_FILE
66685  #
66686
66687_ACEOF
66688
66689cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66690# If the template does not know about datarootdir, expand it.
66691# FIXME: This hack should be removed a few years after 2.60.
66692ac_datarootdir_hack=; ac_datarootdir_seen=
66693ac_sed_dataroot='
66694/datarootdir/ {
66695  p
66696  q
66697}
66698/@datadir@/p
66699/@docdir@/p
66700/@infodir@/p
66701/@localedir@/p
66702/@mandir@/p'
66703case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66704*datarootdir*) ac_datarootdir_seen=yes;;
66705*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66706  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66707$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66708_ACEOF
66709cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66710  ac_datarootdir_hack='
66711  s&@datadir@&$datadir&g
66712  s&@docdir@&$docdir&g
66713  s&@infodir@&$infodir&g
66714  s&@localedir@&$localedir&g
66715  s&@mandir@&$mandir&g
66716  s&\\\${datarootdir}&$datarootdir&g' ;;
66717esac
66718_ACEOF
66719
66720# Neutralize VPATH when `$srcdir' = `.'.
66721# Shell code in configure.ac might set extrasub.
66722# FIXME: do we really want to maintain this feature?
66723cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66724ac_sed_extra="$ac_vpsub
66725$extrasub
66726_ACEOF
66727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66728:t
66729/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66730s|@configure_input@|$ac_sed_conf_input|;t t
66731s&@top_builddir@&$ac_top_builddir_sub&;t t
66732s&@top_build_prefix@&$ac_top_build_prefix&;t t
66733s&@srcdir@&$ac_srcdir&;t t
66734s&@abs_srcdir@&$ac_abs_srcdir&;t t
66735s&@top_srcdir@&$ac_top_srcdir&;t t
66736s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66737s&@builddir@&$ac_builddir&;t t
66738s&@abs_builddir@&$ac_abs_builddir&;t t
66739s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66740$ac_datarootdir_hack
66741"
66742eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66743  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66744
66745test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66746  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66747  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66748      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66749  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66750which seems to be undefined.  Please make sure it is defined" >&5
66751$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66752which seems to be undefined.  Please make sure it is defined" >&2;}
66753
66754  rm -f "$ac_tmp/stdin"
66755  case $ac_file in
66756  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66757  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66758  esac \
66759  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66760 ;;
66761
66762
66763
66764  esac
66765
66766done # for ac_tag
66767
66768
66769as_fn_exit 0
66770_ACEOF
66771ac_clean_files=$ac_clean_files_save
66772
66773test $ac_write_fail = 0 ||
66774  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66775
66776
66777# configure is writing to config.log, and then calls config.status.
66778# config.status does its own redirection, appending to config.log.
66779# Unfortunately, on DOS this fails, as config.log is still kept open
66780# by configure, so config.status won't be able to write to it; its
66781# output is simply discarded.  So we exec the FD to /dev/null,
66782# effectively closing config.log, so it can be properly (re)opened and
66783# appended to by config.status.  When coming back to configure, we
66784# need to make the FD available again.
66785if test "$no_create" != yes; then
66786  ac_cs_success=:
66787  ac_config_status_args=
66788  test "$silent" = yes &&
66789    ac_config_status_args="$ac_config_status_args --quiet"
66790  exec 5>/dev/null
66791  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66792  exec 5>>config.log
66793  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66794  # would make configure fail if this is the last instruction.
66795  $ac_cs_success || as_fn_exit 1
66796fi
66797if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66798  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66799$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66800fi
66801
66802
66803# After AC_OUTPUT, we need to do final work
66804
66805
66806  # Try to move config.log (generated by autoconf) to the configure-support directory.
66807  if test -e ./config.log; then
66808    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66809  fi
66810
66811  # Rotate our log file (configure.log)
66812  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66813    $RM -f "$OUTPUT_ROOT/configure.log.old"
66814  fi
66815  if test -e "$OUTPUT_ROOT/configure.log"; then
66816    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66817  fi
66818
66819  # Move configure.log from current directory to the build output root
66820  if test -e ./configure.log; then
66821    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66822  fi
66823
66824  # Make the compare script executable
66825  $CHMOD +x $OUTPUT_ROOT/compare.sh
66826
66827
66828# Finally output some useful information to the user
66829
66830  # Finally output some useful information to the user
66831
66832  printf "\n"
66833  printf "====================================================\n"
66834  if test "x$no_create" != "xyes"; then
66835    if test "x$IS_RECONFIGURE" != "xyes"; then
66836      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66837    else
66838      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66839    fi
66840  else
66841    if test "x$IS_RECONFIGURE" != "xyes"; then
66842      printf "A configuration has been successfully checked but not created\n"
66843    else
66844      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66845    fi
66846  fi
66847  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66848    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66849  else
66850    printf "using default settings.\n"
66851  fi
66852
66853  printf "\n"
66854  printf "Configuration summary:\n"
66855  printf "* Debug level:    $DEBUG_LEVEL\n"
66856  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66857  printf "* JDK variant:    $JDK_VARIANT\n"
66858  printf "* JVM variants:   $JVM_VARIANTS\n"
66859  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66860  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66861
66862  printf "\n"
66863  printf "Tools summary:\n"
66864  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66865    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66866  fi
66867  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66868  if test "x$TOOLCHAIN_VERSION" != "x"; then
66869    print_version=" $TOOLCHAIN_VERSION"
66870  fi
66871  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66872  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66873  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66874
66875  printf "\n"
66876  printf "Build performance summary:\n"
66877  printf "* Cores to use:   $JOBS\n"
66878  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66879  if test "x$CCACHE_STATUS" != "x"; then
66880    printf "* ccache status:  $CCACHE_STATUS\n"
66881  fi
66882  printf "\n"
66883
66884  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66885    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66886    printf "will result in longer build times.\n"
66887    printf "\n"
66888  fi
66889
66890  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66891    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66892    printf "These are not respected, and will be ignored. It is recommended\n"
66893    printf "that you clean your environment. The following variables are set:\n"
66894    printf "$FOUND_ALT_VARIABLES\n"
66895    printf "\n"
66896  fi
66897
66898  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66899    printf "WARNING: Your build output directory is not on a local disk.\n"
66900    printf "This will severely degrade build performance!\n"
66901    printf "It is recommended that you create an output directory on a local disk,\n"
66902    printf "and run the configure script again from that directory.\n"
66903    printf "\n"
66904  fi
66905
66906  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66907    printf "WARNING: The result of this configuration has overridden an older\n"
66908    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66909    printf "proper build. Failure to do so might result in strange build problems.\n"
66910    printf "\n"
66911  fi
66912
66913  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66914    printf "WARNING: The result of this configuration was not saved.\n"
66915    printf "You should run without '--no-create | -n' to create the configuration.\n"
66916    printf "\n"
66917  fi
66918
66919
66920
66921  # Locate config.log.
66922  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66923    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66924  elif test -e "./config.log"; then
66925    CONFIG_LOG_PATH="."
66926  fi
66927
66928  if test -e "$CONFIG_LOG_PATH/config.log"; then
66929    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66930    if test $? -eq 0; then
66931      printf "The following warnings were produced. Repeated here for convenience:\n"
66932      # We must quote sed expression (using []) to stop m4 from eating the [].
66933      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66934      printf "\n"
66935    fi
66936  fi
66937
66938