generated-configure.sh revision 2130:f22fad857554
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
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653ENABLE_GENERATE_CLASSLIST
654BUILD_FAILURE_HANDLER
655ENABLE_INTREE_EC
656STLPORT_LIB
657LIBZIP_CAN_USE_MMAP
658LIBDL
659LIBM
660USE_EXTERNAL_LCMS
661LCMS_LIBS
662LCMS_CFLAGS
663USE_EXTERNAL_LIBZ
664USE_EXTERNAL_LIBPNG
665PNG_LIBS
666PNG_CFLAGS
667USE_EXTERNAL_LIBGIF
668USE_EXTERNAL_LIBJPEG
669LLVM_LIBS
670LLVM_LDFLAGS
671LLVM_CFLAGS
672LLVM_CONFIG
673LIBFFI_LIBS
674LIBFFI_CFLAGS
675ALSA_LIBS
676ALSA_CFLAGS
677FREETYPE_BUNDLE_LIB_PATH
678FREETYPE_LIBS
679FREETYPE_CFLAGS
680CUPS_CFLAGS
681X_EXTRA_LIBS
682X_LIBS
683X_PRE_LIBS
684X_CFLAGS
685XMKMF
686MSVCP_DLL
687MSVCR_DLL
688LIBCXX
689STATIC_CXX_SETTING
690FIXPATH_DETACH_FLAG
691FIXPATH
692BUILD_GTEST
693VALID_JVM_FEATURES
694JVM_FEATURES_custom
695JVM_FEATURES_zeroshark
696JVM_FEATURES_zero
697JVM_FEATURES_minimal
698JVM_FEATURES_core
699JVM_FEATURES_client
700JVM_FEATURES_server
701INCLUDE_DTRACE
702GCOV_ENABLED
703STRIP_POLICY
704DEBUG_BINARIES
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
751NO_LIFETIME_DSE_CFLAG
752NO_NULL_POINTER_CHECK_CFLAG
753CXXSTD_CXXFLAG
754CXX_O_FLAG_SIZE
755CXX_O_FLAG_NONE
756CXX_O_FLAG_DEBUG
757CXX_O_FLAG_NORM
758CXX_O_FLAG_HI
759CXX_O_FLAG_HIGHEST
760CXX_O_FLAG_HIGHEST_JVM
761C_O_FLAG_SIZE
762C_O_FLAG_NONE
763C_O_FLAG_DEBUG
764C_O_FLAG_NORM
765C_O_FLAG_HI
766C_O_FLAG_HIGHEST
767C_O_FLAG_HIGHEST_JVM
768JVM_CFLAGS_SYMBOLS
769CXXFLAGS_DEBUG_SYMBOLS
770CFLAGS_DEBUG_SYMBOLS
771CXX_FLAG_DEPS
772C_FLAG_DEPS
773SHARED_LIBRARY_FLAGS
774SET_SHARED_LIBRARY_MAPFILE
775SET_SHARED_LIBRARY_NAME
776SET_SHARED_LIBRARY_ORIGIN
777SET_EXECUTABLE_ORIGIN
778CXX_FLAG_REORDER
779C_FLAG_REORDER
780JVM_RCFLAGS
781RC_FLAGS
782AR_OUT_OPTION
783LD_OUT_OPTION
784EXE_OUT_OPTION
785CC_OUT_OPTION
786STRIPFLAGS
787ARFLAGS
788COMPILER_BINDCMD_FILE_FLAG
789COMPILER_COMMAND_FILE_FLAG
790COMPILER_TARGET_BITS_FLAG
791JT_HOME
792JTREGEXE
793HOTSPOT_TOOLCHAIN_TYPE
794USING_BROKEN_SUSE_LD
795PACKAGE_PATH
796USE_CLANG
797HOTSPOT_LD
798HOTSPOT_CXX
799HOTSPOT_RC
800HOTSPOT_MT
801BUILD_AS
802BUILD_LDCXX
803BUILD_LD
804BUILD_STRIP
805BUILD_OBJCOPY
806BUILD_AR
807BUILD_NM
808BUILD_CXX
809BUILD_CC
810BUILD_SYSROOT_LDFLAGS
811BUILD_SYSROOT_CFLAGS
812ac_ct_OBJDUMP
813OBJDUMP
814ac_ct_OBJCOPY
815OBJCOPY
816ac_ct_NM
817ac_ct_STRIP
818GNM
819NM
820STRIP
821MSBUILD
822DUMPBIN
823RC
824MT
825LIPO
826ac_ct_AR
827AR
828AS
829LDCXX
830LD
831CXXCPP
832CPP
833CXX_VERSION_NUMBER
834CC_VERSION_NUMBER
835ac_ct_CXX
836CXXFLAGS
837CXX
838TOOLCHAIN_PATH_CXX
839POTENTIAL_CXX
840OBJEXT
841EXEEXT
842ac_ct_CC
843CPPFLAGS
844LDFLAGS
845CFLAGS
846CC
847TOOLCHAIN_PATH_CC
848POTENTIAL_CC
849TOOLCHAIN_VERSION
850VS_LIB
851VS_INCLUDE
852VS_PATH
853CYGWIN_LINK
854SYSROOT_LDFLAGS
855SYSROOT_CFLAGS
856EXTRA_LDFLAGS
857EXTRA_CXXFLAGS
858EXTRA_CFLAGS
859LEGACY_EXTRA_LDFLAGS
860LEGACY_EXTRA_CXXFLAGS
861LEGACY_EXTRA_CFLAGS
862EXE_SUFFIX
863OBJ_SUFFIX
864STATIC_LIBRARY
865SHARED_LIBRARY
866STATIC_LIBRARY_SUFFIX
867SHARED_LIBRARY_SUFFIX
868LIBRARY_PREFIX
869TOOLCHAIN_TYPE
870STATIC_BUILD
871IMPORT_MODULES_MAKE
872IMPORT_MODULES_SRC
873IMPORT_MODULES_CONF
874IMPORT_MODULES_LIBS
875IMPORT_MODULES_CMDS
876IMPORT_MODULES_CLASSES
877BUILD_HOTSPOT
878HOTSPOT_DIST
879BUILD_OUTPUT
880JDK_TOPDIR
881NASHORN_TOPDIR
882HOTSPOT_TOPDIR
883JAXWS_TOPDIR
884JAXP_TOPDIR
885CORBA_TOPDIR
886LANGTOOLS_TOPDIR
887EXTERNAL_BUILDJDK
888BUILD_JDK
889CREATE_BUILDJDK
890JLINK
891JMOD
892BOOT_JDK_BITS
893JAVAC_FLAGS
894BOOT_JDK_MODULAR
895BOOT_JDK_SOURCETARGET
896JARSIGNER
897JAR
898JAVAH
899JAVAC
900JAVA
901BOOT_JDK
902JAVA_CHECK
903JAVAC_CHECK
904VERSION_IS_GA
905VERSION_SHORT
906VERSION_STRING
907VERSION_NUMBER_FOUR_POSITIONS
908VERSION_NUMBER
909VERSION_OPT
910VERSION_BUILD
911VERSION_PRE
912VERSION_PATCH
913VERSION_SECURITY
914VERSION_MINOR
915VERSION_MAJOR
916MACOSX_BUNDLE_ID_BASE
917MACOSX_BUNDLE_NAME_BASE
918HOTSPOT_VM_DISTRO
919COMPANY_NAME
920JDK_RC_PLATFORM_NAME
921PRODUCT_SUFFIX
922PRODUCT_NAME
923LAUNCHER_NAME
924JLINK_KEEP_PACKAGED_MODULES
925COPYRIGHT_YEAR
926COMPRESS_JARS
927INCLUDE_SA
928UNLIMITED_CRYPTO
929CACERTS_FILE
930BUILD_HEADLESS
931SUPPORT_HEADFUL
932SUPPORT_HEADLESS
933DEFAULT_MAKE_TARGET
934OS_VERSION_MICRO
935OS_VERSION_MINOR
936OS_VERSION_MAJOR
937PKG_CONFIG
938BASH_ARGS
939SETFILE
940CODESIGN
941XATTR
942DSYMUTIL
943IS_GNU_TIME
944PATCH
945DTRACE
946TIME
947STAT
948HG
949READELF
950OTOOL
951LDD
952ZIP
953UNZIP
954TAR_SUPPORTS_TRANSFORM
955TAR_INCLUDE_PARAM
956FIND_DELETE
957OUTPUT_SYNC
958OUTPUT_SYNC_SUPPORTED
959CHECK_TOOLSDIR_MAKE
960CHECK_TOOLSDIR_GMAKE
961CHECK_MAKE
962CHECK_GMAKE
963MAKE
964PKGHANDLER
965CONFIGURESUPPORT_OUTPUTDIR
966OUTPUT_ROOT
967CONF_NAME
968SPEC
969SDKROOT
970XCODEBUILD
971VALID_JVM_VARIANTS
972JVM_VARIANTS
973DEBUG_LEVEL
974HOTSPOT_DEBUG_LEVEL
975JDK_VARIANT
976SET_OPENJDK
977USERNAME
978CANONICAL_TOPDIR
979ORIGINAL_TOPDIR
980TOPDIR
981PATH_SEP
982ZERO_ARCHDEF
983HOTSPOT_BUILD_CPU_DEFINE
984HOTSPOT_BUILD_CPU_ARCH
985HOTSPOT_BUILD_CPU
986HOTSPOT_BUILD_OS_TYPE
987HOTSPOT_BUILD_OS
988OPENJDK_BUILD_BUNDLE_PLATFORM
989OPENJDK_BUILD_CPU_BUNDLE
990OPENJDK_BUILD_OS_BUNDLE
991OPENJDK_BUILD_OS_EXPORT_DIR
992OPENJDK_BUILD_CPU_JLI_CFLAGS
993OPENJDK_BUILD_CPU_OSARCH
994OPENJDK_BUILD_CPU_ISADIR
995OPENJDK_BUILD_CPU_LIBDIR
996OPENJDK_BUILD_CPU_LEGACY_LIB
997OPENJDK_BUILD_CPU_LEGACY
998HOTSPOT_TARGET_CPU_DEFINE
999HOTSPOT_TARGET_CPU_ARCH
1000HOTSPOT_TARGET_CPU
1001HOTSPOT_TARGET_OS_TYPE
1002HOTSPOT_TARGET_OS
1003DEFINE_CROSS_COMPILE_ARCH
1004LP64
1005OPENJDK_TARGET_BUNDLE_PLATFORM
1006OPENJDK_TARGET_CPU_BUNDLE
1007OPENJDK_TARGET_OS_BUNDLE
1008OPENJDK_TARGET_OS_EXPORT_DIR
1009OPENJDK_TARGET_CPU_JLI_CFLAGS
1010OPENJDK_TARGET_CPU_OSARCH
1011OPENJDK_TARGET_CPU_ISADIR
1012OPENJDK_TARGET_CPU_LIBDIR
1013OPENJDK_TARGET_CPU_LEGACY_LIB
1014OPENJDK_TARGET_CPU_LEGACY
1015REQUIRED_OS_VERSION
1016REQUIRED_OS_NAME
1017COMPILE_TYPE
1018OPENJDK_TARGET_CPU_ENDIAN
1019OPENJDK_TARGET_CPU_BITS
1020OPENJDK_TARGET_CPU_ARCH
1021OPENJDK_TARGET_CPU
1022OPENJDK_TARGET_OS_ENV
1023OPENJDK_TARGET_OS_TYPE
1024OPENJDK_TARGET_OS
1025OPENJDK_BUILD_CPU_ENDIAN
1026OPENJDK_BUILD_CPU_BITS
1027OPENJDK_BUILD_CPU_ARCH
1028OPENJDK_BUILD_CPU
1029OPENJDK_BUILD_OS_ENV
1030OPENJDK_BUILD_OS_TYPE
1031OPENJDK_BUILD_OS
1032OPENJDK_BUILD_AUTOCONF_NAME
1033OPENJDK_TARGET_AUTOCONF_NAME
1034target_os
1035target_vendor
1036target_cpu
1037target
1038host_os
1039host_vendor
1040host_cpu
1041host
1042build_os
1043build_vendor
1044build_cpu
1045build
1046NICE
1047CPIO
1048DF
1049READLINK
1050CYGPATH
1051SED
1052FGREP
1053EGREP
1054GREP
1055AWK
1056XARGS
1057WHICH
1058WC
1059UNIQ
1060UNAME
1061TR
1062TOUCH
1063TEE
1064TAR
1065TAIL
1066SORT
1067SH
1068RMDIR
1069RM
1070PRINTF
1071NAWK
1072MV
1073MKTEMP
1074MKDIR
1075LS
1076LN
1077GZIP
1078GUNZIP
1079HEAD
1080FIND
1081FILE
1082EXPR
1083ECHO
1084DIRNAME
1085DIFF
1086DATE
1087CUT
1088CP
1089COMM
1090CMP
1091CHMOD
1092CAT
1093BASH
1094BASENAME
1095DATE_WHEN_CONFIGURED
1096ORIGINAL_PATH
1097CONFIGURE_COMMAND_LINE
1098target_alias
1099host_alias
1100build_alias
1101LIBS
1102ECHO_T
1103ECHO_N
1104ECHO_C
1105DEFS
1106mandir
1107localedir
1108libdir
1109psdir
1110pdfdir
1111dvidir
1112htmldir
1113infodir
1114docdir
1115oldincludedir
1116includedir
1117localstatedir
1118sharedstatedir
1119sysconfdir
1120datadir
1121datarootdir
1122libexecdir
1123sbindir
1124bindir
1125program_transform_name
1126prefix
1127exec_prefix
1128PACKAGE_URL
1129PACKAGE_BUGREPORT
1130PACKAGE_STRING
1131PACKAGE_VERSION
1132PACKAGE_TARNAME
1133PACKAGE_NAME
1134PATH_SEPARATOR
1135SHELL'
1136ac_subst_files=''
1137ac_user_opts='
1138enable_option_checking
1139with_target_bits
1140enable_openjdk_only
1141with_custom_make_dir
1142with_jdk_variant
1143enable_debug
1144with_debug_level
1145with_jvm_variants
1146with_devkit
1147with_sys_root
1148with_sysroot
1149with_tools_dir
1150with_toolchain_path
1151with_extra_path
1152with_sdk_name
1153with_conf_name
1154with_output_sync
1155with_default_make_target
1156enable_headful
1157with_cacerts_file
1158enable_unlimited_crypto
1159with_copyright_year
1160enable_keep_packaged_modules
1161with_milestone
1162with_update_version
1163with_user_release_suffix
1164with_build_number
1165with_version_string
1166with_version_pre
1167with_version_opt
1168with_version_build
1169with_version_major
1170with_version_minor
1171with_version_security
1172with_version_patch
1173with_boot_jdk
1174with_build_jdk
1175with_add_source_root
1176with_override_source_root
1177with_adds_and_overrides
1178with_override_langtools
1179with_override_corba
1180with_override_jaxp
1181with_override_jaxws
1182with_override_hotspot
1183with_override_nashorn
1184with_override_jdk
1185with_import_hotspot
1186with_import_modules
1187enable_static_build
1188with_toolchain_type
1189with_extra_cflags
1190with_extra_cxxflags
1191with_extra_ldflags
1192with_toolchain_version
1193with_build_devkit
1194with_jtreg
1195enable_warnings_as_errors
1196with_native_debug_symbols
1197enable_debug_symbols
1198enable_zip_debug_info
1199enable_native_coverage
1200enable_dtrace
1201with_jvm_features
1202with_jvm_interpreter
1203enable_hotspot_gtest
1204with_stdc__lib
1205with_msvcr_dll
1206with_msvcp_dll
1207with_x
1208with_cups
1209with_cups_include
1210with_freetype
1211with_freetype_include
1212with_freetype_lib
1213with_freetype_src
1214enable_freetype_bundling
1215with_alsa
1216with_alsa_include
1217with_alsa_lib
1218with_libffi
1219with_libffi_include
1220with_libffi_lib
1221with_libjpeg
1222with_giflib
1223with_libpng
1224with_zlib
1225with_lcms
1226with_dxsdk
1227with_dxsdk_lib
1228with_dxsdk_include
1229enable_jtreg_failure_handler
1230enable_generate_classlist
1231with_num_cores
1232with_memory_size
1233with_jobs
1234with_test_jobs
1235with_boot_jdk_jvmargs
1236with_sjavac_server_java
1237enable_sjavac
1238enable_javac_server
1239enable_icecc
1240enable_precompiled_headers
1241enable_ccache
1242with_ccache_dir
1243'
1244      ac_precious_vars='build_alias
1245host_alias
1246target_alias
1247BASENAME
1248BASH
1249CAT
1250CHMOD
1251CMP
1252COMM
1253CP
1254CUT
1255DATE
1256DIFF
1257DIRNAME
1258ECHO
1259EXPR
1260FILE
1261FIND
1262HEAD
1263GUNZIP
1264GZIP
1265LN
1266LS
1267MKDIR
1268MKTEMP
1269MV
1270NAWK
1271PRINTF
1272RM
1273RMDIR
1274SH
1275SORT
1276TAIL
1277TAR
1278TEE
1279TOUCH
1280TR
1281UNAME
1282UNIQ
1283WC
1284WHICH
1285XARGS
1286AWK
1287GREP
1288EGREP
1289FGREP
1290SED
1291CYGPATH
1292READLINK
1293DF
1294CPIO
1295NICE
1296MAKE
1297UNZIP
1298ZIP
1299LDD
1300OTOOL
1301READELF
1302HG
1303STAT
1304TIME
1305DTRACE
1306PATCH
1307DSYMUTIL
1308XATTR
1309CODESIGN
1310SETFILE
1311PKG_CONFIG
1312JAVA
1313JAVAC
1314JAVAH
1315JAR
1316JARSIGNER
1317CC
1318CFLAGS
1319LDFLAGS
1320LIBS
1321CPPFLAGS
1322CXX
1323CXXFLAGS
1324CCC
1325CPP
1326CXXCPP
1327AS
1328AR
1329LIPO
1330STRIP
1331NM
1332GNM
1333OBJCOPY
1334OBJDUMP
1335BUILD_CC
1336BUILD_CXX
1337BUILD_NM
1338BUILD_AR
1339BUILD_OBJCOPY
1340BUILD_STRIP
1341JTREGEXE
1342XMKMF
1343FREETYPE_CFLAGS
1344FREETYPE_LIBS
1345ALSA_CFLAGS
1346ALSA_LIBS
1347LIBFFI_CFLAGS
1348LIBFFI_LIBS
1349PNG_CFLAGS
1350PNG_LIBS
1351LCMS_CFLAGS
1352LCMS_LIBS
1353ICECC_CMD
1354ICECC_CREATE_ENV
1355ICECC_WRAPPER
1356CCACHE'
1357
1358
1359# Initialize some variables set by options.
1360ac_init_help=
1361ac_init_version=false
1362ac_unrecognized_opts=
1363ac_unrecognized_sep=
1364# The variables have the same names as the options, with
1365# dashes changed to underlines.
1366cache_file=/dev/null
1367exec_prefix=NONE
1368no_create=
1369no_recursion=
1370prefix=NONE
1371program_prefix=NONE
1372program_suffix=NONE
1373program_transform_name=s,x,x,
1374silent=
1375site=
1376srcdir=
1377verbose=
1378x_includes=NONE
1379x_libraries=NONE
1380
1381# Installation directory options.
1382# These are left unexpanded so users can "make install exec_prefix=/foo"
1383# and all the variables that are supposed to be based on exec_prefix
1384# by default will actually change.
1385# Use braces instead of parens because sh, perl, etc. also accept them.
1386# (The list follows the same order as the GNU Coding Standards.)
1387bindir='${exec_prefix}/bin'
1388sbindir='${exec_prefix}/sbin'
1389libexecdir='${exec_prefix}/libexec'
1390datarootdir='${prefix}/share'
1391datadir='${datarootdir}'
1392sysconfdir='${prefix}/etc'
1393sharedstatedir='${prefix}/com'
1394localstatedir='${prefix}/var'
1395includedir='${prefix}/include'
1396oldincludedir='/usr/include'
1397docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398infodir='${datarootdir}/info'
1399htmldir='${docdir}'
1400dvidir='${docdir}'
1401pdfdir='${docdir}'
1402psdir='${docdir}'
1403libdir='${exec_prefix}/lib'
1404localedir='${datarootdir}/locale'
1405mandir='${datarootdir}/man'
1406
1407ac_prev=
1408ac_dashdash=
1409for ac_option
1410do
1411  # If the previous option needs an argument, assign it.
1412  if test -n "$ac_prev"; then
1413    eval $ac_prev=\$ac_option
1414    ac_prev=
1415    continue
1416  fi
1417
1418  case $ac_option in
1419  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420  *=)   ac_optarg= ;;
1421  *)    ac_optarg=yes ;;
1422  esac
1423
1424  # Accept the important Cygnus configure options, so we can diagnose typos.
1425
1426  case $ac_dashdash$ac_option in
1427  --)
1428    ac_dashdash=yes ;;
1429
1430  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431    ac_prev=bindir ;;
1432  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433    bindir=$ac_optarg ;;
1434
1435  -build | --build | --buil | --bui | --bu)
1436    ac_prev=build_alias ;;
1437  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438    build_alias=$ac_optarg ;;
1439
1440  -cache-file | --cache-file | --cache-fil | --cache-fi \
1441  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442    ac_prev=cache_file ;;
1443  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445    cache_file=$ac_optarg ;;
1446
1447  --config-cache | -C)
1448    cache_file=config.cache ;;
1449
1450  -datadir | --datadir | --datadi | --datad)
1451    ac_prev=datadir ;;
1452  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453    datadir=$ac_optarg ;;
1454
1455  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456  | --dataroo | --dataro | --datar)
1457    ac_prev=datarootdir ;;
1458  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460    datarootdir=$ac_optarg ;;
1461
1462  -disable-* | --disable-*)
1463    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464    # Reject names that are not valid shell variable names.
1465    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466      as_fn_error $? "invalid feature name: $ac_useropt"
1467    ac_useropt_orig=$ac_useropt
1468    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469    case $ac_user_opts in
1470      *"
1471"enable_$ac_useropt"
1472"*) ;;
1473      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474	 ac_unrecognized_sep=', ';;
1475    esac
1476    eval enable_$ac_useropt=no ;;
1477
1478  -docdir | --docdir | --docdi | --doc | --do)
1479    ac_prev=docdir ;;
1480  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481    docdir=$ac_optarg ;;
1482
1483  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484    ac_prev=dvidir ;;
1485  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486    dvidir=$ac_optarg ;;
1487
1488  -enable-* | --enable-*)
1489    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490    # Reject names that are not valid shell variable names.
1491    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492      as_fn_error $? "invalid feature name: $ac_useropt"
1493    ac_useropt_orig=$ac_useropt
1494    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495    case $ac_user_opts in
1496      *"
1497"enable_$ac_useropt"
1498"*) ;;
1499      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500	 ac_unrecognized_sep=', ';;
1501    esac
1502    eval enable_$ac_useropt=\$ac_optarg ;;
1503
1504  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506  | --exec | --exe | --ex)
1507    ac_prev=exec_prefix ;;
1508  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510  | --exec=* | --exe=* | --ex=*)
1511    exec_prefix=$ac_optarg ;;
1512
1513  -gas | --gas | --ga | --g)
1514    # Obsolete; use --with-gas.
1515    with_gas=yes ;;
1516
1517  -help | --help | --hel | --he | -h)
1518    ac_init_help=long ;;
1519  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520    ac_init_help=recursive ;;
1521  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522    ac_init_help=short ;;
1523
1524  -host | --host | --hos | --ho)
1525    ac_prev=host_alias ;;
1526  -host=* | --host=* | --hos=* | --ho=*)
1527    host_alias=$ac_optarg ;;
1528
1529  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530    ac_prev=htmldir ;;
1531  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532  | --ht=*)
1533    htmldir=$ac_optarg ;;
1534
1535  -includedir | --includedir | --includedi | --included | --include \
1536  | --includ | --inclu | --incl | --inc)
1537    ac_prev=includedir ;;
1538  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539  | --includ=* | --inclu=* | --incl=* | --inc=*)
1540    includedir=$ac_optarg ;;
1541
1542  -infodir | --infodir | --infodi | --infod | --info | --inf)
1543    ac_prev=infodir ;;
1544  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545    infodir=$ac_optarg ;;
1546
1547  -libdir | --libdir | --libdi | --libd)
1548    ac_prev=libdir ;;
1549  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550    libdir=$ac_optarg ;;
1551
1552  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553  | --libexe | --libex | --libe)
1554    ac_prev=libexecdir ;;
1555  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556  | --libexe=* | --libex=* | --libe=*)
1557    libexecdir=$ac_optarg ;;
1558
1559  -localedir | --localedir | --localedi | --localed | --locale)
1560    ac_prev=localedir ;;
1561  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562    localedir=$ac_optarg ;;
1563
1564  -localstatedir | --localstatedir | --localstatedi | --localstated \
1565  | --localstate | --localstat | --localsta | --localst | --locals)
1566    ac_prev=localstatedir ;;
1567  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569    localstatedir=$ac_optarg ;;
1570
1571  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572    ac_prev=mandir ;;
1573  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574    mandir=$ac_optarg ;;
1575
1576  -nfp | --nfp | --nf)
1577    # Obsolete; use --without-fp.
1578    with_fp=no ;;
1579
1580  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581  | --no-cr | --no-c | -n)
1582    no_create=yes ;;
1583
1584  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586    no_recursion=yes ;;
1587
1588  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590  | --oldin | --oldi | --old | --ol | --o)
1591    ac_prev=oldincludedir ;;
1592  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595    oldincludedir=$ac_optarg ;;
1596
1597  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598    ac_prev=prefix ;;
1599  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600    prefix=$ac_optarg ;;
1601
1602  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603  | --program-pre | --program-pr | --program-p)
1604    ac_prev=program_prefix ;;
1605  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607    program_prefix=$ac_optarg ;;
1608
1609  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610  | --program-suf | --program-su | --program-s)
1611    ac_prev=program_suffix ;;
1612  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614    program_suffix=$ac_optarg ;;
1615
1616  -program-transform-name | --program-transform-name \
1617  | --program-transform-nam | --program-transform-na \
1618  | --program-transform-n | --program-transform- \
1619  | --program-transform | --program-transfor \
1620  | --program-transfo | --program-transf \
1621  | --program-trans | --program-tran \
1622  | --progr-tra | --program-tr | --program-t)
1623    ac_prev=program_transform_name ;;
1624  -program-transform-name=* | --program-transform-name=* \
1625  | --program-transform-nam=* | --program-transform-na=* \
1626  | --program-transform-n=* | --program-transform-=* \
1627  | --program-transform=* | --program-transfor=* \
1628  | --program-transfo=* | --program-transf=* \
1629  | --program-trans=* | --program-tran=* \
1630  | --progr-tra=* | --program-tr=* | --program-t=*)
1631    program_transform_name=$ac_optarg ;;
1632
1633  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634    ac_prev=pdfdir ;;
1635  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636    pdfdir=$ac_optarg ;;
1637
1638  -psdir | --psdir | --psdi | --psd | --ps)
1639    ac_prev=psdir ;;
1640  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641    psdir=$ac_optarg ;;
1642
1643  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644  | -silent | --silent | --silen | --sile | --sil)
1645    silent=yes ;;
1646
1647  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648    ac_prev=sbindir ;;
1649  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650  | --sbi=* | --sb=*)
1651    sbindir=$ac_optarg ;;
1652
1653  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655  | --sharedst | --shareds | --shared | --share | --shar \
1656  | --sha | --sh)
1657    ac_prev=sharedstatedir ;;
1658  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661  | --sha=* | --sh=*)
1662    sharedstatedir=$ac_optarg ;;
1663
1664  -site | --site | --sit)
1665    ac_prev=site ;;
1666  -site=* | --site=* | --sit=*)
1667    site=$ac_optarg ;;
1668
1669  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670    ac_prev=srcdir ;;
1671  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672    srcdir=$ac_optarg ;;
1673
1674  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675  | --syscon | --sysco | --sysc | --sys | --sy)
1676    ac_prev=sysconfdir ;;
1677  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679    sysconfdir=$ac_optarg ;;
1680
1681  -target | --target | --targe | --targ | --tar | --ta | --t)
1682    ac_prev=target_alias ;;
1683  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684    target_alias=$ac_optarg ;;
1685
1686  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687    verbose=yes ;;
1688
1689  -version | --version | --versio | --versi | --vers | -V)
1690    ac_init_version=: ;;
1691
1692  -with-* | --with-*)
1693    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694    # Reject names that are not valid shell variable names.
1695    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696      as_fn_error $? "invalid package name: $ac_useropt"
1697    ac_useropt_orig=$ac_useropt
1698    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699    case $ac_user_opts in
1700      *"
1701"with_$ac_useropt"
1702"*) ;;
1703      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704	 ac_unrecognized_sep=', ';;
1705    esac
1706    eval with_$ac_useropt=\$ac_optarg ;;
1707
1708  -without-* | --without-*)
1709    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710    # Reject names that are not valid shell variable names.
1711    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712      as_fn_error $? "invalid package name: $ac_useropt"
1713    ac_useropt_orig=$ac_useropt
1714    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715    case $ac_user_opts in
1716      *"
1717"with_$ac_useropt"
1718"*) ;;
1719      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720	 ac_unrecognized_sep=', ';;
1721    esac
1722    eval with_$ac_useropt=no ;;
1723
1724  --x)
1725    # Obsolete; use --with-x.
1726    with_x=yes ;;
1727
1728  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729  | --x-incl | --x-inc | --x-in | --x-i)
1730    ac_prev=x_includes ;;
1731  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733    x_includes=$ac_optarg ;;
1734
1735  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737    ac_prev=x_libraries ;;
1738  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740    x_libraries=$ac_optarg ;;
1741
1742  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743Try \`$0 --help' for more information"
1744    ;;
1745
1746  *=*)
1747    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748    # Reject names that are not valid shell variable names.
1749    case $ac_envvar in #(
1750      '' | [0-9]* | *[!_$as_cr_alnum]* )
1751      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752    esac
1753    eval $ac_envvar=\$ac_optarg
1754    export $ac_envvar ;;
1755
1756  *)
1757    # FIXME: should be removed in autoconf 3.0.
1758    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762    ;;
1763
1764  esac
1765done
1766
1767if test -n "$ac_prev"; then
1768  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769  as_fn_error $? "missing argument to $ac_option"
1770fi
1771
1772if test -n "$ac_unrecognized_opts"; then
1773  case $enable_option_checking in
1774    no) ;;
1775    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777  esac
1778fi
1779
1780# Check all directory arguments for consistency.
1781for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782		datadir sysconfdir sharedstatedir localstatedir includedir \
1783		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784		libdir localedir mandir
1785do
1786  eval ac_val=\$$ac_var
1787  # Remove trailing slashes.
1788  case $ac_val in
1789    */ )
1790      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791      eval $ac_var=\$ac_val;;
1792  esac
1793  # Be sure to have absolute directory names.
1794  case $ac_val in
1795    [\\/$]* | ?:[\\/]* )  continue;;
1796    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797  esac
1798  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799done
1800
1801# There might be people who depend on the old broken behavior: `$host'
1802# used to hold the argument of --host etc.
1803# FIXME: To remove some day.
1804build=$build_alias
1805host=$host_alias
1806target=$target_alias
1807
1808# FIXME: To remove some day.
1809if test "x$host_alias" != x; then
1810  if test "x$build_alias" = x; then
1811    cross_compiling=maybe
1812  elif test "x$build_alias" != "x$host_alias"; then
1813    cross_compiling=yes
1814  fi
1815fi
1816
1817ac_tool_prefix=
1818test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819
1820test "$silent" = yes && exec 6>/dev/null
1821
1822
1823ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824ac_ls_di=`ls -di .` &&
1825ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826  as_fn_error $? "working directory cannot be determined"
1827test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828  as_fn_error $? "pwd does not report name of working directory"
1829
1830
1831# Find the source files, if location was not specified.
1832if test -z "$srcdir"; then
1833  ac_srcdir_defaulted=yes
1834  # Try the directory containing this script, then the parent directory.
1835  ac_confdir=`$as_dirname -- "$as_myself" ||
1836$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837	 X"$as_myself" : 'X\(//\)[^/]' \| \
1838	 X"$as_myself" : 'X\(//\)$' \| \
1839	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840$as_echo X"$as_myself" |
1841    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)[^/].*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\/\)$/{
1850	    s//\1/
1851	    q
1852	  }
1853	  /^X\(\/\).*/{
1854	    s//\1/
1855	    q
1856	  }
1857	  s/.*/./; q'`
1858  srcdir=$ac_confdir
1859  if test ! -r "$srcdir/$ac_unique_file"; then
1860    srcdir=..
1861  fi
1862else
1863  ac_srcdir_defaulted=no
1864fi
1865if test ! -r "$srcdir/$ac_unique_file"; then
1866  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868fi
1869ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870ac_abs_confdir=`(
1871	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872	pwd)`
1873# When building in place, set srcdir=.
1874if test "$ac_abs_confdir" = "$ac_pwd"; then
1875  srcdir=.
1876fi
1877# Remove unnecessary trailing slashes from srcdir.
1878# Double slashes in file names in object file debugging info
1879# mess up M-x gdb in Emacs.
1880case $srcdir in
1881*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882esac
1883for ac_var in $ac_precious_vars; do
1884  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_env_${ac_var}_value=\$${ac_var}
1886  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888done
1889
1890#
1891# Report the --help message.
1892#
1893if test "$ac_init_help" = "long"; then
1894  # Omit some internal or obsolete options to make the list less imposing.
1895  # This message is too long to be a string in the A/UX 3.1 sh.
1896  cat <<_ACEOF
1897\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898
1899Usage: $0 [OPTION]... [VAR=VALUE]...
1900
1901To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902VAR=VALUE.  See below for descriptions of some of the useful variables.
1903
1904Defaults for the options are specified in brackets.
1905
1906Configuration:
1907  -h, --help              display this help and exit
1908      --help=short        display options specific to this package
1909      --help=recursive    display the short help of all the included packages
1910  -V, --version           display version information and exit
1911  -q, --quiet, --silent   do not print \`checking ...' messages
1912      --cache-file=FILE   cache test results in FILE [disabled]
1913  -C, --config-cache      alias for \`--cache-file=config.cache'
1914  -n, --no-create         do not create output files
1915      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1916
1917Installation directories:
1918  --prefix=PREFIX         install architecture-independent files in PREFIX
1919                          [$ac_default_prefix]
1920  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1921                          [PREFIX]
1922
1923By default, \`make install' will install all the files in
1924\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1925an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926for instance \`--prefix=\$HOME'.
1927
1928For better control, use the options below.
1929
1930Fine tuning of the installation directories:
1931  --bindir=DIR            user executables [EPREFIX/bin]
1932  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1933  --libexecdir=DIR        program executables [EPREFIX/libexec]
1934  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1935  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1936  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1937  --libdir=DIR            object code libraries [EPREFIX/lib]
1938  --includedir=DIR        C header files [PREFIX/include]
1939  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1940  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1941  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1942  --infodir=DIR           info documentation [DATAROOTDIR/info]
1943  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1944  --mandir=DIR            man documentation [DATAROOTDIR/man]
1945  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1946  --htmldir=DIR           html documentation [DOCDIR]
1947  --dvidir=DIR            dvi documentation [DOCDIR]
1948  --pdfdir=DIR            pdf documentation [DOCDIR]
1949  --psdir=DIR             ps documentation [DOCDIR]
1950_ACEOF
1951
1952  cat <<\_ACEOF
1953
1954X features:
1955  --x-includes=DIR    X include files are in DIR
1956  --x-libraries=DIR   X library files are in DIR
1957
1958System types:
1959  --build=BUILD     configure for building on BUILD [guessed]
1960  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1961  --target=TARGET   configure for building compilers for TARGET [HOST]
1962_ACEOF
1963fi
1964
1965if test -n "$ac_init_help"; then
1966  case $ac_init_help in
1967     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968   esac
1969  cat <<\_ACEOF
1970
1971Optional Features:
1972  --disable-option-checking  ignore unrecognized --enable/--with options
1973  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1974  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1975  --enable-openjdk-only   suppress building custom source even if present
1976                          [disabled]
1977  --enable-debug          set the debug level to fastdebug (shorthand for
1978                          --with-debug-level=fastdebug) [disabled]
1979  --disable-headful       disable building headful support (graphical UI
1980                          support) [enabled]
1981  --enable-unlimited-crypto
1982                          Enable unlimited crypto policy [disabled]
1983  --disable-keep-packaged-modules
1984                          Do not keep packaged modules in jdk image [enable]
1985  --enable-static-build   enable static library build [disabled]
1986  --disable-warnings-as-errors
1987                          do not consider native warnings to be an error
1988                          [enabled]
1989  --enable-debug-symbols  Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --enable-zip-debug-info Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --enable-native-coverage
1994                          enable native compilation with code coverage
1995                          data[disabled]
1996  --enable-dtrace[=yes/no/auto]
1997                          enable dtrace. Default is auto, where dtrace is
1998                          enabled if all dependencies are present.
1999  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2000  --disable-freetype-bundling
2001                          disable bundling of the freetype library with the
2002                          build result [enabled on Windows or when using
2003                          --with-freetype, disabled otherwise]
2004  --enable-jtreg-failure-handler
2005                          forces build of the jtreg failure handler to be
2006                          enabled, missing dependencies become fatal errors.
2007                          Default is auto, where the failure handler is built
2008                          if all dependencies are present and otherwise just
2009                          disabled.
2010  --disable-generate-classlist
2011                          forces enabling or disabling of the generation of a
2012                          CDS classlist at build time. Default is to generate
2013                          it when either the server or client JVMs are built.
2014  --enable-sjavac         use sjavac to do fast incremental compiles
2015                          [disabled]
2016  --disable-javac-server  disable javac server [enabled]
2017  --enable-icecc          enable distribted compilation of native code using
2018                          icecc/icecream [disabled]
2019  --disable-precompiled-headers
2020                          disable using precompiled headers when compiling C++
2021                          [enabled]
2022  --enable-ccache         enable using ccache to speed up recompilations
2023                          [disabled]
2024
2025Optional Packages:
2026  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2027  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2028  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2029                          support it), e.g. --with-target-bits=32 [guessed]
2030  --with-custom-make-dir  Deprecated. Option is kept for backwards
2031                          compatibility and is ignored
2032  --with-jdk-variant      JDK variant to build (normal) [normal]
2033  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2034                          optimized) [release]
2035  --with-jvm-variants     JVM variants (separated by commas) to build
2036                          (server,client,minimal,core,zero,zeroshark,custom)
2037                          [server]
2038  --with-devkit           use this devkit for compilers, tools and resources
2039  --with-sys-root         alias for --with-sysroot for backwards compatability
2040  --with-sysroot          use this directory as sysroot
2041  --with-tools-dir        alias for --with-toolchain-path for backwards
2042                          compatibility
2043  --with-toolchain-path   prepend these directories when searching for
2044                          toolchain binaries (compilers etc)
2045  --with-extra-path       prepend these directories to the default path
2046  --with-sdk-name         use the platform SDK of the given name. [macosx]
2047  --with-conf-name        use this as the name of the configuration [generated
2048                          from important configuration options]
2049  --with-output-sync      set make output sync type if supported by make.
2050                          [recurse]
2051  --with-default-make-target
2052                          set the default make target [exploded-image]
2053  --with-cacerts-file     specify alternative cacerts file
2054  --with-copyright-year   Set copyright year value for build [current year]
2055  --with-milestone        Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-update-version   Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-user-release-suffix
2060                          Deprecated. Option is kept for backwards
2061                          compatibility and is ignored
2062  --with-build-number     Deprecated. Option is kept for backwards
2063                          compatibility and is ignored
2064  --with-version-string   Set version string [calculated]
2065  --with-version-pre      Set the base part of the version 'PRE' field
2066                          (pre-release identifier) ['internal']
2067  --with-version-opt      Set version 'OPT' field (build metadata)
2068                          [<timestamp>.<user>.<dirname>]
2069  --with-version-build    Set version 'BUILD' field (build number) [not
2070                          specified]
2071  --with-version-major    Set version 'MAJOR' field (first number) [current
2072                          source value]
2073  --with-version-minor    Set version 'MINOR' field (second number) [current
2074                          source value]
2075  --with-version-security Set version 'SECURITY' field (third number) [current
2076                          source value]
2077  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2078                          specified]
2079  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2080  --with-build-jdk        path to JDK of same version as is being built[the
2081                          newly built JDK]
2082  --with-add-source-root  Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-source-root
2085                          Deprecated. Option is kept for backwards
2086                          compatibility and is ignored
2087  --with-adds-and-overrides
2088                          Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-langtools
2091                          Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-corba   Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-jaxp    Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-jaxws   Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-hotspot Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-nashorn Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jdk     Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-import-hotspot   import hotspot binaries from this jdk image or
2106                          hotspot build dist dir instead of building from
2107                          source
2108  --with-import-modules   import a set of prebuilt modules either as a zip
2109                          file or an exploded directory
2110  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2111                          to show possible values [platform dependent]
2112  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2113  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2114  --with-extra-ldflags    extra flags to be used when linking jdk
2115  --with-toolchain-version
2116                          the version of the toolchain to look for, use
2117                          '--help' to show possible values [platform
2118                          dependent]
2119  --with-build-devkit     Devkit to use for the build platform toolchain
2120  --with-jtreg            Regression Test Harness [probed]
2121  --with-native-debug-symbols
2122                          set the native debug symbol configuration (none,
2123                          internal, external, zipped) [varying]
2124  --with-jvm-features     additional JVM features to enable (separated by
2125                          comma), use '--help' to show possible values [none]
2126  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2127                          compatibility and is ignored
2128  --with-stdc++lib=<static>,<dynamic>,<default>
2129                          force linking of the C++ runtime on Linux to either
2130                          static or dynamic, default is static with dynamic as
2131                          fallback
2132  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2133                          (Windows only) [probed]
2134  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2135                          (Windows only) [probed]
2136  --with-x                use the X Window System
2137  --with-cups             specify prefix directory for the cups package
2138                          (expecting the headers under PATH/include)
2139  --with-cups-include     specify directory for the cups include files
2140  --with-freetype         specify prefix directory for the freetype package
2141                          (expecting the libraries under PATH/lib and the
2142                          headers under PATH/include)
2143  --with-freetype-include specify directory for the freetype include files
2144  --with-freetype-lib     specify directory for the freetype library
2145  --with-freetype-src     specify directory with freetype sources to
2146                          automatically build the library (experimental,
2147                          Windows-only)
2148  --with-alsa             specify prefix directory for the alsa package
2149                          (expecting the libraries under PATH/lib and the
2150                          headers under PATH/include)
2151  --with-alsa-include     specify directory for the alsa include files
2152  --with-alsa-lib         specify directory for the alsa library
2153  --with-libffi           specify prefix directory for the libffi package
2154                          (expecting the libraries under PATH/lib and the
2155                          headers under PATH/include)
2156  --with-libffi-include   specify directory for the libffi include files
2157  --with-libffi-lib       specify directory for the libffi library
2158  --with-libjpeg          use libjpeg from build system or OpenJDK source
2159                          (system, bundled) [bundled]
2160  --with-giflib           use giflib from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-libpng           use libpng from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-zlib             use zlib from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-lcms             use lcms2 from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-dxsdk            Deprecated. Option is kept for backwards
2169                          compatibility and is ignored
2170  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2171                          compatibility and is ignored
2172  --with-dxsdk-include    Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-num-cores        number of cores in the build system, e.g.
2175                          --with-num-cores=8 [probed]
2176  --with-memory-size      memory (in MB) available in the build system, e.g.
2177                          --with-memory-size=1024 [probed]
2178  --with-jobs             number of parallel jobs to let make run [calculated
2179                          based on cores and memory]
2180  --with-test-jobs        number of parallel tests jobs to run [based on build
2181                          jobs]
2182  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2183                          invocations of boot JDK, overriding the default
2184                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2185                          -enableassertions"
2186  --with-sjavac-server-java
2187                          use this java binary for running the sjavac
2188                          background server [Boot JDK java]
2189  --with-ccache-dir       where to store ccache files [~/.ccache]
2190
2191Some influential environment variables:
2192  BASENAME    Override default value for BASENAME
2193  BASH        Override default value for BASH
2194  CAT         Override default value for CAT
2195  CHMOD       Override default value for CHMOD
2196  CMP         Override default value for CMP
2197  COMM        Override default value for COMM
2198  CP          Override default value for CP
2199  CUT         Override default value for CUT
2200  DATE        Override default value for DATE
2201  DIFF        Override default value for DIFF
2202  DIRNAME     Override default value for DIRNAME
2203  ECHO        Override default value for ECHO
2204  EXPR        Override default value for EXPR
2205  FILE        Override default value for FILE
2206  FIND        Override default value for FIND
2207  HEAD        Override default value for HEAD
2208  GUNZIP      Override default value for GUNZIP
2209  GZIP        Override default value for GZIP
2210  LN          Override default value for LN
2211  LS          Override default value for LS
2212  MKDIR       Override default value for MKDIR
2213  MKTEMP      Override default value for MKTEMP
2214  MV          Override default value for MV
2215  NAWK        Override default value for NAWK
2216  PRINTF      Override default value for PRINTF
2217  RM          Override default value for RM
2218  RMDIR       Override default value for RMDIR
2219  SH          Override default value for SH
2220  SORT        Override default value for SORT
2221  TAIL        Override default value for TAIL
2222  TAR         Override default value for TAR
2223  TEE         Override default value for TEE
2224  TOUCH       Override default value for TOUCH
2225  TR          Override default value for TR
2226  UNAME       Override default value for UNAME
2227  UNIQ        Override default value for UNIQ
2228  WC          Override default value for WC
2229  WHICH       Override default value for WHICH
2230  XARGS       Override default value for XARGS
2231  AWK         Override default value for AWK
2232  GREP        Override default value for GREP
2233  EGREP       Override default value for EGREP
2234  FGREP       Override default value for FGREP
2235  SED         Override default value for SED
2236  CYGPATH     Override default value for CYGPATH
2237  READLINK    Override default value for READLINK
2238  DF          Override default value for DF
2239  CPIO        Override default value for CPIO
2240  NICE        Override default value for NICE
2241  MAKE        Override default value for MAKE
2242  UNZIP       Override default value for UNZIP
2243  ZIP         Override default value for ZIP
2244  LDD         Override default value for LDD
2245  OTOOL       Override default value for OTOOL
2246  READELF     Override default value for READELF
2247  HG          Override default value for HG
2248  STAT        Override default value for STAT
2249  TIME        Override default value for TIME
2250  DTRACE      Override default value for DTRACE
2251  PATCH       Override default value for PATCH
2252  DSYMUTIL    Override default value for DSYMUTIL
2253  XATTR       Override default value for XATTR
2254  CODESIGN    Override default value for CODESIGN
2255  SETFILE     Override default value for SETFILE
2256  PKG_CONFIG  path to pkg-config utility
2257  JAVA        Override default value for JAVA
2258  JAVAC       Override default value for JAVAC
2259  JAVAH       Override default value for JAVAH
2260  JAR         Override default value for JAR
2261  JARSIGNER   Override default value for JARSIGNER
2262  CC          C compiler command
2263  CFLAGS      C compiler flags
2264  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2265              nonstandard directory <lib dir>
2266  LIBS        libraries to pass to the linker, e.g. -l<library>
2267  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2268              you have headers in a nonstandard directory <include dir>
2269  CXX         C++ compiler command
2270  CXXFLAGS    C++ compiler flags
2271  CPP         C preprocessor
2272  CXXCPP      C++ preprocessor
2273  AS          Override default value for AS
2274  AR          Override default value for AR
2275  LIPO        Override default value for LIPO
2276  STRIP       Override default value for STRIP
2277  NM          Override default value for NM
2278  GNM         Override default value for GNM
2279  OBJCOPY     Override default value for OBJCOPY
2280  OBJDUMP     Override default value for OBJDUMP
2281  BUILD_CC    Override default value for BUILD_CC
2282  BUILD_CXX   Override default value for BUILD_CXX
2283  BUILD_NM    Override default value for BUILD_NM
2284  BUILD_AR    Override default value for BUILD_AR
2285  BUILD_OBJCOPY
2286              Override default value for BUILD_OBJCOPY
2287  BUILD_STRIP Override default value for BUILD_STRIP
2288  JTREGEXE    Override default value for JTREGEXE
2289  XMKMF       Path to xmkmf, Makefile generator for X Window System
2290  FREETYPE_CFLAGS
2291              C compiler flags for FREETYPE, overriding pkg-config
2292  FREETYPE_LIBS
2293              linker flags for FREETYPE, overriding pkg-config
2294  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2295  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2296  LIBFFI_CFLAGS
2297              C compiler flags for LIBFFI, overriding pkg-config
2298  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2299  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2300  PNG_LIBS    linker flags for PNG, overriding pkg-config
2301  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2302  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2303  ICECC_CMD   Override default value for ICECC_CMD
2304  ICECC_CREATE_ENV
2305              Override default value for ICECC_CREATE_ENV
2306  ICECC_WRAPPER
2307              Override default value for ICECC_WRAPPER
2308  CCACHE      Override default value for CCACHE
2309
2310Use these variables to override the choices made by `configure' or to help
2311it to find libraries and programs with nonstandard names/locations.
2312
2313Report bugs to <build-dev@openjdk.java.net>.
2314OpenJDK home page: <http://openjdk.java.net>.
2315_ACEOF
2316ac_status=$?
2317fi
2318
2319if test "$ac_init_help" = "recursive"; then
2320  # If there are subdirs, report their specific --help.
2321  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2322    test -d "$ac_dir" ||
2323      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2324      continue
2325    ac_builddir=.
2326
2327case "$ac_dir" in
2328.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2329*)
2330  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2331  # A ".." for each directory in $ac_dir_suffix.
2332  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2333  case $ac_top_builddir_sub in
2334  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2335  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2336  esac ;;
2337esac
2338ac_abs_top_builddir=$ac_pwd
2339ac_abs_builddir=$ac_pwd$ac_dir_suffix
2340# for backward compatibility:
2341ac_top_builddir=$ac_top_build_prefix
2342
2343case $srcdir in
2344  .)  # We are building in place.
2345    ac_srcdir=.
2346    ac_top_srcdir=$ac_top_builddir_sub
2347    ac_abs_top_srcdir=$ac_pwd ;;
2348  [\\/]* | ?:[\\/]* )  # Absolute name.
2349    ac_srcdir=$srcdir$ac_dir_suffix;
2350    ac_top_srcdir=$srcdir
2351    ac_abs_top_srcdir=$srcdir ;;
2352  *) # Relative name.
2353    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2354    ac_top_srcdir=$ac_top_build_prefix$srcdir
2355    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2356esac
2357ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2358
2359    cd "$ac_dir" || { ac_status=$?; continue; }
2360    # Check for guested configure.
2361    if test -f "$ac_srcdir/configure.gnu"; then
2362      echo &&
2363      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2364    elif test -f "$ac_srcdir/configure"; then
2365      echo &&
2366      $SHELL "$ac_srcdir/configure" --help=recursive
2367    else
2368      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2369    fi || ac_status=$?
2370    cd "$ac_pwd" || { ac_status=$?; break; }
2371  done
2372fi
2373
2374test -n "$ac_init_help" && exit $ac_status
2375if $ac_init_version; then
2376  cat <<\_ACEOF
2377OpenJDK configure jdk9
2378generated by GNU Autoconf 2.69
2379
2380Copyright (C) 2012 Free Software Foundation, Inc.
2381This configure script is free software; the Free Software Foundation
2382gives unlimited permission to copy, distribute and modify it.
2383_ACEOF
2384  exit
2385fi
2386
2387## ------------------------ ##
2388## Autoconf initialization. ##
2389## ------------------------ ##
2390
2391# ac_fn_c_try_compile LINENO
2392# --------------------------
2393# Try to compile conftest.$ac_ext, and return whether this succeeded.
2394ac_fn_c_try_compile ()
2395{
2396  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2397  rm -f conftest.$ac_objext
2398  if { { ac_try="$ac_compile"
2399case "(($ac_try" in
2400  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2401  *) ac_try_echo=$ac_try;;
2402esac
2403eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2404$as_echo "$ac_try_echo"; } >&5
2405  (eval "$ac_compile") 2>conftest.err
2406  ac_status=$?
2407  if test -s conftest.err; then
2408    grep -v '^ *+' conftest.err >conftest.er1
2409    cat conftest.er1 >&5
2410    mv -f conftest.er1 conftest.err
2411  fi
2412  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2413  test $ac_status = 0; } && {
2414	 test -z "$ac_c_werror_flag" ||
2415	 test ! -s conftest.err
2416       } && test -s conftest.$ac_objext; then :
2417  ac_retval=0
2418else
2419  $as_echo "$as_me: failed program was:" >&5
2420sed 's/^/| /' conftest.$ac_ext >&5
2421
2422	ac_retval=1
2423fi
2424  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2425  as_fn_set_status $ac_retval
2426
2427} # ac_fn_c_try_compile
2428
2429# ac_fn_cxx_try_compile LINENO
2430# ----------------------------
2431# Try to compile conftest.$ac_ext, and return whether this succeeded.
2432ac_fn_cxx_try_compile ()
2433{
2434  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2435  rm -f conftest.$ac_objext
2436  if { { ac_try="$ac_compile"
2437case "(($ac_try" in
2438  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2439  *) ac_try_echo=$ac_try;;
2440esac
2441eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2442$as_echo "$ac_try_echo"; } >&5
2443  (eval "$ac_compile") 2>conftest.err
2444  ac_status=$?
2445  if test -s conftest.err; then
2446    grep -v '^ *+' conftest.err >conftest.er1
2447    cat conftest.er1 >&5
2448    mv -f conftest.er1 conftest.err
2449  fi
2450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2451  test $ac_status = 0; } && {
2452	 test -z "$ac_cxx_werror_flag" ||
2453	 test ! -s conftest.err
2454       } && test -s conftest.$ac_objext; then :
2455  ac_retval=0
2456else
2457  $as_echo "$as_me: failed program was:" >&5
2458sed 's/^/| /' conftest.$ac_ext >&5
2459
2460	ac_retval=1
2461fi
2462  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2463  as_fn_set_status $ac_retval
2464
2465} # ac_fn_cxx_try_compile
2466
2467# ac_fn_c_try_cpp LINENO
2468# ----------------------
2469# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2470ac_fn_c_try_cpp ()
2471{
2472  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2473  if { { ac_try="$ac_cpp conftest.$ac_ext"
2474case "(($ac_try" in
2475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2476  *) ac_try_echo=$ac_try;;
2477esac
2478eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2479$as_echo "$ac_try_echo"; } >&5
2480  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2481  ac_status=$?
2482  if test -s conftest.err; then
2483    grep -v '^ *+' conftest.err >conftest.er1
2484    cat conftest.er1 >&5
2485    mv -f conftest.er1 conftest.err
2486  fi
2487  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2488  test $ac_status = 0; } > conftest.i && {
2489	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2490	 test ! -s conftest.err
2491       }; then :
2492  ac_retval=0
2493else
2494  $as_echo "$as_me: failed program was:" >&5
2495sed 's/^/| /' conftest.$ac_ext >&5
2496
2497    ac_retval=1
2498fi
2499  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500  as_fn_set_status $ac_retval
2501
2502} # ac_fn_c_try_cpp
2503
2504# ac_fn_cxx_try_cpp LINENO
2505# ------------------------
2506# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2507ac_fn_cxx_try_cpp ()
2508{
2509  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2510  if { { ac_try="$ac_cpp conftest.$ac_ext"
2511case "(($ac_try" in
2512  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2513  *) ac_try_echo=$ac_try;;
2514esac
2515eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2516$as_echo "$ac_try_echo"; } >&5
2517  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2518  ac_status=$?
2519  if test -s conftest.err; then
2520    grep -v '^ *+' conftest.err >conftest.er1
2521    cat conftest.er1 >&5
2522    mv -f conftest.er1 conftest.err
2523  fi
2524  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2525  test $ac_status = 0; } > conftest.i && {
2526	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2527	 test ! -s conftest.err
2528       }; then :
2529  ac_retval=0
2530else
2531  $as_echo "$as_me: failed program was:" >&5
2532sed 's/^/| /' conftest.$ac_ext >&5
2533
2534    ac_retval=1
2535fi
2536  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2537  as_fn_set_status $ac_retval
2538
2539} # ac_fn_cxx_try_cpp
2540
2541# ac_fn_c_try_link LINENO
2542# -----------------------
2543# Try to link conftest.$ac_ext, and return whether this succeeded.
2544ac_fn_c_try_link ()
2545{
2546  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2547  rm -f conftest.$ac_objext conftest$ac_exeext
2548  if { { ac_try="$ac_link"
2549case "(($ac_try" in
2550  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2551  *) ac_try_echo=$ac_try;;
2552esac
2553eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2554$as_echo "$ac_try_echo"; } >&5
2555  (eval "$ac_link") 2>conftest.err
2556  ac_status=$?
2557  if test -s conftest.err; then
2558    grep -v '^ *+' conftest.err >conftest.er1
2559    cat conftest.er1 >&5
2560    mv -f conftest.er1 conftest.err
2561  fi
2562  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2563  test $ac_status = 0; } && {
2564	 test -z "$ac_c_werror_flag" ||
2565	 test ! -s conftest.err
2566       } && test -s conftest$ac_exeext && {
2567	 test "$cross_compiling" = yes ||
2568	 test -x conftest$ac_exeext
2569       }; then :
2570  ac_retval=0
2571else
2572  $as_echo "$as_me: failed program was:" >&5
2573sed 's/^/| /' conftest.$ac_ext >&5
2574
2575	ac_retval=1
2576fi
2577  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2578  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2579  # interfere with the next link command; also delete a directory that is
2580  # left behind by Apple's compiler.  We do this before executing the actions.
2581  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2582  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2583  as_fn_set_status $ac_retval
2584
2585} # ac_fn_c_try_link
2586
2587# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2588# ---------------------------------------------------------
2589# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2590# the include files in INCLUDES and setting the cache variable VAR
2591# accordingly.
2592ac_fn_cxx_check_header_mongrel ()
2593{
2594  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595  if eval \${$3+:} false; then :
2596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2597$as_echo_n "checking for $2... " >&6; }
2598if eval \${$3+:} false; then :
2599  $as_echo_n "(cached) " >&6
2600fi
2601eval ac_res=\$$3
2602	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2603$as_echo "$ac_res" >&6; }
2604else
2605  # Is the header compilable?
2606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2607$as_echo_n "checking $2 usability... " >&6; }
2608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2609/* end confdefs.h.  */
2610$4
2611#include <$2>
2612_ACEOF
2613if ac_fn_cxx_try_compile "$LINENO"; then :
2614  ac_header_compiler=yes
2615else
2616  ac_header_compiler=no
2617fi
2618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2620$as_echo "$ac_header_compiler" >&6; }
2621
2622# Is the header present?
2623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2624$as_echo_n "checking $2 presence... " >&6; }
2625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2626/* end confdefs.h.  */
2627#include <$2>
2628_ACEOF
2629if ac_fn_cxx_try_cpp "$LINENO"; then :
2630  ac_header_preproc=yes
2631else
2632  ac_header_preproc=no
2633fi
2634rm -f conftest.err conftest.i conftest.$ac_ext
2635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2636$as_echo "$ac_header_preproc" >&6; }
2637
2638# So?  What about this header?
2639case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2640  yes:no: )
2641    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2642$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2644$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2645    ;;
2646  no:yes:* )
2647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2648$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2650$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2652$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2653    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2654$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2656$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2657( $as_echo "## ----------------------------------------- ##
2658## Report this to build-dev@openjdk.java.net ##
2659## ----------------------------------------- ##"
2660     ) | sed "s/^/$as_me: WARNING:     /" >&2
2661    ;;
2662esac
2663  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2664$as_echo_n "checking for $2... " >&6; }
2665if eval \${$3+:} false; then :
2666  $as_echo_n "(cached) " >&6
2667else
2668  eval "$3=\$ac_header_compiler"
2669fi
2670eval ac_res=\$$3
2671	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2672$as_echo "$ac_res" >&6; }
2673fi
2674  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2675
2676} # ac_fn_cxx_check_header_mongrel
2677
2678# ac_fn_cxx_try_run LINENO
2679# ------------------------
2680# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2681# that executables *can* be run.
2682ac_fn_cxx_try_run ()
2683{
2684  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2685  if { { ac_try="$ac_link"
2686case "(($ac_try" in
2687  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2688  *) ac_try_echo=$ac_try;;
2689esac
2690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2691$as_echo "$ac_try_echo"; } >&5
2692  (eval "$ac_link") 2>&5
2693  ac_status=$?
2694  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2695  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2696  { { case "(($ac_try" in
2697  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698  *) ac_try_echo=$ac_try;;
2699esac
2700eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2701$as_echo "$ac_try_echo"; } >&5
2702  (eval "$ac_try") 2>&5
2703  ac_status=$?
2704  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2705  test $ac_status = 0; }; }; then :
2706  ac_retval=0
2707else
2708  $as_echo "$as_me: program exited with status $ac_status" >&5
2709       $as_echo "$as_me: failed program was:" >&5
2710sed 's/^/| /' conftest.$ac_ext >&5
2711
2712       ac_retval=$ac_status
2713fi
2714  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2715  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2716  as_fn_set_status $ac_retval
2717
2718} # ac_fn_cxx_try_run
2719
2720# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2721# ---------------------------------------------------------
2722# Tests whether HEADER exists and can be compiled using the include files in
2723# INCLUDES, setting the cache variable VAR accordingly.
2724ac_fn_cxx_check_header_compile ()
2725{
2726  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2728$as_echo_n "checking for $2... " >&6; }
2729if eval \${$3+:} false; then :
2730  $as_echo_n "(cached) " >&6
2731else
2732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2733/* end confdefs.h.  */
2734$4
2735#include <$2>
2736_ACEOF
2737if ac_fn_cxx_try_compile "$LINENO"; then :
2738  eval "$3=yes"
2739else
2740  eval "$3=no"
2741fi
2742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2743fi
2744eval ac_res=\$$3
2745	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2746$as_echo "$ac_res" >&6; }
2747  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2748
2749} # ac_fn_cxx_check_header_compile
2750
2751# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2752# ----------------------------------------------
2753# Tries to find the compile-time value of EXPR in a program that includes
2754# INCLUDES, setting VAR accordingly. Returns whether the value could be
2755# computed
2756ac_fn_cxx_compute_int ()
2757{
2758  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2759  if test "$cross_compiling" = yes; then
2760    # Depending upon the size, compute the lo and hi bounds.
2761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2762/* end confdefs.h.  */
2763$4
2764int
2765main ()
2766{
2767static int test_array [1 - 2 * !(($2) >= 0)];
2768test_array [0] = 0;
2769return test_array [0];
2770
2771  ;
2772  return 0;
2773}
2774_ACEOF
2775if ac_fn_cxx_try_compile "$LINENO"; then :
2776  ac_lo=0 ac_mid=0
2777  while :; do
2778    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2779/* end confdefs.h.  */
2780$4
2781int
2782main ()
2783{
2784static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2785test_array [0] = 0;
2786return test_array [0];
2787
2788  ;
2789  return 0;
2790}
2791_ACEOF
2792if ac_fn_cxx_try_compile "$LINENO"; then :
2793  ac_hi=$ac_mid; break
2794else
2795  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2796			if test $ac_lo -le $ac_mid; then
2797			  ac_lo= ac_hi=
2798			  break
2799			fi
2800			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2801fi
2802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2803  done
2804else
2805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2806/* end confdefs.h.  */
2807$4
2808int
2809main ()
2810{
2811static int test_array [1 - 2 * !(($2) < 0)];
2812test_array [0] = 0;
2813return test_array [0];
2814
2815  ;
2816  return 0;
2817}
2818_ACEOF
2819if ac_fn_cxx_try_compile "$LINENO"; then :
2820  ac_hi=-1 ac_mid=-1
2821  while :; do
2822    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2823/* end confdefs.h.  */
2824$4
2825int
2826main ()
2827{
2828static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2829test_array [0] = 0;
2830return test_array [0];
2831
2832  ;
2833  return 0;
2834}
2835_ACEOF
2836if ac_fn_cxx_try_compile "$LINENO"; then :
2837  ac_lo=$ac_mid; break
2838else
2839  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2840			if test $ac_mid -le $ac_hi; then
2841			  ac_lo= ac_hi=
2842			  break
2843			fi
2844			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2845fi
2846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2847  done
2848else
2849  ac_lo= ac_hi=
2850fi
2851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2852fi
2853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2854# Binary search between lo and hi bounds.
2855while test "x$ac_lo" != "x$ac_hi"; do
2856  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2857  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858/* end confdefs.h.  */
2859$4
2860int
2861main ()
2862{
2863static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2864test_array [0] = 0;
2865return test_array [0];
2866
2867  ;
2868  return 0;
2869}
2870_ACEOF
2871if ac_fn_cxx_try_compile "$LINENO"; then :
2872  ac_hi=$ac_mid
2873else
2874  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2875fi
2876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2877done
2878case $ac_lo in #((
2879?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2880'') ac_retval=1 ;;
2881esac
2882  else
2883    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2884/* end confdefs.h.  */
2885$4
2886static long int longval () { return $2; }
2887static unsigned long int ulongval () { return $2; }
2888#include <stdio.h>
2889#include <stdlib.h>
2890int
2891main ()
2892{
2893
2894  FILE *f = fopen ("conftest.val", "w");
2895  if (! f)
2896    return 1;
2897  if (($2) < 0)
2898    {
2899      long int i = longval ();
2900      if (i != ($2))
2901	return 1;
2902      fprintf (f, "%ld", i);
2903    }
2904  else
2905    {
2906      unsigned long int i = ulongval ();
2907      if (i != ($2))
2908	return 1;
2909      fprintf (f, "%lu", i);
2910    }
2911  /* Do not output a trailing newline, as this causes \r\n confusion
2912     on some platforms.  */
2913  return ferror (f) || fclose (f) != 0;
2914
2915  ;
2916  return 0;
2917}
2918_ACEOF
2919if ac_fn_cxx_try_run "$LINENO"; then :
2920  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2921else
2922  ac_retval=1
2923fi
2924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2925  conftest.$ac_objext conftest.beam conftest.$ac_ext
2926rm -f conftest.val
2927
2928  fi
2929  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2930  as_fn_set_status $ac_retval
2931
2932} # ac_fn_cxx_compute_int
2933
2934# ac_fn_cxx_try_link LINENO
2935# -------------------------
2936# Try to link conftest.$ac_ext, and return whether this succeeded.
2937ac_fn_cxx_try_link ()
2938{
2939  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2940  rm -f conftest.$ac_objext conftest$ac_exeext
2941  if { { ac_try="$ac_link"
2942case "(($ac_try" in
2943  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2944  *) ac_try_echo=$ac_try;;
2945esac
2946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2947$as_echo "$ac_try_echo"; } >&5
2948  (eval "$ac_link") 2>conftest.err
2949  ac_status=$?
2950  if test -s conftest.err; then
2951    grep -v '^ *+' conftest.err >conftest.er1
2952    cat conftest.er1 >&5
2953    mv -f conftest.er1 conftest.err
2954  fi
2955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2956  test $ac_status = 0; } && {
2957	 test -z "$ac_cxx_werror_flag" ||
2958	 test ! -s conftest.err
2959       } && test -s conftest$ac_exeext && {
2960	 test "$cross_compiling" = yes ||
2961	 test -x conftest$ac_exeext
2962       }; then :
2963  ac_retval=0
2964else
2965  $as_echo "$as_me: failed program was:" >&5
2966sed 's/^/| /' conftest.$ac_ext >&5
2967
2968	ac_retval=1
2969fi
2970  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2971  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2972  # interfere with the next link command; also delete a directory that is
2973  # left behind by Apple's compiler.  We do this before executing the actions.
2974  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2975  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2976  as_fn_set_status $ac_retval
2977
2978} # ac_fn_cxx_try_link
2979
2980# ac_fn_cxx_check_func LINENO FUNC VAR
2981# ------------------------------------
2982# Tests whether FUNC exists, setting the cache variable VAR accordingly
2983ac_fn_cxx_check_func ()
2984{
2985  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2987$as_echo_n "checking for $2... " >&6; }
2988if eval \${$3+:} false; then :
2989  $as_echo_n "(cached) " >&6
2990else
2991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2992/* end confdefs.h.  */
2993/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2994   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2995#define $2 innocuous_$2
2996
2997/* System header to define __stub macros and hopefully few prototypes,
2998    which can conflict with char $2 (); below.
2999    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3000    <limits.h> exists even on freestanding compilers.  */
3001
3002#ifdef __STDC__
3003# include <limits.h>
3004#else
3005# include <assert.h>
3006#endif
3007
3008#undef $2
3009
3010/* Override any GCC internal prototype to avoid an error.
3011   Use char because int might match the return type of a GCC
3012   builtin and then its argument prototype would still apply.  */
3013#ifdef __cplusplus
3014extern "C"
3015#endif
3016char $2 ();
3017/* The GNU C library defines this for functions which it implements
3018    to always fail with ENOSYS.  Some functions are actually named
3019    something starting with __ and the normal name is an alias.  */
3020#if defined __stub_$2 || defined __stub___$2
3021choke me
3022#endif
3023
3024int
3025main ()
3026{
3027return $2 ();
3028  ;
3029  return 0;
3030}
3031_ACEOF
3032if ac_fn_cxx_try_link "$LINENO"; then :
3033  eval "$3=yes"
3034else
3035  eval "$3=no"
3036fi
3037rm -f core conftest.err conftest.$ac_objext \
3038    conftest$ac_exeext conftest.$ac_ext
3039fi
3040eval ac_res=\$$3
3041	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3042$as_echo "$ac_res" >&6; }
3043  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3044
3045} # ac_fn_cxx_check_func
3046
3047# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3048# -------------------------------------------------------
3049# Tests whether HEADER exists and can be compiled using the include files in
3050# INCLUDES, setting the cache variable VAR accordingly.
3051ac_fn_c_check_header_compile ()
3052{
3053  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3055$as_echo_n "checking for $2... " >&6; }
3056if eval \${$3+:} false; then :
3057  $as_echo_n "(cached) " >&6
3058else
3059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3060/* end confdefs.h.  */
3061$4
3062#include <$2>
3063_ACEOF
3064if ac_fn_c_try_compile "$LINENO"; then :
3065  eval "$3=yes"
3066else
3067  eval "$3=no"
3068fi
3069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3070fi
3071eval ac_res=\$$3
3072	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3073$as_echo "$ac_res" >&6; }
3074  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3075
3076} # ac_fn_c_check_header_compile
3077cat >config.log <<_ACEOF
3078This file contains any messages produced by compilers while
3079running configure, to aid debugging if configure makes a mistake.
3080
3081It was created by OpenJDK $as_me jdk9, which was
3082generated by GNU Autoconf 2.69.  Invocation command line was
3083
3084  $ $0 $@
3085
3086_ACEOF
3087exec 5>>config.log
3088{
3089cat <<_ASUNAME
3090## --------- ##
3091## Platform. ##
3092## --------- ##
3093
3094hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3095uname -m = `(uname -m) 2>/dev/null || echo unknown`
3096uname -r = `(uname -r) 2>/dev/null || echo unknown`
3097uname -s = `(uname -s) 2>/dev/null || echo unknown`
3098uname -v = `(uname -v) 2>/dev/null || echo unknown`
3099
3100/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3101/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3102
3103/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3104/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3105/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3106/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3107/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3108/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3109/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3110
3111_ASUNAME
3112
3113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3114for as_dir in $PATH
3115do
3116  IFS=$as_save_IFS
3117  test -z "$as_dir" && as_dir=.
3118    $as_echo "PATH: $as_dir"
3119  done
3120IFS=$as_save_IFS
3121
3122} >&5
3123
3124cat >&5 <<_ACEOF
3125
3126
3127## ----------- ##
3128## Core tests. ##
3129## ----------- ##
3130
3131_ACEOF
3132
3133
3134# Keep a trace of the command line.
3135# Strip out --no-create and --no-recursion so they do not pile up.
3136# Strip out --silent because we don't want to record it for future runs.
3137# Also quote any args containing shell meta-characters.
3138# Make two passes to allow for proper duplicate-argument suppression.
3139ac_configure_args=
3140ac_configure_args0=
3141ac_configure_args1=
3142ac_must_keep_next=false
3143for ac_pass in 1 2
3144do
3145  for ac_arg
3146  do
3147    case $ac_arg in
3148    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3149    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3150    | -silent | --silent | --silen | --sile | --sil)
3151      continue ;;
3152    *\'*)
3153      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3154    esac
3155    case $ac_pass in
3156    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3157    2)
3158      as_fn_append ac_configure_args1 " '$ac_arg'"
3159      if test $ac_must_keep_next = true; then
3160	ac_must_keep_next=false # Got value, back to normal.
3161      else
3162	case $ac_arg in
3163	  *=* | --config-cache | -C | -disable-* | --disable-* \
3164	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3165	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3166	  | -with-* | --with-* | -without-* | --without-* | --x)
3167	    case "$ac_configure_args0 " in
3168	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3169	    esac
3170	    ;;
3171	  -* ) ac_must_keep_next=true ;;
3172	esac
3173      fi
3174      as_fn_append ac_configure_args " '$ac_arg'"
3175      ;;
3176    esac
3177  done
3178done
3179{ ac_configure_args0=; unset ac_configure_args0;}
3180{ ac_configure_args1=; unset ac_configure_args1;}
3181
3182# When interrupted or exit'd, cleanup temporary files, and complete
3183# config.log.  We remove comments because anyway the quotes in there
3184# would cause problems or look ugly.
3185# WARNING: Use '\'' to represent an apostrophe within the trap.
3186# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3187trap 'exit_status=$?
3188  # Save into config.log some information that might help in debugging.
3189  {
3190    echo
3191
3192    $as_echo "## ---------------- ##
3193## Cache variables. ##
3194## ---------------- ##"
3195    echo
3196    # The following way of writing the cache mishandles newlines in values,
3197(
3198  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3199    eval ac_val=\$$ac_var
3200    case $ac_val in #(
3201    *${as_nl}*)
3202      case $ac_var in #(
3203      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3204$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3205      esac
3206      case $ac_var in #(
3207      _ | IFS | as_nl) ;; #(
3208      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3209      *) { eval $ac_var=; unset $ac_var;} ;;
3210      esac ;;
3211    esac
3212  done
3213  (set) 2>&1 |
3214    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3215    *${as_nl}ac_space=\ *)
3216      sed -n \
3217	"s/'\''/'\''\\\\'\'''\''/g;
3218	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3219      ;; #(
3220    *)
3221      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3222      ;;
3223    esac |
3224    sort
3225)
3226    echo
3227
3228    $as_echo "## ----------------- ##
3229## Output variables. ##
3230## ----------------- ##"
3231    echo
3232    for ac_var in $ac_subst_vars
3233    do
3234      eval ac_val=\$$ac_var
3235      case $ac_val in
3236      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3237      esac
3238      $as_echo "$ac_var='\''$ac_val'\''"
3239    done | sort
3240    echo
3241
3242    if test -n "$ac_subst_files"; then
3243      $as_echo "## ------------------- ##
3244## File substitutions. ##
3245## ------------------- ##"
3246      echo
3247      for ac_var in $ac_subst_files
3248      do
3249	eval ac_val=\$$ac_var
3250	case $ac_val in
3251	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3252	esac
3253	$as_echo "$ac_var='\''$ac_val'\''"
3254      done | sort
3255      echo
3256    fi
3257
3258    if test -s confdefs.h; then
3259      $as_echo "## ----------- ##
3260## confdefs.h. ##
3261## ----------- ##"
3262      echo
3263      cat confdefs.h
3264      echo
3265    fi
3266    test "$ac_signal" != 0 &&
3267      $as_echo "$as_me: caught signal $ac_signal"
3268    $as_echo "$as_me: exit $exit_status"
3269  } >&5
3270  rm -f core *.core core.conftest.* &&
3271    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3272    exit $exit_status
3273' 0
3274for ac_signal in 1 2 13 15; do
3275  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3276done
3277ac_signal=0
3278
3279# confdefs.h avoids OS command line length limits that DEFS can exceed.
3280rm -f -r conftest* confdefs.h
3281
3282$as_echo "/* confdefs.h */" > confdefs.h
3283
3284# Predefined preprocessor variables.
3285
3286cat >>confdefs.h <<_ACEOF
3287#define PACKAGE_NAME "$PACKAGE_NAME"
3288_ACEOF
3289
3290cat >>confdefs.h <<_ACEOF
3291#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3292_ACEOF
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_VERSION "$PACKAGE_VERSION"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_STRING "$PACKAGE_STRING"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3304_ACEOF
3305
3306cat >>confdefs.h <<_ACEOF
3307#define PACKAGE_URL "$PACKAGE_URL"
3308_ACEOF
3309
3310
3311# Let the site file select an alternate cache file if it wants to.
3312# Prefer an explicitly selected file to automatically selected ones.
3313ac_site_file1=NONE
3314ac_site_file2=NONE
3315if test -n "$CONFIG_SITE"; then
3316  # We do not want a PATH search for config.site.
3317  case $CONFIG_SITE in #((
3318    -*)  ac_site_file1=./$CONFIG_SITE;;
3319    */*) ac_site_file1=$CONFIG_SITE;;
3320    *)   ac_site_file1=./$CONFIG_SITE;;
3321  esac
3322elif test "x$prefix" != xNONE; then
3323  ac_site_file1=$prefix/share/config.site
3324  ac_site_file2=$prefix/etc/config.site
3325else
3326  ac_site_file1=$ac_default_prefix/share/config.site
3327  ac_site_file2=$ac_default_prefix/etc/config.site
3328fi
3329for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3330do
3331  test "x$ac_site_file" = xNONE && continue
3332  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3333    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3334$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3335    sed 's/^/| /' "$ac_site_file" >&5
3336    . "$ac_site_file" \
3337      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3339as_fn_error $? "failed to load site script $ac_site_file
3340See \`config.log' for more details" "$LINENO" 5; }
3341  fi
3342done
3343
3344if test -r "$cache_file"; then
3345  # Some versions of bash will fail to source /dev/null (special files
3346  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3347  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3348    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3349$as_echo "$as_me: loading cache $cache_file" >&6;}
3350    case $cache_file in
3351      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3352      *)                      . "./$cache_file";;
3353    esac
3354  fi
3355else
3356  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3357$as_echo "$as_me: creating cache $cache_file" >&6;}
3358  >$cache_file
3359fi
3360
3361# Check that the precious variables saved in the cache have kept the same
3362# value.
3363ac_cache_corrupted=false
3364for ac_var in $ac_precious_vars; do
3365  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3366  eval ac_new_set=\$ac_env_${ac_var}_set
3367  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3368  eval ac_new_val=\$ac_env_${ac_var}_value
3369  case $ac_old_set,$ac_new_set in
3370    set,)
3371      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3372$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3373      ac_cache_corrupted=: ;;
3374    ,set)
3375      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3376$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3377      ac_cache_corrupted=: ;;
3378    ,);;
3379    *)
3380      if test "x$ac_old_val" != "x$ac_new_val"; then
3381	# differences in whitespace do not lead to failure.
3382	ac_old_val_w=`echo x $ac_old_val`
3383	ac_new_val_w=`echo x $ac_new_val`
3384	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3385	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3386$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3387	  ac_cache_corrupted=:
3388	else
3389	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3390$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3391	  eval $ac_var=\$ac_old_val
3392	fi
3393	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3394$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3395	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3396$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3397      fi;;
3398  esac
3399  # Pass precious variables to config.status.
3400  if test "$ac_new_set" = set; then
3401    case $ac_new_val in
3402    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3403    *) ac_arg=$ac_var=$ac_new_val ;;
3404    esac
3405    case " $ac_configure_args " in
3406      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3407      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3408    esac
3409  fi
3410done
3411if $ac_cache_corrupted; then
3412  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3414  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3415$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3416  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3417fi
3418## -------------------- ##
3419## Main body of script. ##
3420## -------------------- ##
3421
3422ac_ext=c
3423ac_cpp='$CPP $CPPFLAGS'
3424ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3425ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3426ac_compiler_gnu=$ac_cv_c_compiler_gnu
3427
3428
3429
3430ac_aux_dir=
3431for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3432  if test -f "$ac_dir/install-sh"; then
3433    ac_aux_dir=$ac_dir
3434    ac_install_sh="$ac_aux_dir/install-sh -c"
3435    break
3436  elif test -f "$ac_dir/install.sh"; then
3437    ac_aux_dir=$ac_dir
3438    ac_install_sh="$ac_aux_dir/install.sh -c"
3439    break
3440  elif test -f "$ac_dir/shtool"; then
3441    ac_aux_dir=$ac_dir
3442    ac_install_sh="$ac_aux_dir/shtool install -c"
3443    break
3444  fi
3445done
3446if test -z "$ac_aux_dir"; then
3447  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
3448fi
3449
3450# These three variables are undocumented and unsupported,
3451# and are intended to be withdrawn in a future Autoconf release.
3452# They can cause serious problems if a builder's source tree is in a directory
3453# whose full name contains unusual characters.
3454ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3455ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3456ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3457
3458
3459# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3460
3461#
3462# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3463# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3464#
3465# This code is free software; you can redistribute it and/or modify it
3466# under the terms of the GNU General Public License version 2 only, as
3467# published by the Free Software Foundation.  Oracle designates this
3468# particular file as subject to the "Classpath" exception as provided
3469# by Oracle in the LICENSE file that accompanied this code.
3470#
3471# This code is distributed in the hope that it will be useful, but WITHOUT
3472# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3473# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3474# version 2 for more details (a copy is included in the LICENSE file that
3475# accompanied this code).
3476#
3477# You should have received a copy of the GNU General Public License version
3478# 2 along with this work; if not, write to the Free Software Foundation,
3479# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3480#
3481# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3482# or visit www.oracle.com if you need additional information or have any
3483# questions.
3484#
3485
3486#
3487# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3488#
3489# This program is free software; you can redistribute it and/or modify
3490# it under the terms of the GNU General Public License as published by
3491# the Free Software Foundation; either version 2 of the License, or
3492# (at your option) any later version.
3493#
3494# This program is distributed in the hope that it will be useful, but
3495# WITHOUT ANY WARRANTY; without even the implied warranty of
3496# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3497# General Public License for more details.
3498#
3499# You should have received a copy of the GNU General Public License
3500# along with this program; if not, write to the Free Software
3501# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3502#
3503# As a special exception to the GNU General Public License, if you
3504# distribute this file as part of a program that contains a
3505# configuration script generated by Autoconf, you may include it under
3506# the same distribution terms that you use for the rest of that program.
3507
3508# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3509# ----------------------------------
3510# PKG_PROG_PKG_CONFIG
3511
3512# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3513#
3514# Check to see whether a particular set of modules exists.  Similar
3515# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3516#
3517#
3518# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3519# this or PKG_CHECK_MODULES is called, or make sure to call
3520# PKG_CHECK_EXISTS manually
3521# --------------------------------------------------------------
3522
3523
3524
3525# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3526# ---------------------------------------------
3527# _PKG_CONFIG
3528
3529# _PKG_SHORT_ERRORS_SUPPORTED
3530# -----------------------------
3531# _PKG_SHORT_ERRORS_SUPPORTED
3532
3533
3534# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3535# [ACTION-IF-NOT-FOUND])
3536#
3537#
3538# Note that if there is a possibility the first call to
3539# PKG_CHECK_MODULES might not happen, you should be sure to include an
3540# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3541#
3542#
3543# --------------------------------------------------------------
3544# PKG_CHECK_MODULES
3545
3546
3547# Include these first...
3548#
3549# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3550# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3551#
3552# This code is free software; you can redistribute it and/or modify it
3553# under the terms of the GNU General Public License version 2 only, as
3554# published by the Free Software Foundation.  Oracle designates this
3555# particular file as subject to the "Classpath" exception as provided
3556# by Oracle in the LICENSE file that accompanied this code.
3557#
3558# This code is distributed in the hope that it will be useful, but WITHOUT
3559# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3560# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3561# version 2 for more details (a copy is included in the LICENSE file that
3562# accompanied this code).
3563#
3564# You should have received a copy of the GNU General Public License version
3565# 2 along with this work; if not, write to the Free Software Foundation,
3566# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3567#
3568# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3569# or visit www.oracle.com if you need additional information or have any
3570# questions.
3571#
3572
3573# Create a function/macro that takes a series of named arguments. The call is
3574# similar to AC_DEFUN, but the setup of the function looks like this:
3575# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3576# ... do something
3577#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3578# ])
3579# A star (*) in front of a named argument means that it is required and it's
3580# presence will be verified. To pass e.g. the first value as a normal indexed
3581# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3582# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3583# "ARG_FOO".
3584#
3585# The generated function can be called like this:
3586# MYFUNC(FOO: [foo-val],
3587#     BAR: [
3588#         $ECHO hello world
3589#     ])
3590# Note that the argument value must start on the same line as the argument name.
3591#
3592# Argument 1: Name of the function to define
3593# Argument 2: List of legal named arguments, with a * prefix for required arguments
3594# Argument 3: Argument array to treat as named, typically $@
3595# Argument 4: The main function body
3596
3597
3598# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3599# If so, then append $1 to $2 \
3600# Also set JVM_ARG_OK to true/false depending on outcome.
3601
3602
3603# Appends a string to a path variable, only adding the : when needed.
3604
3605
3606# Prepends a string to a path variable, only adding the : when needed.
3607
3608
3609# This will make sure the given variable points to a full and proper
3610# path. This means:
3611# 1) There will be no spaces in the path. On unix platforms,
3612#    spaces in the path will result in an error. On Windows,
3613#    the path will be rewritten using short-style to be space-free.
3614# 2) The path will be absolute, and it will be in unix-style (on
3615#     cygwin).
3616# $1: The name of the variable to fix
3617
3618
3619# This will make sure the given variable points to a executable
3620# with a full and proper path. This means:
3621# 1) There will be no spaces in the path. On unix platforms,
3622#    spaces in the path will result in an error. On Windows,
3623#    the path will be rewritten using short-style to be space-free.
3624# 2) The path will be absolute, and it will be in unix-style (on
3625#     cygwin).
3626# Any arguments given to the executable is preserved.
3627# If the input variable does not have a directory specification, then
3628# it need to be in the PATH.
3629# $1: The name of the variable to fix
3630
3631
3632
3633
3634# Register a --with argument but mark it as deprecated
3635# $1: The name of the with argument to deprecate, not including --with-
3636
3637
3638# Register a --enable argument but mark it as deprecated
3639# $1: The name of the with argument to deprecate, not including --enable-
3640# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3641# $3: Messages to user.
3642
3643
3644
3645
3646# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3647# $1: variable to check
3648
3649
3650# Check that there are no unprocessed overridden variables left.
3651# If so, they are an incorrect argument and we will exit with an error.
3652
3653
3654# Setup a tool for the given variable. If correctly specified by the user,
3655# use that value, otherwise search for the tool using the supplied code snippet.
3656# $1: variable to set
3657# $2: code snippet to call to look for the tool
3658# $3: code snippet to call if variable was used to find tool
3659
3660
3661# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3662# $1: variable to set
3663# $2: executable name (or list of names) to look for
3664
3665
3666# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3667# $1: variable to set
3668# $2: executable name (or list of names) to look for
3669
3670
3671# Like BASIC_PATH_PROGS but fails if no tool was found.
3672# $1: variable to set
3673# $2: executable name (or list of names) to look for
3674
3675
3676# Like BASIC_SETUP_TOOL but fails if no tool was found.
3677# $1: variable to set
3678# $2: autoconf macro to call to look for the special tool
3679
3680
3681# Setup the most fundamental tools that relies on not much else to set up,
3682# but is used by much of the early bootstrap code.
3683
3684
3685# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3686
3687
3688# Evaluates platform specific overrides for devkit variables.
3689# $1: Name of variable
3690
3691
3692
3693
3694
3695
3696#%%% Simple tools %%%
3697
3698# Check if we have found a usable version of make
3699# $1: the path to a potential make binary (or empty)
3700# $2: the description on how we found this
3701
3702
3703
3704
3705# Goes looking for a usable version of GNU make.
3706
3707
3708
3709
3710
3711
3712
3713
3714# Check if build directory is on local disk. If not possible to determine,
3715# we prefer to claim it's local.
3716# Argument 1: directory to test
3717# Argument 2: what to do if it is on local disk
3718# Argument 3: what to do otherwise (remote disk or failure)
3719
3720
3721# Check that source files have basic read permissions set. This might
3722# not be the case in cygwin in certain conditions.
3723
3724
3725
3726
3727# Check for support for specific options in bash
3728
3729
3730################################################################################
3731#
3732# Default make target
3733#
3734
3735
3736# Code to run after AC_OUTPUT
3737
3738
3739#
3740# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3741# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3742#
3743# This code is free software; you can redistribute it and/or modify it
3744# under the terms of the GNU General Public License version 2 only, as
3745# published by the Free Software Foundation.  Oracle designates this
3746# particular file as subject to the "Classpath" exception as provided
3747# by Oracle in the LICENSE file that accompanied this code.
3748#
3749# This code is distributed in the hope that it will be useful, but WITHOUT
3750# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3751# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3752# version 2 for more details (a copy is included in the LICENSE file that
3753# accompanied this code).
3754#
3755# You should have received a copy of the GNU General Public License version
3756# 2 along with this work; if not, write to the Free Software Foundation,
3757# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3758#
3759# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3760# or visit www.oracle.com if you need additional information or have any
3761# questions.
3762#
3763
3764
3765
3766
3767
3768# Helper function which possibly converts a path using DOS-style short mode.
3769# If so, the updated path is stored in $new_path.
3770# $1: The path to check
3771
3772
3773# Helper function which possibly converts a path using DOS-style short mode.
3774# If so, the updated path is stored in $new_path.
3775# $1: The path to check
3776
3777
3778# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3779# and could probably be heavily simplified. However, all changes in this
3780# area tend to need lot of testing in different scenarios, and in lack of
3781# proper unit testing, cleaning this up has not been deemed worth the effort
3782# at the moment.
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3793
3794
3795
3796
3797# ... then the rest
3798#
3799# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3800# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3801#
3802# This code is free software; you can redistribute it and/or modify it
3803# under the terms of the GNU General Public License version 2 only, as
3804# published by the Free Software Foundation.  Oracle designates this
3805# particular file as subject to the "Classpath" exception as provided
3806# by Oracle in the LICENSE file that accompanied this code.
3807#
3808# This code is distributed in the hope that it will be useful, but WITHOUT
3809# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3810# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3811# version 2 for more details (a copy is included in the LICENSE file that
3812# accompanied this code).
3813#
3814# You should have received a copy of the GNU General Public License version
3815# 2 along with this work; if not, write to the Free Software Foundation,
3816# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3817#
3818# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3819# or visit www.oracle.com if you need additional information or have any
3820# questions.
3821#
3822
3823########################################################################
3824# This file handles detection of the Boot JDK. The Boot JDK detection
3825# process has been developed as a response to solve a complex real-world
3826# problem. Initially, it was simple, but it has grown as platform after
3827# platform, idiosyncracy after idiosyncracy has been supported.
3828#
3829# The basic idea is this:
3830# 1) You need an acceptable *) JDK to use as a Boot JDK
3831# 2) There are several ways to locate a JDK, that are mostly platform
3832#    dependent **)
3833# 3) You can have multiple JDKs installed
3834# 4) If possible, configure should try to dig out an acceptable JDK
3835#    automatically, without having to resort to command-line options
3836#
3837# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3838#     javac) and not a JRE, etc.
3839#
3840# **) On Windows we typically use a well-known path.
3841#     On MacOSX we typically use the tool java_home.
3842#     On Linux we typically find javac in the $PATH, and then follow a
3843#     chain of symlinks that often ends up in a real JDK.
3844#
3845# This leads to the code where we check in different ways to locate a
3846# JDK, and if one is found, check if it is acceptable. If not, we print
3847# our reasons for rejecting it (useful when debugging non-working
3848# configure situations) and continue checking the next one.
3849########################################################################
3850
3851# Execute the check given as argument, and verify the result
3852# If the Boot JDK was previously found, do nothing
3853# $1 A command line (typically autoconf macro) to execute
3854
3855
3856# Test: Is bootjdk explicitely set by command line arguments?
3857
3858
3859# Test: Is $JAVA_HOME set?
3860
3861
3862# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3863
3864
3865# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3866# $1: Argument to the java_home binary (optional)
3867
3868
3869# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3870
3871
3872# Look for a jdk in the given path. If there are multiple, try to select the newest.
3873# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3874# $1 = Path to directory containing jdk installations.
3875# $2 = String to append to the found JDK directory to get the proper JDK home
3876
3877
3878# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3879# environmental variable as base for where to look.
3880# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3881
3882
3883# Test: Is there a JDK installed in default, well-known locations?
3884
3885
3886# Check that a command-line tool in the Boot JDK is correct
3887# $1 = name of variable to assign
3888# $2 = name of binary
3889
3890
3891###############################################################################
3892#
3893# We need a Boot JDK to bootstrap the build.
3894#
3895
3896
3897
3898
3899
3900# BUILD_JDK: the location of the latest JDK that can run
3901#   on the host system and supports the target class file version
3902#   generated in this JDK build.  This variable should only be
3903#   used after the launchers are built.
3904#
3905
3906# Execute the check given as argument, and verify the result.
3907# If the JDK was previously found, do nothing.
3908# $1 A command line (typically autoconf macro) to execute
3909
3910
3911# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3912# is different than the host system doing the build (e.g. cross-compilation),
3913# a special BUILD_JDK is built as part of the build process.  An external
3914# prebuilt BUILD_JDK can also be supplied.
3915
3916
3917#
3918# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3919# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3920#
3921# This code is free software; you can redistribute it and/or modify it
3922# under the terms of the GNU General Public License version 2 only, as
3923# published by the Free Software Foundation.  Oracle designates this
3924# particular file as subject to the "Classpath" exception as provided
3925# by Oracle in the LICENSE file that accompanied this code.
3926#
3927# This code is distributed in the hope that it will be useful, but WITHOUT
3928# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3929# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3930# version 2 for more details (a copy is included in the LICENSE file that
3931# accompanied this code).
3932#
3933# You should have received a copy of the GNU General Public License version
3934# 2 along with this work; if not, write to the Free Software Foundation,
3935# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3936#
3937# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3938# or visit www.oracle.com if you need additional information or have any
3939# questions.
3940#
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958################################################################################
3959#
3960# Runs icecc-create-env once and prints the error if it fails
3961#
3962# $1: arguments to icecc-create-env
3963# $2: log file
3964#
3965
3966
3967################################################################################
3968#
3969# Optionally enable distributed compilation of native code using icecc/icecream
3970#
3971
3972
3973
3974
3975
3976
3977
3978#
3979# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3980# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3981#
3982# This code is free software; you can redistribute it and/or modify it
3983# under the terms of the GNU General Public License version 2 only, as
3984# published by the Free Software Foundation.  Oracle designates this
3985# particular file as subject to the "Classpath" exception as provided
3986# by Oracle in the LICENSE file that accompanied this code.
3987#
3988# This code is distributed in the hope that it will be useful, but WITHOUT
3989# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3990# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3991# version 2 for more details (a copy is included in the LICENSE file that
3992# accompanied this code).
3993#
3994# You should have received a copy of the GNU General Public License version
3995# 2 along with this work; if not, write to the Free Software Foundation,
3996# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3997#
3998# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3999# or visit www.oracle.com if you need additional information or have any
4000# questions.
4001#
4002
4003# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4004# corresponding configure arguments instead
4005
4006
4007# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4008# that configure can use them while detecting compilers.
4009# TOOLCHAIN_TYPE is available here.
4010# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4011
4012
4013
4014
4015
4016
4017# Documentation on common flags used for solstudio in HIGHEST.
4018#
4019# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4020#          done with care, there are some assumptions below that need to
4021#          be understood about the use of pointers, and IEEE behavior.
4022#
4023# -fns: Use non-standard floating point mode (not IEEE 754)
4024# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4025# -fsingle: Use single precision floating point with 'float'
4026# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4027#   (Source with excessing pointer casting and data access with mixed
4028#    pointer types are not recommended)
4029# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4030#   (If you expect perfect errno behavior, do not use this)
4031# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4032# -xrestrict: Pointer parameters to functions do not overlap
4033#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4034#    If you pass in multiple pointers to the same data, do not use this)
4035# -xlibmil: Inline some library routines
4036#   (If you expect perfect errno behavior, do not use this)
4037# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4038#   (If you expect perfect errno behavior, do not use this)
4039#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4040
4041    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4042    # Bug?
4043    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4044    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4045    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4046    #fi
4047
4048
4049
4050
4051
4052
4053################################################################################
4054# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4055#      conditionals against.
4056# $2 - Optional prefix for each variable defined.
4057
4058
4059# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4060#                                  IF_FALSE: [RUN-IF-FALSE])
4061# ------------------------------------------------------------
4062# Check that the C compiler supports an argument
4063
4064
4065
4066
4067# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4068#                                    IF_FALSE: [RUN-IF-FALSE])
4069# ------------------------------------------------------------
4070# Check that the C++ compiler supports an argument
4071
4072
4073
4074
4075# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4076#                                IF_FALSE: [RUN-IF-FALSE])
4077# ------------------------------------------------------------
4078# Check that the C and C++ compilers support an argument
4079
4080
4081
4082
4083# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4084#                                   IF_FALSE: [RUN-IF-FALSE])
4085# ------------------------------------------------------------
4086# Check that the linker support an argument
4087
4088
4089
4090
4091
4092
4093
4094
4095#
4096# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4097# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4098#
4099# This code is free software; you can redistribute it and/or modify it
4100# under the terms of the GNU General Public License version 2 only, as
4101# published by the Free Software Foundation.  Oracle designates this
4102# particular file as subject to the "Classpath" exception as provided
4103# by Oracle in the LICENSE file that accompanied this code.
4104#
4105# This code is distributed in the hope that it will be useful, but WITHOUT
4106# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4107# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4108# version 2 for more details (a copy is included in the LICENSE file that
4109# accompanied this code).
4110#
4111# You should have received a copy of the GNU General Public License version
4112# 2 along with this work; if not, write to the Free Software Foundation,
4113# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4114#
4115# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4116# or visit www.oracle.com if you need additional information or have any
4117# questions.
4118#
4119
4120
4121
4122
4123
4124cygwin_help() {
4125  case $1 in
4126    unzip)
4127      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4128      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4129      ;;
4130    zip)
4131      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4132      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4133      ;;
4134    make)
4135      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4136      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4137      ;;
4138    freetype)
4139      HELP_MSG="
4140The freetype library can now be build during the configure process.
4141Download the freetype sources and unpack them into an arbitrary directory:
4142
4143wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4144tar -xzf freetype-2.5.3.tar.gz
4145
4146Then run configure with '--with-freetype-src=<freetype_src>'. This will
4147automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4148builds or into '<freetype_src>/lib32' for 32-bit builds.
4149Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4150and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4151
4152Alternatively you can unpack the sources like this to use the default directory:
4153
4154tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4155      ;;
4156  esac
4157}
4158
4159msys_help() {
4160  PKGHANDLER_COMMAND=""
4161}
4162
4163apt_help() {
4164  case $1 in
4165    reduced)
4166      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4167    devkit)
4168      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4169    openjdk)
4170      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4171    alsa)
4172      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4173    cups)
4174      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4175    freetype)
4176      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4177    ffi)
4178      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4179    x11)
4180      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4181    ccache)
4182      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4183    dtrace)
4184      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4185  esac
4186}
4187
4188yum_help() {
4189  case $1 in
4190    devkit)
4191      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4192    openjdk)
4193      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4194    alsa)
4195      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4196    cups)
4197      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4198    freetype)
4199      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4200    x11)
4201      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4202    ccache)
4203      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4204  esac
4205}
4206
4207port_help() {
4208  PKGHANDLER_COMMAND=""
4209}
4210
4211pkgutil_help() {
4212  PKGHANDLER_COMMAND=""
4213}
4214
4215pkgadd_help() {
4216  PKGHANDLER_COMMAND=""
4217}
4218
4219# This function will check if we're called from the "configure" wrapper while
4220# printing --help. If so, we will print out additional information that can
4221# only be extracted within the autoconf script, and then exit. This must be
4222# called at the very beginning in configure.ac.
4223
4224
4225
4226
4227
4228
4229#
4230# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4231# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4232#
4233# This code is free software; you can redistribute it and/or modify it
4234# under the terms of the GNU General Public License version 2 only, as
4235# published by the Free Software Foundation.  Oracle designates this
4236# particular file as subject to the "Classpath" exception as provided
4237# by Oracle in the LICENSE file that accompanied this code.
4238#
4239# This code is distributed in the hope that it will be useful, but WITHOUT
4240# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4241# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4242# version 2 for more details (a copy is included in the LICENSE file that
4243# accompanied this code).
4244#
4245# You should have received a copy of the GNU General Public License version
4246# 2 along with this work; if not, write to the Free Software Foundation,
4247# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4248#
4249# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4250# or visit www.oracle.com if you need additional information or have any
4251# questions.
4252#
4253
4254# All valid JVM features, regardless of platform
4255VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4256    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4257
4258# All valid JVM variants
4259VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4260
4261###############################################################################
4262# Check if the specified JVM variant should be built. To be used in shell if
4263# constructs, like this:
4264# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4265#
4266# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4267
4268# Definition kept in one line to allow inlining in if statements.
4269# Additional [] needed to keep m4 from mangling shell constructs.
4270
4271
4272###############################################################################
4273# Check if the specified JVM features are explicitly enabled. To be used in
4274# shell if constructs, like this:
4275# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4276#
4277# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4278
4279# Definition kept in one line to allow inlining in if statements.
4280# Additional [] needed to keep m4 from mangling shell constructs.
4281
4282
4283###############################################################################
4284# Check which variants of the JVM that we want to build. Available variants are:
4285#   server: normal interpreter, and a tiered C1/C2 compiler
4286#   client: normal interpreter, and C1 (no C2 compiler)
4287#   minimal: reduced form of client with optional features stripped out
4288#   core: normal interpreter only, no compiler
4289#   zero: C++ based interpreter only, no compiler
4290#   zeroshark: C++ based interpreter, and a llvm-based compiler
4291#   custom: baseline JVM with no default features
4292#
4293
4294
4295###############################################################################
4296# Check if dtrace should be enabled and has all prerequisites present.
4297#
4298
4299
4300###############################################################################
4301# Set up all JVM features for each JVM variant.
4302#
4303
4304
4305###############################################################################
4306# Validate JVM features once all setup is complete, including custom setup.
4307#
4308
4309
4310################################################################################
4311# Check if gtest should be built
4312#
4313
4314
4315#
4316# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4317# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4318#
4319# This code is free software; you can redistribute it and/or modify it
4320# under the terms of the GNU General Public License version 2 only, as
4321# published by the Free Software Foundation.  Oracle designates this
4322# particular file as subject to the "Classpath" exception as provided
4323# by Oracle in the LICENSE file that accompanied this code.
4324#
4325# This code is distributed in the hope that it will be useful, but WITHOUT
4326# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4327# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4328# version 2 for more details (a copy is included in the LICENSE file that
4329# accompanied this code).
4330#
4331# You should have received a copy of the GNU General Public License version
4332# 2 along with this work; if not, write to the Free Software Foundation,
4333# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4334#
4335# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4336# or visit www.oracle.com if you need additional information or have any
4337# questions.
4338#
4339
4340###############################################################################
4341# Check which variant of the JDK that we want to build.
4342# Currently we have:
4343#    normal:   standard edition
4344# but the custom make system may add other variants
4345#
4346# Effectively the JDK variant gives a name to a specific set of
4347# modules to compile into the JDK.
4348
4349
4350###############################################################################
4351# Set the debug level
4352#    release: no debug information, all optimizations, no asserts.
4353#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4354#    fastdebug: debug information (-g), all optimizations, all asserts
4355#    slowdebug: debug information (-g), no optimizations, all asserts
4356
4357
4358###############################################################################
4359#
4360# Should we build only OpenJDK even if closed sources are present?
4361#
4362
4363
4364
4365
4366###############################################################################
4367#
4368# Enable or disable the elliptic curve crypto implementation
4369#
4370
4371
4372
4373
4374################################################################################
4375#
4376# Gcov coverage data for hotspot
4377#
4378
4379
4380################################################################################
4381#
4382# Static build support.  When enabled will generate static
4383# libraries instead of shared libraries for all JDK libs.
4384#
4385
4386
4387################################################################################
4388#
4389# jlink options.
4390# We always keep packaged modules in JDK image.
4391#
4392
4393
4394################################################################################
4395#
4396# Check if building of the jtreg failure handler should be enabled.
4397#
4398
4399
4400################################################################################
4401#
4402# Enable or disable generation of the classlist at build time
4403#
4404
4405
4406#
4407# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4408# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4409#
4410# This code is free software; you can redistribute it and/or modify it
4411# under the terms of the GNU General Public License version 2 only, as
4412# published by the Free Software Foundation.  Oracle designates this
4413# particular file as subject to the "Classpath" exception as provided
4414# by Oracle in the LICENSE file that accompanied this code.
4415#
4416# This code is distributed in the hope that it will be useful, but WITHOUT
4417# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4418# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4419# version 2 for more details (a copy is included in the LICENSE file that
4420# accompanied this code).
4421#
4422# You should have received a copy of the GNU General Public License version
4423# 2 along with this work; if not, write to the Free Software Foundation,
4424# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4425#
4426# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4427# or visit www.oracle.com if you need additional information or have any
4428# questions.
4429#
4430
4431###############################################################################
4432#
4433# Setup version numbers
4434#
4435
4436# Verify that a given string represents a valid version number, and assign it
4437# to a variable.
4438
4439# Argument 1: the variable to assign to
4440# Argument 2: the value given by the user
4441
4442
4443
4444
4445#
4446# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4447# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4448#
4449# This code is free software; you can redistribute it and/or modify it
4450# under the terms of the GNU General Public License version 2 only, as
4451# published by the Free Software Foundation.  Oracle designates this
4452# particular file as subject to the "Classpath" exception as provided
4453# by Oracle in the LICENSE file that accompanied this code.
4454#
4455# This code is distributed in the hope that it will be useful, but WITHOUT
4456# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4457# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4458# version 2 for more details (a copy is included in the LICENSE file that
4459# accompanied this code).
4460#
4461# You should have received a copy of the GNU General Public License version
4462# 2 along with this work; if not, write to the Free Software Foundation,
4463# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4464#
4465# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4466# or visit www.oracle.com if you need additional information or have any
4467# questions.
4468#
4469
4470# Major library component reside in separate files.
4471#
4472# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4473# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4474#
4475# This code is free software; you can redistribute it and/or modify it
4476# under the terms of the GNU General Public License version 2 only, as
4477# published by the Free Software Foundation.  Oracle designates this
4478# particular file as subject to the "Classpath" exception as provided
4479# by Oracle in the LICENSE file that accompanied this code.
4480#
4481# This code is distributed in the hope that it will be useful, but WITHOUT
4482# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4483# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4484# version 2 for more details (a copy is included in the LICENSE file that
4485# accompanied this code).
4486#
4487# You should have received a copy of the GNU General Public License version
4488# 2 along with this work; if not, write to the Free Software Foundation,
4489# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4490#
4491# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4492# or visit www.oracle.com if you need additional information or have any
4493# questions.
4494#
4495
4496################################################################################
4497# Setup alsa (Advanced Linux Sound Architecture)
4498################################################################################
4499
4500
4501#
4502# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4503# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4504#
4505# This code is free software; you can redistribute it and/or modify it
4506# under the terms of the GNU General Public License version 2 only, as
4507# published by the Free Software Foundation.  Oracle designates this
4508# particular file as subject to the "Classpath" exception as provided
4509# by Oracle in the LICENSE file that accompanied this code.
4510#
4511# This code is distributed in the hope that it will be useful, but WITHOUT
4512# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4513# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4514# version 2 for more details (a copy is included in the LICENSE file that
4515# accompanied this code).
4516#
4517# You should have received a copy of the GNU General Public License version
4518# 2 along with this work; if not, write to the Free Software Foundation,
4519# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4520#
4521# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4522# or visit www.oracle.com if you need additional information or have any
4523# questions.
4524#
4525
4526################################################################################
4527# Setup bundled libraries.
4528#
4529# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4530# OpenJDK repository. Default is to use these libraries as bundled, but they
4531# might be replaced by en external version by the user.
4532################################################################################
4533
4534
4535################################################################################
4536# Setup libjpeg
4537################################################################################
4538
4539
4540################################################################################
4541# Setup giflib
4542################################################################################
4543
4544
4545################################################################################
4546# Setup libpng
4547################################################################################
4548
4549
4550################################################################################
4551# Setup zlib
4552################################################################################
4553
4554
4555################################################################################
4556# Setup lcms (Little CMS)
4557################################################################################
4558
4559
4560#
4561# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4562# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4563#
4564# This code is free software; you can redistribute it and/or modify it
4565# under the terms of the GNU General Public License version 2 only, as
4566# published by the Free Software Foundation.  Oracle designates this
4567# particular file as subject to the "Classpath" exception as provided
4568# by Oracle in the LICENSE file that accompanied this code.
4569#
4570# This code is distributed in the hope that it will be useful, but WITHOUT
4571# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4572# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4573# version 2 for more details (a copy is included in the LICENSE file that
4574# accompanied this code).
4575#
4576# You should have received a copy of the GNU General Public License version
4577# 2 along with this work; if not, write to the Free Software Foundation,
4578# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4579#
4580# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4581# or visit www.oracle.com if you need additional information or have any
4582# questions.
4583#
4584
4585################################################################################
4586# Setup cups (Common Unix Printing System)
4587################################################################################
4588
4589
4590#
4591# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4592# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4593#
4594# This code is free software; you can redistribute it and/or modify it
4595# under the terms of the GNU General Public License version 2 only, as
4596# published by the Free Software Foundation.  Oracle designates this
4597# particular file as subject to the "Classpath" exception as provided
4598# by Oracle in the LICENSE file that accompanied this code.
4599#
4600# This code is distributed in the hope that it will be useful, but WITHOUT
4601# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4602# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4603# version 2 for more details (a copy is included in the LICENSE file that
4604# accompanied this code).
4605#
4606# You should have received a copy of the GNU General Public License version
4607# 2 along with this work; if not, write to the Free Software Foundation,
4608# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4609#
4610# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4611# or visit www.oracle.com if you need additional information or have any
4612# questions.
4613#
4614
4615################################################################################
4616# Setup libffi (Foreign Function Interface)
4617################################################################################
4618
4619
4620#
4621# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4622# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4623#
4624# This code is free software; you can redistribute it and/or modify it
4625# under the terms of the GNU General Public License version 2 only, as
4626# published by the Free Software Foundation.  Oracle designates this
4627# particular file as subject to the "Classpath" exception as provided
4628# by Oracle in the LICENSE file that accompanied this code.
4629#
4630# This code is distributed in the hope that it will be useful, but WITHOUT
4631# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4632# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4633# version 2 for more details (a copy is included in the LICENSE file that
4634# accompanied this code).
4635#
4636# You should have received a copy of the GNU General Public License version
4637# 2 along with this work; if not, write to the Free Software Foundation,
4638# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4639#
4640# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4641# or visit www.oracle.com if you need additional information or have any
4642# questions.
4643#
4644
4645################################################################################
4646# Build the freetype lib from source
4647################################################################################
4648
4649
4650################################################################################
4651# Check if a potential freeype library match is correct and usable
4652################################################################################
4653
4654
4655################################################################################
4656# Setup freetype (The FreeType2 font rendering library)
4657################################################################################
4658
4659
4660#
4661# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4662# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4663#
4664# This code is free software; you can redistribute it and/or modify it
4665# under the terms of the GNU General Public License version 2 only, as
4666# published by the Free Software Foundation.  Oracle designates this
4667# particular file as subject to the "Classpath" exception as provided
4668# by Oracle in the LICENSE file that accompanied this code.
4669#
4670# This code is distributed in the hope that it will be useful, but WITHOUT
4671# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4672# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4673# version 2 for more details (a copy is included in the LICENSE file that
4674# accompanied this code).
4675#
4676# You should have received a copy of the GNU General Public License version
4677# 2 along with this work; if not, write to the Free Software Foundation,
4678# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4679#
4680# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4681# or visit www.oracle.com if you need additional information or have any
4682# questions.
4683#
4684
4685################################################################################
4686# Setup the standard C/C++ runtime libraries.
4687#
4688# Most importantly, determine if stdc++ should be linked statically or
4689# dynamically.
4690################################################################################
4691
4692
4693#
4694# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4695# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4696#
4697# This code is free software; you can redistribute it and/or modify it
4698# under the terms of the GNU General Public License version 2 only, as
4699# published by the Free Software Foundation.  Oracle designates this
4700# particular file as subject to the "Classpath" exception as provided
4701# by Oracle in the LICENSE file that accompanied this code.
4702#
4703# This code is distributed in the hope that it will be useful, but WITHOUT
4704# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4705# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4706# version 2 for more details (a copy is included in the LICENSE file that
4707# accompanied this code).
4708#
4709# You should have received a copy of the GNU General Public License version
4710# 2 along with this work; if not, write to the Free Software Foundation,
4711# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4712#
4713# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4714# or visit www.oracle.com if you need additional information or have any
4715# questions.
4716#
4717
4718################################################################################
4719# Setup X11 Windows system
4720################################################################################
4721
4722
4723
4724################################################################################
4725# Determine which libraries are needed for this configuration
4726################################################################################
4727
4728
4729################################################################################
4730# Parse library options, and setup needed libraries
4731################################################################################
4732
4733
4734################################################################################
4735# Setup llvm (Low-Level VM)
4736################################################################################
4737
4738
4739################################################################################
4740# Setup various libraries, typically small system libraries
4741################################################################################
4742
4743
4744################################################################################
4745# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4746# redistribute it in the test image.
4747################################################################################
4748
4749
4750
4751#
4752# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4753# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4754#
4755# This code is free software; you can redistribute it and/or modify it
4756# under the terms of the GNU General Public License version 2 only, as
4757# published by the Free Software Foundation.  Oracle designates this
4758# particular file as subject to the "Classpath" exception as provided
4759# by Oracle in the LICENSE file that accompanied this code.
4760#
4761# This code is distributed in the hope that it will be useful, but WITHOUT
4762# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4763# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4764# version 2 for more details (a copy is included in the LICENSE file that
4765# accompanied this code).
4766#
4767# You should have received a copy of the GNU General Public License version
4768# 2 along with this work; if not, write to the Free Software Foundation,
4769# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4770#
4771# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4772# or visit www.oracle.com if you need additional information or have any
4773# questions.
4774#
4775
4776# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4777# Converts autoconf style CPU name to OpenJDK style, into
4778# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4779
4780
4781# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4782# Converts autoconf style OS name to OpenJDK style, into
4783# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4784
4785
4786# Expects $host_os $host_cpu $build_os and $build_cpu
4787# and $with_target_bits to have been setup!
4788#
4789# Translate the standard triplet(quadruplet) definition
4790# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4791# OPENJDK_BUILD_OS, etc.
4792
4793
4794# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4795# accordingly. Must be done after setting up build and target system, but before
4796# doing anything else with these values.
4797
4798
4799# Setup the legacy variables, for controlling the old makefiles.
4800#
4801
4802
4803# $1 - Either TARGET or BUILD to setup the variables for.
4804
4805
4806
4807
4808#%%% Build and target systems %%%
4809
4810
4811
4812
4813# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4814# Add -mX to various FLAGS variables.
4815
4816
4817
4818
4819
4820
4821#
4822# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4823# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4824#
4825# This code is free software; you can redistribute it and/or modify it
4826# under the terms of the GNU General Public License version 2 only, as
4827# published by the Free Software Foundation.  Oracle designates this
4828# particular file as subject to the "Classpath" exception as provided
4829# by Oracle in the LICENSE file that accompanied this code.
4830#
4831# This code is distributed in the hope that it will be useful, but WITHOUT
4832# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4833# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4834# version 2 for more details (a copy is included in the LICENSE file that
4835# accompanied this code).
4836#
4837# You should have received a copy of the GNU General Public License version
4838# 2 along with this work; if not, write to the Free Software Foundation,
4839# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4840#
4841# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4842# or visit www.oracle.com if you need additional information or have any
4843# questions.
4844#
4845
4846
4847
4848
4849
4850
4851
4852################################################################################
4853# Define a mechanism for importing extra prebuilt modules
4854#
4855
4856
4857
4858#
4859# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4860# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4861#
4862# This code is free software; you can redistribute it and/or modify it
4863# under the terms of the GNU General Public License version 2 only, as
4864# published by the Free Software Foundation.  Oracle designates this
4865# particular file as subject to the "Classpath" exception as provided
4866# by Oracle in the LICENSE file that accompanied this code.
4867#
4868# This code is distributed in the hope that it will be useful, but WITHOUT
4869# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4870# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4871# version 2 for more details (a copy is included in the LICENSE file that
4872# accompanied this code).
4873#
4874# You should have received a copy of the GNU General Public License version
4875# 2 along with this work; if not, write to the Free Software Foundation,
4876# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4877#
4878# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4879# or visit www.oracle.com if you need additional information or have any
4880# questions.
4881#
4882
4883########################################################################
4884# This file is responsible for detecting, verifying and setting up the
4885# toolchain, i.e. the compiler, linker and related utilities. It will setup
4886# proper paths to the binaries, but it will not setup any flags.
4887#
4888# The binaries used is determined by the toolchain type, which is the family of
4889# compilers and related tools that are used.
4890########################################################################
4891
4892
4893# All valid toolchains, regardless of platform (used by help.m4)
4894VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4895
4896# These toolchains are valid on different platforms
4897VALID_TOOLCHAINS_linux="gcc clang"
4898VALID_TOOLCHAINS_solaris="solstudio"
4899VALID_TOOLCHAINS_macosx="gcc clang"
4900VALID_TOOLCHAINS_aix="xlc"
4901VALID_TOOLCHAINS_windows="microsoft"
4902
4903# Toolchain descriptions
4904TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4905TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4906TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4907TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4908TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4909
4910# Minimum supported versions, empty means unspecified
4911TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4912TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4913TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4914TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4915TOOLCHAIN_MINIMUM_VERSION_xlc=""
4916
4917# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4918# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4919# $1 - optional variable prefix for compiler and version variables (BUILD_)
4920# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4921
4922
4923# Check if the configured compiler (C and C++) is of a specific version or
4924# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4925#
4926# Arguments:
4927#   VERSION:   The version string to check against the found version
4928#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4929#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4930#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4931
4932
4933
4934
4935# Setup a number of variables describing how native output files are
4936# named on this platform/toolchain.
4937
4938
4939# Determine which toolchain type to use, and make sure it is valid for this
4940# platform. Setup various information about the selected toolchain.
4941
4942
4943# Before we start detecting the toolchain executables, we might need some
4944# special setup, e.g. additional paths etc.
4945
4946
4947# Restore path, etc
4948
4949
4950# Check if a compiler is of the toolchain type we expect, and save the version
4951# information from it. If the compiler does not match the expected type,
4952# this function will abort using AC_MSG_ERROR. If it matches, the version will
4953# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4954# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4955#
4956# $1 = compiler to test (CC or CXX)
4957# $2 = human readable name of compiler (C or C++)
4958
4959
4960# Try to locate the given C or C++ compiler in the path, or otherwise.
4961#
4962# $1 = compiler to test (CC or CXX)
4963# $2 = human readable name of compiler (C or C++)
4964# $3 = list of compiler names to search for
4965
4966
4967# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4968# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4969# archiver (AR). Verify that the compilers are correct according to the
4970# toolchain type.
4971
4972
4973# Setup additional tools that is considered a part of the toolchain, but not the
4974# core part. Many of these are highly platform-specific and do not exist,
4975# and/or are not needed on all platforms.
4976
4977
4978# Setup the build tools (i.e, the compiler and linker used to build programs
4979# that should be run on the build platform, not the target platform, as a build
4980# helper). Since the non-cross-compile case uses the normal, target compilers
4981# for this, we can only do this after these have been setup.
4982
4983
4984# Setup legacy variables that are still needed as alternative ways to refer to
4985# parts of the toolchain.
4986
4987
4988# Do some additional checks on the detected tools.
4989
4990
4991# Setup the JTReg Regression Test Harness.
4992
4993
4994#
4995# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4996# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4997#
4998# This code is free software; you can redistribute it and/or modify it
4999# under the terms of the GNU General Public License version 2 only, as
5000# published by the Free Software Foundation.  Oracle designates this
5001# particular file as subject to the "Classpath" exception as provided
5002# by Oracle in the LICENSE file that accompanied this code.
5003#
5004# This code is distributed in the hope that it will be useful, but WITHOUT
5005# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5006# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5007# version 2 for more details (a copy is included in the LICENSE file that
5008# accompanied this code).
5009#
5010# You should have received a copy of the GNU General Public License version
5011# 2 along with this work; if not, write to the Free Software Foundation,
5012# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5013#
5014# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5015# or visit www.oracle.com if you need additional information or have any
5016# questions.
5017#
5018
5019################################################################################
5020# The order of these defines the priority by which we try to find them.
5021VALID_VS_VERSIONS="2013 2012 2010"
5022
5023VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5024VS_VERSION_INTERNAL_2010=100
5025VS_MSVCR_2010=msvcr100.dll
5026# We don't use msvcp on Visual Studio 2010
5027#VS_MSVCP_2010=msvcp100.dll
5028VS_ENVVAR_2010="VS100COMNTOOLS"
5029VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5030VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5031VS_VS_PLATFORM_NAME_2010="v100"
5032VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5033
5034VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5035VS_VERSION_INTERNAL_2012=110
5036VS_MSVCR_2012=msvcr110.dll
5037VS_MSVCP_2012=msvcp110.dll
5038VS_ENVVAR_2012="VS110COMNTOOLS"
5039VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5040VS_SDK_INSTALLDIR_2012=
5041VS_VS_PLATFORM_NAME_2012="v110"
5042VS_SDK_PLATFORM_NAME_2012=
5043
5044VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5045VS_VERSION_INTERNAL_2013=120
5046VS_MSVCR_2013=msvcr120.dll
5047VS_MSVCP_2013=msvcp120.dll
5048VS_ENVVAR_2013="VS120COMNTOOLS"
5049VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5050VS_SDK_INSTALLDIR_2013=
5051VS_VS_PLATFORM_NAME_2013="v120"
5052VS_SDK_PLATFORM_NAME_2013=
5053
5054################################################################################
5055
5056
5057
5058################################################################################
5059
5060
5061
5062################################################################################
5063# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5064# build environment and assigns it to VS_ENV_CMD
5065
5066
5067################################################################################
5068
5069
5070
5071################################################################################
5072# Check if the VS env variables were setup prior to running configure.
5073# If not, then find vcvarsall.bat and run it automatically, and integrate
5074# the set env variables into the spec file.
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089# This line needs to be here, verbatim, after all includes and the dummy hook
5090# definitions. It is replaced with custom functionality when building
5091# custom sources.
5092#CUSTOM_AUTOCONF_INCLUDE
5093
5094# Do not change or remove the following line, it is needed for consistency checks:
5095DATE_WHEN_GENERATED=1465316678
5096
5097###############################################################################
5098#
5099# Initialization / Boot-strapping
5100#
5101# The bootstrapping process needs to solve the "chicken or the egg" problem,
5102# thus it jumps back and forth, each time gaining something needed later on.
5103#
5104###############################################################################
5105
5106# If we are requested to print additional help, do that and then exit.
5107# This must be the very first call.
5108
5109  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5110
5111    # Print available toolchains
5112    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5113    $PRINTF "Which are valid to use depends on the build platform.\n"
5114    for toolchain in $VALID_TOOLCHAINS_all; do
5115      # Use indirect variable referencing
5116      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5117      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5118      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5119    done
5120    $PRINTF "\n"
5121
5122    # Print available jvm features
5123    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5124    $PRINTF "Which are valid to use depends on the target platform.\n  "
5125    $PRINTF "%s " $VALID_JVM_FEATURES
5126    $PRINTF "\n"
5127
5128    # And now exit directly
5129    exit 0
5130  fi
5131
5132
5133# Basic initialization that must happen first of all in the normal process.
5134
5135  # Save the original command line. This is passed to us by the wrapper configure script.
5136
5137  # Save the path variable before it gets changed
5138  ORIGINAL_PATH="$PATH"
5139
5140  DATE_WHEN_CONFIGURED=`LANG=C date`
5141
5142  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5143$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5144  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5145$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5146
5147
5148  # Start with tools that do not need have cross compilation support
5149  # and can be expected to be found in the default PATH. These tools are
5150  # used by configure.
5151
5152  # First are all the simple required tools.
5153
5154
5155
5156  # Publish this variable in the help.
5157
5158
5159  if [ -z "${BASENAME+x}" ]; then
5160    # The variable is not set by user, try to locate tool using the code snippet
5161    for ac_prog in basename
5162do
5163  # Extract the first word of "$ac_prog", so it can be a program name with args.
5164set dummy $ac_prog; ac_word=$2
5165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5166$as_echo_n "checking for $ac_word... " >&6; }
5167if ${ac_cv_path_BASENAME+:} false; then :
5168  $as_echo_n "(cached) " >&6
5169else
5170  case $BASENAME in
5171  [\\/]* | ?:[\\/]*)
5172  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5173  ;;
5174  *)
5175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5176for as_dir in $PATH
5177do
5178  IFS=$as_save_IFS
5179  test -z "$as_dir" && as_dir=.
5180    for ac_exec_ext in '' $ac_executable_extensions; do
5181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5182    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5184    break 2
5185  fi
5186done
5187  done
5188IFS=$as_save_IFS
5189
5190  ;;
5191esac
5192fi
5193BASENAME=$ac_cv_path_BASENAME
5194if test -n "$BASENAME"; then
5195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5196$as_echo "$BASENAME" >&6; }
5197else
5198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5199$as_echo "no" >&6; }
5200fi
5201
5202
5203  test -n "$BASENAME" && break
5204done
5205
5206  else
5207    # The variable is set, but is it from the command line or the environment?
5208
5209    # Try to remove the string !BASENAME! from our list.
5210    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5211    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5212      # If it failed, the variable was not from the command line. Ignore it,
5213      # but warn the user (except for BASH, which is always set by the calling BASH).
5214      if test "xBASENAME" != xBASH; then
5215        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5216$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5217      fi
5218      # Try to locate tool using the code snippet
5219      for ac_prog in basename
5220do
5221  # Extract the first word of "$ac_prog", so it can be a program name with args.
5222set dummy $ac_prog; ac_word=$2
5223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5224$as_echo_n "checking for $ac_word... " >&6; }
5225if ${ac_cv_path_BASENAME+:} false; then :
5226  $as_echo_n "(cached) " >&6
5227else
5228  case $BASENAME in
5229  [\\/]* | ?:[\\/]*)
5230  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5231  ;;
5232  *)
5233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5234for as_dir in $PATH
5235do
5236  IFS=$as_save_IFS
5237  test -z "$as_dir" && as_dir=.
5238    for ac_exec_ext in '' $ac_executable_extensions; do
5239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5240    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5242    break 2
5243  fi
5244done
5245  done
5246IFS=$as_save_IFS
5247
5248  ;;
5249esac
5250fi
5251BASENAME=$ac_cv_path_BASENAME
5252if test -n "$BASENAME"; then
5253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5254$as_echo "$BASENAME" >&6; }
5255else
5256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5257$as_echo "no" >&6; }
5258fi
5259
5260
5261  test -n "$BASENAME" && break
5262done
5263
5264    else
5265      # If it succeeded, then it was overridden by the user. We will use it
5266      # for the tool.
5267
5268      # First remove it from the list of overridden variables, so we can test
5269      # for unknown variables in the end.
5270      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5271
5272      # Check if we try to supply an empty value
5273      if test "x$BASENAME" = x; then
5274        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5275$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5276        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5277$as_echo_n "checking for BASENAME... " >&6; }
5278        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5279$as_echo "disabled" >&6; }
5280      else
5281        # Check if the provided tool contains a complete path.
5282        tool_specified="$BASENAME"
5283        tool_basename="${tool_specified##*/}"
5284        if test "x$tool_basename" = "x$tool_specified"; then
5285          # A command without a complete path is provided, search $PATH.
5286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5287$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5288          # Extract the first word of "$tool_basename", so it can be a program name with args.
5289set dummy $tool_basename; ac_word=$2
5290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5291$as_echo_n "checking for $ac_word... " >&6; }
5292if ${ac_cv_path_BASENAME+:} false; then :
5293  $as_echo_n "(cached) " >&6
5294else
5295  case $BASENAME in
5296  [\\/]* | ?:[\\/]*)
5297  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5298  ;;
5299  *)
5300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5301for as_dir in $PATH
5302do
5303  IFS=$as_save_IFS
5304  test -z "$as_dir" && as_dir=.
5305    for ac_exec_ext in '' $ac_executable_extensions; do
5306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5307    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5309    break 2
5310  fi
5311done
5312  done
5313IFS=$as_save_IFS
5314
5315  ;;
5316esac
5317fi
5318BASENAME=$ac_cv_path_BASENAME
5319if test -n "$BASENAME"; then
5320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5321$as_echo "$BASENAME" >&6; }
5322else
5323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5324$as_echo "no" >&6; }
5325fi
5326
5327
5328          if test "x$BASENAME" = x; then
5329            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5330          fi
5331        else
5332          # Otherwise we believe it is a complete path. Use it as it is.
5333          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5334$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5335          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5336$as_echo_n "checking for BASENAME... " >&6; }
5337          if test ! -x "$tool_specified"; then
5338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5339$as_echo "not found" >&6; }
5340            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5341          fi
5342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5343$as_echo "$tool_specified" >&6; }
5344        fi
5345      fi
5346    fi
5347
5348  fi
5349
5350
5351
5352  if test "x$BASENAME" = x; then
5353    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5354  fi
5355
5356
5357
5358
5359
5360  # Publish this variable in the help.
5361
5362
5363  if [ -z "${BASH+x}" ]; then
5364    # The variable is not set by user, try to locate tool using the code snippet
5365    for ac_prog in bash
5366do
5367  # Extract the first word of "$ac_prog", so it can be a program name with args.
5368set dummy $ac_prog; ac_word=$2
5369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5370$as_echo_n "checking for $ac_word... " >&6; }
5371if ${ac_cv_path_BASH+:} false; then :
5372  $as_echo_n "(cached) " >&6
5373else
5374  case $BASH in
5375  [\\/]* | ?:[\\/]*)
5376  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5377  ;;
5378  *)
5379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5380for as_dir in $PATH
5381do
5382  IFS=$as_save_IFS
5383  test -z "$as_dir" && as_dir=.
5384    for ac_exec_ext in '' $ac_executable_extensions; do
5385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5386    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5388    break 2
5389  fi
5390done
5391  done
5392IFS=$as_save_IFS
5393
5394  ;;
5395esac
5396fi
5397BASH=$ac_cv_path_BASH
5398if test -n "$BASH"; then
5399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5400$as_echo "$BASH" >&6; }
5401else
5402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5403$as_echo "no" >&6; }
5404fi
5405
5406
5407  test -n "$BASH" && break
5408done
5409
5410  else
5411    # The variable is set, but is it from the command line or the environment?
5412
5413    # Try to remove the string !BASH! from our list.
5414    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5415    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5416      # If it failed, the variable was not from the command line. Ignore it,
5417      # but warn the user (except for BASH, which is always set by the calling BASH).
5418      if test "xBASH" != xBASH; then
5419        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5420$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5421      fi
5422      # Try to locate tool using the code snippet
5423      for ac_prog in bash
5424do
5425  # Extract the first word of "$ac_prog", so it can be a program name with args.
5426set dummy $ac_prog; ac_word=$2
5427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5428$as_echo_n "checking for $ac_word... " >&6; }
5429if ${ac_cv_path_BASH+:} false; then :
5430  $as_echo_n "(cached) " >&6
5431else
5432  case $BASH in
5433  [\\/]* | ?:[\\/]*)
5434  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5435  ;;
5436  *)
5437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5438for as_dir in $PATH
5439do
5440  IFS=$as_save_IFS
5441  test -z "$as_dir" && as_dir=.
5442    for ac_exec_ext in '' $ac_executable_extensions; do
5443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5444    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5446    break 2
5447  fi
5448done
5449  done
5450IFS=$as_save_IFS
5451
5452  ;;
5453esac
5454fi
5455BASH=$ac_cv_path_BASH
5456if test -n "$BASH"; then
5457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5458$as_echo "$BASH" >&6; }
5459else
5460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5461$as_echo "no" >&6; }
5462fi
5463
5464
5465  test -n "$BASH" && break
5466done
5467
5468    else
5469      # If it succeeded, then it was overridden by the user. We will use it
5470      # for the tool.
5471
5472      # First remove it from the list of overridden variables, so we can test
5473      # for unknown variables in the end.
5474      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5475
5476      # Check if we try to supply an empty value
5477      if test "x$BASH" = x; then
5478        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5479$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5480        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5481$as_echo_n "checking for BASH... " >&6; }
5482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5483$as_echo "disabled" >&6; }
5484      else
5485        # Check if the provided tool contains a complete path.
5486        tool_specified="$BASH"
5487        tool_basename="${tool_specified##*/}"
5488        if test "x$tool_basename" = "x$tool_specified"; then
5489          # A command without a complete path is provided, search $PATH.
5490          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5491$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5492          # Extract the first word of "$tool_basename", so it can be a program name with args.
5493set dummy $tool_basename; ac_word=$2
5494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5495$as_echo_n "checking for $ac_word... " >&6; }
5496if ${ac_cv_path_BASH+:} false; then :
5497  $as_echo_n "(cached) " >&6
5498else
5499  case $BASH in
5500  [\\/]* | ?:[\\/]*)
5501  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5502  ;;
5503  *)
5504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5505for as_dir in $PATH
5506do
5507  IFS=$as_save_IFS
5508  test -z "$as_dir" && as_dir=.
5509    for ac_exec_ext in '' $ac_executable_extensions; do
5510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5511    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5513    break 2
5514  fi
5515done
5516  done
5517IFS=$as_save_IFS
5518
5519  ;;
5520esac
5521fi
5522BASH=$ac_cv_path_BASH
5523if test -n "$BASH"; then
5524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5525$as_echo "$BASH" >&6; }
5526else
5527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5528$as_echo "no" >&6; }
5529fi
5530
5531
5532          if test "x$BASH" = x; then
5533            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5534          fi
5535        else
5536          # Otherwise we believe it is a complete path. Use it as it is.
5537          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5538$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5539          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5540$as_echo_n "checking for BASH... " >&6; }
5541          if test ! -x "$tool_specified"; then
5542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5543$as_echo "not found" >&6; }
5544            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5545          fi
5546          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5547$as_echo "$tool_specified" >&6; }
5548        fi
5549      fi
5550    fi
5551
5552  fi
5553
5554
5555
5556  if test "x$BASH" = x; then
5557    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5558  fi
5559
5560
5561
5562
5563
5564  # Publish this variable in the help.
5565
5566
5567  if [ -z "${CAT+x}" ]; then
5568    # The variable is not set by user, try to locate tool using the code snippet
5569    for ac_prog in cat
5570do
5571  # Extract the first word of "$ac_prog", so it can be a program name with args.
5572set dummy $ac_prog; ac_word=$2
5573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5574$as_echo_n "checking for $ac_word... " >&6; }
5575if ${ac_cv_path_CAT+:} false; then :
5576  $as_echo_n "(cached) " >&6
5577else
5578  case $CAT in
5579  [\\/]* | ?:[\\/]*)
5580  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5581  ;;
5582  *)
5583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5584for as_dir in $PATH
5585do
5586  IFS=$as_save_IFS
5587  test -z "$as_dir" && as_dir=.
5588    for ac_exec_ext in '' $ac_executable_extensions; do
5589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5590    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5592    break 2
5593  fi
5594done
5595  done
5596IFS=$as_save_IFS
5597
5598  ;;
5599esac
5600fi
5601CAT=$ac_cv_path_CAT
5602if test -n "$CAT"; then
5603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5604$as_echo "$CAT" >&6; }
5605else
5606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5607$as_echo "no" >&6; }
5608fi
5609
5610
5611  test -n "$CAT" && break
5612done
5613
5614  else
5615    # The variable is set, but is it from the command line or the environment?
5616
5617    # Try to remove the string !CAT! from our list.
5618    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5619    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5620      # If it failed, the variable was not from the command line. Ignore it,
5621      # but warn the user (except for BASH, which is always set by the calling BASH).
5622      if test "xCAT" != xBASH; then
5623        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5624$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5625      fi
5626      # Try to locate tool using the code snippet
5627      for ac_prog in cat
5628do
5629  # Extract the first word of "$ac_prog", so it can be a program name with args.
5630set dummy $ac_prog; ac_word=$2
5631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5632$as_echo_n "checking for $ac_word... " >&6; }
5633if ${ac_cv_path_CAT+:} false; then :
5634  $as_echo_n "(cached) " >&6
5635else
5636  case $CAT in
5637  [\\/]* | ?:[\\/]*)
5638  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5639  ;;
5640  *)
5641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5642for as_dir in $PATH
5643do
5644  IFS=$as_save_IFS
5645  test -z "$as_dir" && as_dir=.
5646    for ac_exec_ext in '' $ac_executable_extensions; do
5647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5648    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5650    break 2
5651  fi
5652done
5653  done
5654IFS=$as_save_IFS
5655
5656  ;;
5657esac
5658fi
5659CAT=$ac_cv_path_CAT
5660if test -n "$CAT"; then
5661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5662$as_echo "$CAT" >&6; }
5663else
5664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5665$as_echo "no" >&6; }
5666fi
5667
5668
5669  test -n "$CAT" && break
5670done
5671
5672    else
5673      # If it succeeded, then it was overridden by the user. We will use it
5674      # for the tool.
5675
5676      # First remove it from the list of overridden variables, so we can test
5677      # for unknown variables in the end.
5678      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5679
5680      # Check if we try to supply an empty value
5681      if test "x$CAT" = x; then
5682        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5683$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5685$as_echo_n "checking for CAT... " >&6; }
5686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5687$as_echo "disabled" >&6; }
5688      else
5689        # Check if the provided tool contains a complete path.
5690        tool_specified="$CAT"
5691        tool_basename="${tool_specified##*/}"
5692        if test "x$tool_basename" = "x$tool_specified"; then
5693          # A command without a complete path is provided, search $PATH.
5694          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5695$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5696          # Extract the first word of "$tool_basename", so it can be a program name with args.
5697set dummy $tool_basename; ac_word=$2
5698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5699$as_echo_n "checking for $ac_word... " >&6; }
5700if ${ac_cv_path_CAT+:} false; then :
5701  $as_echo_n "(cached) " >&6
5702else
5703  case $CAT in
5704  [\\/]* | ?:[\\/]*)
5705  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5706  ;;
5707  *)
5708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5709for as_dir in $PATH
5710do
5711  IFS=$as_save_IFS
5712  test -z "$as_dir" && as_dir=.
5713    for ac_exec_ext in '' $ac_executable_extensions; do
5714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5715    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5717    break 2
5718  fi
5719done
5720  done
5721IFS=$as_save_IFS
5722
5723  ;;
5724esac
5725fi
5726CAT=$ac_cv_path_CAT
5727if test -n "$CAT"; then
5728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5729$as_echo "$CAT" >&6; }
5730else
5731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5732$as_echo "no" >&6; }
5733fi
5734
5735
5736          if test "x$CAT" = x; then
5737            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5738          fi
5739        else
5740          # Otherwise we believe it is a complete path. Use it as it is.
5741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5742$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5743          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5744$as_echo_n "checking for CAT... " >&6; }
5745          if test ! -x "$tool_specified"; then
5746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5747$as_echo "not found" >&6; }
5748            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5749          fi
5750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5751$as_echo "$tool_specified" >&6; }
5752        fi
5753      fi
5754    fi
5755
5756  fi
5757
5758
5759
5760  if test "x$CAT" = x; then
5761    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5762  fi
5763
5764
5765
5766
5767
5768  # Publish this variable in the help.
5769
5770
5771  if [ -z "${CHMOD+x}" ]; then
5772    # The variable is not set by user, try to locate tool using the code snippet
5773    for ac_prog in chmod
5774do
5775  # Extract the first word of "$ac_prog", so it can be a program name with args.
5776set dummy $ac_prog; ac_word=$2
5777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5778$as_echo_n "checking for $ac_word... " >&6; }
5779if ${ac_cv_path_CHMOD+:} false; then :
5780  $as_echo_n "(cached) " >&6
5781else
5782  case $CHMOD in
5783  [\\/]* | ?:[\\/]*)
5784  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5785  ;;
5786  *)
5787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5788for as_dir in $PATH
5789do
5790  IFS=$as_save_IFS
5791  test -z "$as_dir" && as_dir=.
5792    for ac_exec_ext in '' $ac_executable_extensions; do
5793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5794    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5796    break 2
5797  fi
5798done
5799  done
5800IFS=$as_save_IFS
5801
5802  ;;
5803esac
5804fi
5805CHMOD=$ac_cv_path_CHMOD
5806if test -n "$CHMOD"; then
5807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5808$as_echo "$CHMOD" >&6; }
5809else
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5811$as_echo "no" >&6; }
5812fi
5813
5814
5815  test -n "$CHMOD" && break
5816done
5817
5818  else
5819    # The variable is set, but is it from the command line or the environment?
5820
5821    # Try to remove the string !CHMOD! from our list.
5822    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5823    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5824      # If it failed, the variable was not from the command line. Ignore it,
5825      # but warn the user (except for BASH, which is always set by the calling BASH).
5826      if test "xCHMOD" != xBASH; then
5827        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5828$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5829      fi
5830      # Try to locate tool using the code snippet
5831      for ac_prog in chmod
5832do
5833  # Extract the first word of "$ac_prog", so it can be a program name with args.
5834set dummy $ac_prog; ac_word=$2
5835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5836$as_echo_n "checking for $ac_word... " >&6; }
5837if ${ac_cv_path_CHMOD+:} false; then :
5838  $as_echo_n "(cached) " >&6
5839else
5840  case $CHMOD in
5841  [\\/]* | ?:[\\/]*)
5842  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5843  ;;
5844  *)
5845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5846for as_dir in $PATH
5847do
5848  IFS=$as_save_IFS
5849  test -z "$as_dir" && as_dir=.
5850    for ac_exec_ext in '' $ac_executable_extensions; do
5851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5852    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5854    break 2
5855  fi
5856done
5857  done
5858IFS=$as_save_IFS
5859
5860  ;;
5861esac
5862fi
5863CHMOD=$ac_cv_path_CHMOD
5864if test -n "$CHMOD"; then
5865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5866$as_echo "$CHMOD" >&6; }
5867else
5868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5869$as_echo "no" >&6; }
5870fi
5871
5872
5873  test -n "$CHMOD" && break
5874done
5875
5876    else
5877      # If it succeeded, then it was overridden by the user. We will use it
5878      # for the tool.
5879
5880      # First remove it from the list of overridden variables, so we can test
5881      # for unknown variables in the end.
5882      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5883
5884      # Check if we try to supply an empty value
5885      if test "x$CHMOD" = x; then
5886        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5887$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5888        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5889$as_echo_n "checking for CHMOD... " >&6; }
5890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5891$as_echo "disabled" >&6; }
5892      else
5893        # Check if the provided tool contains a complete path.
5894        tool_specified="$CHMOD"
5895        tool_basename="${tool_specified##*/}"
5896        if test "x$tool_basename" = "x$tool_specified"; then
5897          # A command without a complete path is provided, search $PATH.
5898          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5899$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5900          # Extract the first word of "$tool_basename", so it can be a program name with args.
5901set dummy $tool_basename; ac_word=$2
5902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5903$as_echo_n "checking for $ac_word... " >&6; }
5904if ${ac_cv_path_CHMOD+:} false; then :
5905  $as_echo_n "(cached) " >&6
5906else
5907  case $CHMOD in
5908  [\\/]* | ?:[\\/]*)
5909  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5910  ;;
5911  *)
5912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5913for as_dir in $PATH
5914do
5915  IFS=$as_save_IFS
5916  test -z "$as_dir" && as_dir=.
5917    for ac_exec_ext in '' $ac_executable_extensions; do
5918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5919    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5921    break 2
5922  fi
5923done
5924  done
5925IFS=$as_save_IFS
5926
5927  ;;
5928esac
5929fi
5930CHMOD=$ac_cv_path_CHMOD
5931if test -n "$CHMOD"; then
5932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5933$as_echo "$CHMOD" >&6; }
5934else
5935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5936$as_echo "no" >&6; }
5937fi
5938
5939
5940          if test "x$CHMOD" = x; then
5941            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5942          fi
5943        else
5944          # Otherwise we believe it is a complete path. Use it as it is.
5945          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5946$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5947          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5948$as_echo_n "checking for CHMOD... " >&6; }
5949          if test ! -x "$tool_specified"; then
5950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5951$as_echo "not found" >&6; }
5952            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5953          fi
5954          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5955$as_echo "$tool_specified" >&6; }
5956        fi
5957      fi
5958    fi
5959
5960  fi
5961
5962
5963
5964  if test "x$CHMOD" = x; then
5965    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5966  fi
5967
5968
5969
5970
5971
5972  # Publish this variable in the help.
5973
5974
5975  if [ -z "${CMP+x}" ]; then
5976    # The variable is not set by user, try to locate tool using the code snippet
5977    for ac_prog in cmp
5978do
5979  # Extract the first word of "$ac_prog", so it can be a program name with args.
5980set dummy $ac_prog; ac_word=$2
5981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5982$as_echo_n "checking for $ac_word... " >&6; }
5983if ${ac_cv_path_CMP+:} false; then :
5984  $as_echo_n "(cached) " >&6
5985else
5986  case $CMP in
5987  [\\/]* | ?:[\\/]*)
5988  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5989  ;;
5990  *)
5991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5992for as_dir in $PATH
5993do
5994  IFS=$as_save_IFS
5995  test -z "$as_dir" && as_dir=.
5996    for ac_exec_ext in '' $ac_executable_extensions; do
5997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5998    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6000    break 2
6001  fi
6002done
6003  done
6004IFS=$as_save_IFS
6005
6006  ;;
6007esac
6008fi
6009CMP=$ac_cv_path_CMP
6010if test -n "$CMP"; then
6011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6012$as_echo "$CMP" >&6; }
6013else
6014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6015$as_echo "no" >&6; }
6016fi
6017
6018
6019  test -n "$CMP" && break
6020done
6021
6022  else
6023    # The variable is set, but is it from the command line or the environment?
6024
6025    # Try to remove the string !CMP! from our list.
6026    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6027    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6028      # If it failed, the variable was not from the command line. Ignore it,
6029      # but warn the user (except for BASH, which is always set by the calling BASH).
6030      if test "xCMP" != xBASH; then
6031        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6032$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6033      fi
6034      # Try to locate tool using the code snippet
6035      for ac_prog in cmp
6036do
6037  # Extract the first word of "$ac_prog", so it can be a program name with args.
6038set dummy $ac_prog; ac_word=$2
6039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6040$as_echo_n "checking for $ac_word... " >&6; }
6041if ${ac_cv_path_CMP+:} false; then :
6042  $as_echo_n "(cached) " >&6
6043else
6044  case $CMP in
6045  [\\/]* | ?:[\\/]*)
6046  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6047  ;;
6048  *)
6049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6050for as_dir in $PATH
6051do
6052  IFS=$as_save_IFS
6053  test -z "$as_dir" && as_dir=.
6054    for ac_exec_ext in '' $ac_executable_extensions; do
6055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6056    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6058    break 2
6059  fi
6060done
6061  done
6062IFS=$as_save_IFS
6063
6064  ;;
6065esac
6066fi
6067CMP=$ac_cv_path_CMP
6068if test -n "$CMP"; then
6069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6070$as_echo "$CMP" >&6; }
6071else
6072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6073$as_echo "no" >&6; }
6074fi
6075
6076
6077  test -n "$CMP" && break
6078done
6079
6080    else
6081      # If it succeeded, then it was overridden by the user. We will use it
6082      # for the tool.
6083
6084      # First remove it from the list of overridden variables, so we can test
6085      # for unknown variables in the end.
6086      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6087
6088      # Check if we try to supply an empty value
6089      if test "x$CMP" = x; then
6090        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6091$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6092        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6093$as_echo_n "checking for CMP... " >&6; }
6094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6095$as_echo "disabled" >&6; }
6096      else
6097        # Check if the provided tool contains a complete path.
6098        tool_specified="$CMP"
6099        tool_basename="${tool_specified##*/}"
6100        if test "x$tool_basename" = "x$tool_specified"; then
6101          # A command without a complete path is provided, search $PATH.
6102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6103$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6104          # Extract the first word of "$tool_basename", so it can be a program name with args.
6105set dummy $tool_basename; ac_word=$2
6106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6107$as_echo_n "checking for $ac_word... " >&6; }
6108if ${ac_cv_path_CMP+:} false; then :
6109  $as_echo_n "(cached) " >&6
6110else
6111  case $CMP in
6112  [\\/]* | ?:[\\/]*)
6113  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6114  ;;
6115  *)
6116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6117for as_dir in $PATH
6118do
6119  IFS=$as_save_IFS
6120  test -z "$as_dir" && as_dir=.
6121    for ac_exec_ext in '' $ac_executable_extensions; do
6122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6123    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6125    break 2
6126  fi
6127done
6128  done
6129IFS=$as_save_IFS
6130
6131  ;;
6132esac
6133fi
6134CMP=$ac_cv_path_CMP
6135if test -n "$CMP"; then
6136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6137$as_echo "$CMP" >&6; }
6138else
6139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6140$as_echo "no" >&6; }
6141fi
6142
6143
6144          if test "x$CMP" = x; then
6145            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6146          fi
6147        else
6148          # Otherwise we believe it is a complete path. Use it as it is.
6149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6150$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6151          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6152$as_echo_n "checking for CMP... " >&6; }
6153          if test ! -x "$tool_specified"; then
6154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6155$as_echo "not found" >&6; }
6156            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6157          fi
6158          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6159$as_echo "$tool_specified" >&6; }
6160        fi
6161      fi
6162    fi
6163
6164  fi
6165
6166
6167
6168  if test "x$CMP" = x; then
6169    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6170  fi
6171
6172
6173
6174
6175
6176  # Publish this variable in the help.
6177
6178
6179  if [ -z "${COMM+x}" ]; then
6180    # The variable is not set by user, try to locate tool using the code snippet
6181    for ac_prog in comm
6182do
6183  # Extract the first word of "$ac_prog", so it can be a program name with args.
6184set dummy $ac_prog; ac_word=$2
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6186$as_echo_n "checking for $ac_word... " >&6; }
6187if ${ac_cv_path_COMM+:} false; then :
6188  $as_echo_n "(cached) " >&6
6189else
6190  case $COMM in
6191  [\\/]* | ?:[\\/]*)
6192  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6193  ;;
6194  *)
6195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6196for as_dir in $PATH
6197do
6198  IFS=$as_save_IFS
6199  test -z "$as_dir" && as_dir=.
6200    for ac_exec_ext in '' $ac_executable_extensions; do
6201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6202    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6204    break 2
6205  fi
6206done
6207  done
6208IFS=$as_save_IFS
6209
6210  ;;
6211esac
6212fi
6213COMM=$ac_cv_path_COMM
6214if test -n "$COMM"; then
6215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6216$as_echo "$COMM" >&6; }
6217else
6218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6219$as_echo "no" >&6; }
6220fi
6221
6222
6223  test -n "$COMM" && break
6224done
6225
6226  else
6227    # The variable is set, but is it from the command line or the environment?
6228
6229    # Try to remove the string !COMM! from our list.
6230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6232      # If it failed, the variable was not from the command line. Ignore it,
6233      # but warn the user (except for BASH, which is always set by the calling BASH).
6234      if test "xCOMM" != xBASH; then
6235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6236$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6237      fi
6238      # Try to locate tool using the code snippet
6239      for ac_prog in comm
6240do
6241  # Extract the first word of "$ac_prog", so it can be a program name with args.
6242set dummy $ac_prog; ac_word=$2
6243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6244$as_echo_n "checking for $ac_word... " >&6; }
6245if ${ac_cv_path_COMM+:} false; then :
6246  $as_echo_n "(cached) " >&6
6247else
6248  case $COMM in
6249  [\\/]* | ?:[\\/]*)
6250  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6251  ;;
6252  *)
6253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6254for as_dir in $PATH
6255do
6256  IFS=$as_save_IFS
6257  test -z "$as_dir" && as_dir=.
6258    for ac_exec_ext in '' $ac_executable_extensions; do
6259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6260    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6262    break 2
6263  fi
6264done
6265  done
6266IFS=$as_save_IFS
6267
6268  ;;
6269esac
6270fi
6271COMM=$ac_cv_path_COMM
6272if test -n "$COMM"; then
6273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6274$as_echo "$COMM" >&6; }
6275else
6276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6277$as_echo "no" >&6; }
6278fi
6279
6280
6281  test -n "$COMM" && break
6282done
6283
6284    else
6285      # If it succeeded, then it was overridden by the user. We will use it
6286      # for the tool.
6287
6288      # First remove it from the list of overridden variables, so we can test
6289      # for unknown variables in the end.
6290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6291
6292      # Check if we try to supply an empty value
6293      if test "x$COMM" = x; then
6294        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6295$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6297$as_echo_n "checking for COMM... " >&6; }
6298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6299$as_echo "disabled" >&6; }
6300      else
6301        # Check if the provided tool contains a complete path.
6302        tool_specified="$COMM"
6303        tool_basename="${tool_specified##*/}"
6304        if test "x$tool_basename" = "x$tool_specified"; then
6305          # A command without a complete path is provided, search $PATH.
6306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6307$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6308          # Extract the first word of "$tool_basename", so it can be a program name with args.
6309set dummy $tool_basename; ac_word=$2
6310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6311$as_echo_n "checking for $ac_word... " >&6; }
6312if ${ac_cv_path_COMM+:} false; then :
6313  $as_echo_n "(cached) " >&6
6314else
6315  case $COMM in
6316  [\\/]* | ?:[\\/]*)
6317  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6318  ;;
6319  *)
6320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6321for as_dir in $PATH
6322do
6323  IFS=$as_save_IFS
6324  test -z "$as_dir" && as_dir=.
6325    for ac_exec_ext in '' $ac_executable_extensions; do
6326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6327    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6329    break 2
6330  fi
6331done
6332  done
6333IFS=$as_save_IFS
6334
6335  ;;
6336esac
6337fi
6338COMM=$ac_cv_path_COMM
6339if test -n "$COMM"; then
6340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6341$as_echo "$COMM" >&6; }
6342else
6343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6344$as_echo "no" >&6; }
6345fi
6346
6347
6348          if test "x$COMM" = x; then
6349            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6350          fi
6351        else
6352          # Otherwise we believe it is a complete path. Use it as it is.
6353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6354$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6355          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6356$as_echo_n "checking for COMM... " >&6; }
6357          if test ! -x "$tool_specified"; then
6358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6359$as_echo "not found" >&6; }
6360            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6361          fi
6362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6363$as_echo "$tool_specified" >&6; }
6364        fi
6365      fi
6366    fi
6367
6368  fi
6369
6370
6371
6372  if test "x$COMM" = x; then
6373    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6374  fi
6375
6376
6377
6378
6379
6380  # Publish this variable in the help.
6381
6382
6383  if [ -z "${CP+x}" ]; then
6384    # The variable is not set by user, try to locate tool using the code snippet
6385    for ac_prog in cp
6386do
6387  # Extract the first word of "$ac_prog", so it can be a program name with args.
6388set dummy $ac_prog; ac_word=$2
6389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6390$as_echo_n "checking for $ac_word... " >&6; }
6391if ${ac_cv_path_CP+:} false; then :
6392  $as_echo_n "(cached) " >&6
6393else
6394  case $CP in
6395  [\\/]* | ?:[\\/]*)
6396  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6397  ;;
6398  *)
6399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6400for as_dir in $PATH
6401do
6402  IFS=$as_save_IFS
6403  test -z "$as_dir" && as_dir=.
6404    for ac_exec_ext in '' $ac_executable_extensions; do
6405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6406    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6408    break 2
6409  fi
6410done
6411  done
6412IFS=$as_save_IFS
6413
6414  ;;
6415esac
6416fi
6417CP=$ac_cv_path_CP
6418if test -n "$CP"; then
6419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6420$as_echo "$CP" >&6; }
6421else
6422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; }
6424fi
6425
6426
6427  test -n "$CP" && break
6428done
6429
6430  else
6431    # The variable is set, but is it from the command line or the environment?
6432
6433    # Try to remove the string !CP! from our list.
6434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6436      # If it failed, the variable was not from the command line. Ignore it,
6437      # but warn the user (except for BASH, which is always set by the calling BASH).
6438      if test "xCP" != xBASH; then
6439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6440$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6441      fi
6442      # Try to locate tool using the code snippet
6443      for ac_prog in cp
6444do
6445  # Extract the first word of "$ac_prog", so it can be a program name with args.
6446set dummy $ac_prog; ac_word=$2
6447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6448$as_echo_n "checking for $ac_word... " >&6; }
6449if ${ac_cv_path_CP+:} false; then :
6450  $as_echo_n "(cached) " >&6
6451else
6452  case $CP in
6453  [\\/]* | ?:[\\/]*)
6454  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6455  ;;
6456  *)
6457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6458for as_dir in $PATH
6459do
6460  IFS=$as_save_IFS
6461  test -z "$as_dir" && as_dir=.
6462    for ac_exec_ext in '' $ac_executable_extensions; do
6463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6464    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6466    break 2
6467  fi
6468done
6469  done
6470IFS=$as_save_IFS
6471
6472  ;;
6473esac
6474fi
6475CP=$ac_cv_path_CP
6476if test -n "$CP"; then
6477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6478$as_echo "$CP" >&6; }
6479else
6480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6481$as_echo "no" >&6; }
6482fi
6483
6484
6485  test -n "$CP" && break
6486done
6487
6488    else
6489      # If it succeeded, then it was overridden by the user. We will use it
6490      # for the tool.
6491
6492      # First remove it from the list of overridden variables, so we can test
6493      # for unknown variables in the end.
6494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6495
6496      # Check if we try to supply an empty value
6497      if test "x$CP" = x; then
6498        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6499$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6500        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6501$as_echo_n "checking for CP... " >&6; }
6502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6503$as_echo "disabled" >&6; }
6504      else
6505        # Check if the provided tool contains a complete path.
6506        tool_specified="$CP"
6507        tool_basename="${tool_specified##*/}"
6508        if test "x$tool_basename" = "x$tool_specified"; then
6509          # A command without a complete path is provided, search $PATH.
6510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6511$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6512          # Extract the first word of "$tool_basename", so it can be a program name with args.
6513set dummy $tool_basename; ac_word=$2
6514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6515$as_echo_n "checking for $ac_word... " >&6; }
6516if ${ac_cv_path_CP+:} false; then :
6517  $as_echo_n "(cached) " >&6
6518else
6519  case $CP in
6520  [\\/]* | ?:[\\/]*)
6521  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6522  ;;
6523  *)
6524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6525for as_dir in $PATH
6526do
6527  IFS=$as_save_IFS
6528  test -z "$as_dir" && as_dir=.
6529    for ac_exec_ext in '' $ac_executable_extensions; do
6530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6531    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6533    break 2
6534  fi
6535done
6536  done
6537IFS=$as_save_IFS
6538
6539  ;;
6540esac
6541fi
6542CP=$ac_cv_path_CP
6543if test -n "$CP"; then
6544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6545$as_echo "$CP" >&6; }
6546else
6547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548$as_echo "no" >&6; }
6549fi
6550
6551
6552          if test "x$CP" = x; then
6553            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6554          fi
6555        else
6556          # Otherwise we believe it is a complete path. Use it as it is.
6557          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6558$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6559          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6560$as_echo_n "checking for CP... " >&6; }
6561          if test ! -x "$tool_specified"; then
6562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6563$as_echo "not found" >&6; }
6564            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6565          fi
6566          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6567$as_echo "$tool_specified" >&6; }
6568        fi
6569      fi
6570    fi
6571
6572  fi
6573
6574
6575
6576  if test "x$CP" = x; then
6577    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6578  fi
6579
6580
6581
6582
6583
6584  # Publish this variable in the help.
6585
6586
6587  if [ -z "${CUT+x}" ]; then
6588    # The variable is not set by user, try to locate tool using the code snippet
6589    for ac_prog in cut
6590do
6591  # Extract the first word of "$ac_prog", so it can be a program name with args.
6592set dummy $ac_prog; ac_word=$2
6593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6594$as_echo_n "checking for $ac_word... " >&6; }
6595if ${ac_cv_path_CUT+:} false; then :
6596  $as_echo_n "(cached) " >&6
6597else
6598  case $CUT in
6599  [\\/]* | ?:[\\/]*)
6600  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6601  ;;
6602  *)
6603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6604for as_dir in $PATH
6605do
6606  IFS=$as_save_IFS
6607  test -z "$as_dir" && as_dir=.
6608    for ac_exec_ext in '' $ac_executable_extensions; do
6609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6610    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6612    break 2
6613  fi
6614done
6615  done
6616IFS=$as_save_IFS
6617
6618  ;;
6619esac
6620fi
6621CUT=$ac_cv_path_CUT
6622if test -n "$CUT"; then
6623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6624$as_echo "$CUT" >&6; }
6625else
6626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6627$as_echo "no" >&6; }
6628fi
6629
6630
6631  test -n "$CUT" && break
6632done
6633
6634  else
6635    # The variable is set, but is it from the command line or the environment?
6636
6637    # Try to remove the string !CUT! from our list.
6638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6640      # If it failed, the variable was not from the command line. Ignore it,
6641      # but warn the user (except for BASH, which is always set by the calling BASH).
6642      if test "xCUT" != xBASH; then
6643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6644$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6645      fi
6646      # Try to locate tool using the code snippet
6647      for ac_prog in cut
6648do
6649  # Extract the first word of "$ac_prog", so it can be a program name with args.
6650set dummy $ac_prog; ac_word=$2
6651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6652$as_echo_n "checking for $ac_word... " >&6; }
6653if ${ac_cv_path_CUT+:} false; then :
6654  $as_echo_n "(cached) " >&6
6655else
6656  case $CUT in
6657  [\\/]* | ?:[\\/]*)
6658  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6659  ;;
6660  *)
6661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6662for as_dir in $PATH
6663do
6664  IFS=$as_save_IFS
6665  test -z "$as_dir" && as_dir=.
6666    for ac_exec_ext in '' $ac_executable_extensions; do
6667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6668    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6670    break 2
6671  fi
6672done
6673  done
6674IFS=$as_save_IFS
6675
6676  ;;
6677esac
6678fi
6679CUT=$ac_cv_path_CUT
6680if test -n "$CUT"; then
6681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6682$as_echo "$CUT" >&6; }
6683else
6684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6685$as_echo "no" >&6; }
6686fi
6687
6688
6689  test -n "$CUT" && break
6690done
6691
6692    else
6693      # If it succeeded, then it was overridden by the user. We will use it
6694      # for the tool.
6695
6696      # First remove it from the list of overridden variables, so we can test
6697      # for unknown variables in the end.
6698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6699
6700      # Check if we try to supply an empty value
6701      if test "x$CUT" = x; then
6702        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6703$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6705$as_echo_n "checking for CUT... " >&6; }
6706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6707$as_echo "disabled" >&6; }
6708      else
6709        # Check if the provided tool contains a complete path.
6710        tool_specified="$CUT"
6711        tool_basename="${tool_specified##*/}"
6712        if test "x$tool_basename" = "x$tool_specified"; then
6713          # A command without a complete path is provided, search $PATH.
6714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6715$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6716          # Extract the first word of "$tool_basename", so it can be a program name with args.
6717set dummy $tool_basename; ac_word=$2
6718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6719$as_echo_n "checking for $ac_word... " >&6; }
6720if ${ac_cv_path_CUT+:} false; then :
6721  $as_echo_n "(cached) " >&6
6722else
6723  case $CUT in
6724  [\\/]* | ?:[\\/]*)
6725  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6726  ;;
6727  *)
6728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6729for as_dir in $PATH
6730do
6731  IFS=$as_save_IFS
6732  test -z "$as_dir" && as_dir=.
6733    for ac_exec_ext in '' $ac_executable_extensions; do
6734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6735    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6737    break 2
6738  fi
6739done
6740  done
6741IFS=$as_save_IFS
6742
6743  ;;
6744esac
6745fi
6746CUT=$ac_cv_path_CUT
6747if test -n "$CUT"; then
6748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6749$as_echo "$CUT" >&6; }
6750else
6751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6752$as_echo "no" >&6; }
6753fi
6754
6755
6756          if test "x$CUT" = x; then
6757            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6758          fi
6759        else
6760          # Otherwise we believe it is a complete path. Use it as it is.
6761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6762$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6763          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6764$as_echo_n "checking for CUT... " >&6; }
6765          if test ! -x "$tool_specified"; then
6766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6767$as_echo "not found" >&6; }
6768            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6769          fi
6770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6771$as_echo "$tool_specified" >&6; }
6772        fi
6773      fi
6774    fi
6775
6776  fi
6777
6778
6779
6780  if test "x$CUT" = x; then
6781    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6782  fi
6783
6784
6785
6786
6787
6788  # Publish this variable in the help.
6789
6790
6791  if [ -z "${DATE+x}" ]; then
6792    # The variable is not set by user, try to locate tool using the code snippet
6793    for ac_prog in date
6794do
6795  # Extract the first word of "$ac_prog", so it can be a program name with args.
6796set dummy $ac_prog; ac_word=$2
6797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6798$as_echo_n "checking for $ac_word... " >&6; }
6799if ${ac_cv_path_DATE+:} false; then :
6800  $as_echo_n "(cached) " >&6
6801else
6802  case $DATE in
6803  [\\/]* | ?:[\\/]*)
6804  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6805  ;;
6806  *)
6807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6808for as_dir in $PATH
6809do
6810  IFS=$as_save_IFS
6811  test -z "$as_dir" && as_dir=.
6812    for ac_exec_ext in '' $ac_executable_extensions; do
6813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6814    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6816    break 2
6817  fi
6818done
6819  done
6820IFS=$as_save_IFS
6821
6822  ;;
6823esac
6824fi
6825DATE=$ac_cv_path_DATE
6826if test -n "$DATE"; then
6827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6828$as_echo "$DATE" >&6; }
6829else
6830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6831$as_echo "no" >&6; }
6832fi
6833
6834
6835  test -n "$DATE" && break
6836done
6837
6838  else
6839    # The variable is set, but is it from the command line or the environment?
6840
6841    # Try to remove the string !DATE! from our list.
6842    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6843    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6844      # If it failed, the variable was not from the command line. Ignore it,
6845      # but warn the user (except for BASH, which is always set by the calling BASH).
6846      if test "xDATE" != xBASH; then
6847        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6848$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6849      fi
6850      # Try to locate tool using the code snippet
6851      for ac_prog in date
6852do
6853  # Extract the first word of "$ac_prog", so it can be a program name with args.
6854set dummy $ac_prog; ac_word=$2
6855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6856$as_echo_n "checking for $ac_word... " >&6; }
6857if ${ac_cv_path_DATE+:} false; then :
6858  $as_echo_n "(cached) " >&6
6859else
6860  case $DATE in
6861  [\\/]* | ?:[\\/]*)
6862  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6863  ;;
6864  *)
6865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6866for as_dir in $PATH
6867do
6868  IFS=$as_save_IFS
6869  test -z "$as_dir" && as_dir=.
6870    for ac_exec_ext in '' $ac_executable_extensions; do
6871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6872    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6874    break 2
6875  fi
6876done
6877  done
6878IFS=$as_save_IFS
6879
6880  ;;
6881esac
6882fi
6883DATE=$ac_cv_path_DATE
6884if test -n "$DATE"; then
6885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6886$as_echo "$DATE" >&6; }
6887else
6888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6889$as_echo "no" >&6; }
6890fi
6891
6892
6893  test -n "$DATE" && break
6894done
6895
6896    else
6897      # If it succeeded, then it was overridden by the user. We will use it
6898      # for the tool.
6899
6900      # First remove it from the list of overridden variables, so we can test
6901      # for unknown variables in the end.
6902      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6903
6904      # Check if we try to supply an empty value
6905      if test "x$DATE" = x; then
6906        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6907$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6908        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6909$as_echo_n "checking for DATE... " >&6; }
6910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6911$as_echo "disabled" >&6; }
6912      else
6913        # Check if the provided tool contains a complete path.
6914        tool_specified="$DATE"
6915        tool_basename="${tool_specified##*/}"
6916        if test "x$tool_basename" = "x$tool_specified"; then
6917          # A command without a complete path is provided, search $PATH.
6918          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6919$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6920          # Extract the first word of "$tool_basename", so it can be a program name with args.
6921set dummy $tool_basename; ac_word=$2
6922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6923$as_echo_n "checking for $ac_word... " >&6; }
6924if ${ac_cv_path_DATE+:} false; then :
6925  $as_echo_n "(cached) " >&6
6926else
6927  case $DATE in
6928  [\\/]* | ?:[\\/]*)
6929  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6930  ;;
6931  *)
6932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6933for as_dir in $PATH
6934do
6935  IFS=$as_save_IFS
6936  test -z "$as_dir" && as_dir=.
6937    for ac_exec_ext in '' $ac_executable_extensions; do
6938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6939    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6941    break 2
6942  fi
6943done
6944  done
6945IFS=$as_save_IFS
6946
6947  ;;
6948esac
6949fi
6950DATE=$ac_cv_path_DATE
6951if test -n "$DATE"; then
6952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6953$as_echo "$DATE" >&6; }
6954else
6955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6956$as_echo "no" >&6; }
6957fi
6958
6959
6960          if test "x$DATE" = x; then
6961            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6962          fi
6963        else
6964          # Otherwise we believe it is a complete path. Use it as it is.
6965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6966$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6967          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6968$as_echo_n "checking for DATE... " >&6; }
6969          if test ! -x "$tool_specified"; then
6970            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6971$as_echo "not found" >&6; }
6972            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6973          fi
6974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6975$as_echo "$tool_specified" >&6; }
6976        fi
6977      fi
6978    fi
6979
6980  fi
6981
6982
6983
6984  if test "x$DATE" = x; then
6985    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6986  fi
6987
6988
6989
6990
6991
6992  # Publish this variable in the help.
6993
6994
6995  if [ -z "${DIFF+x}" ]; then
6996    # The variable is not set by user, try to locate tool using the code snippet
6997    for ac_prog in gdiff diff
6998do
6999  # Extract the first word of "$ac_prog", so it can be a program name with args.
7000set dummy $ac_prog; ac_word=$2
7001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7002$as_echo_n "checking for $ac_word... " >&6; }
7003if ${ac_cv_path_DIFF+:} false; then :
7004  $as_echo_n "(cached) " >&6
7005else
7006  case $DIFF in
7007  [\\/]* | ?:[\\/]*)
7008  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7009  ;;
7010  *)
7011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7012for as_dir in $PATH
7013do
7014  IFS=$as_save_IFS
7015  test -z "$as_dir" && as_dir=.
7016    for ac_exec_ext in '' $ac_executable_extensions; do
7017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7018    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7020    break 2
7021  fi
7022done
7023  done
7024IFS=$as_save_IFS
7025
7026  ;;
7027esac
7028fi
7029DIFF=$ac_cv_path_DIFF
7030if test -n "$DIFF"; then
7031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7032$as_echo "$DIFF" >&6; }
7033else
7034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7035$as_echo "no" >&6; }
7036fi
7037
7038
7039  test -n "$DIFF" && break
7040done
7041
7042  else
7043    # The variable is set, but is it from the command line or the environment?
7044
7045    # Try to remove the string !DIFF! from our list.
7046    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7047    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7048      # If it failed, the variable was not from the command line. Ignore it,
7049      # but warn the user (except for BASH, which is always set by the calling BASH).
7050      if test "xDIFF" != xBASH; then
7051        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7052$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7053      fi
7054      # Try to locate tool using the code snippet
7055      for ac_prog in gdiff diff
7056do
7057  # Extract the first word of "$ac_prog", so it can be a program name with args.
7058set dummy $ac_prog; ac_word=$2
7059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7060$as_echo_n "checking for $ac_word... " >&6; }
7061if ${ac_cv_path_DIFF+:} false; then :
7062  $as_echo_n "(cached) " >&6
7063else
7064  case $DIFF in
7065  [\\/]* | ?:[\\/]*)
7066  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7067  ;;
7068  *)
7069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7070for as_dir in $PATH
7071do
7072  IFS=$as_save_IFS
7073  test -z "$as_dir" && as_dir=.
7074    for ac_exec_ext in '' $ac_executable_extensions; do
7075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7076    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7078    break 2
7079  fi
7080done
7081  done
7082IFS=$as_save_IFS
7083
7084  ;;
7085esac
7086fi
7087DIFF=$ac_cv_path_DIFF
7088if test -n "$DIFF"; then
7089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7090$as_echo "$DIFF" >&6; }
7091else
7092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7093$as_echo "no" >&6; }
7094fi
7095
7096
7097  test -n "$DIFF" && break
7098done
7099
7100    else
7101      # If it succeeded, then it was overridden by the user. We will use it
7102      # for the tool.
7103
7104      # First remove it from the list of overridden variables, so we can test
7105      # for unknown variables in the end.
7106      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7107
7108      # Check if we try to supply an empty value
7109      if test "x$DIFF" = x; then
7110        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7111$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7113$as_echo_n "checking for DIFF... " >&6; }
7114        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7115$as_echo "disabled" >&6; }
7116      else
7117        # Check if the provided tool contains a complete path.
7118        tool_specified="$DIFF"
7119        tool_basename="${tool_specified##*/}"
7120        if test "x$tool_basename" = "x$tool_specified"; then
7121          # A command without a complete path is provided, search $PATH.
7122          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7123$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7124          # Extract the first word of "$tool_basename", so it can be a program name with args.
7125set dummy $tool_basename; ac_word=$2
7126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7127$as_echo_n "checking for $ac_word... " >&6; }
7128if ${ac_cv_path_DIFF+:} false; then :
7129  $as_echo_n "(cached) " >&6
7130else
7131  case $DIFF in
7132  [\\/]* | ?:[\\/]*)
7133  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7134  ;;
7135  *)
7136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7137for as_dir in $PATH
7138do
7139  IFS=$as_save_IFS
7140  test -z "$as_dir" && as_dir=.
7141    for ac_exec_ext in '' $ac_executable_extensions; do
7142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7143    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7145    break 2
7146  fi
7147done
7148  done
7149IFS=$as_save_IFS
7150
7151  ;;
7152esac
7153fi
7154DIFF=$ac_cv_path_DIFF
7155if test -n "$DIFF"; then
7156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7157$as_echo "$DIFF" >&6; }
7158else
7159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7160$as_echo "no" >&6; }
7161fi
7162
7163
7164          if test "x$DIFF" = x; then
7165            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7166          fi
7167        else
7168          # Otherwise we believe it is a complete path. Use it as it is.
7169          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7170$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7171          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7172$as_echo_n "checking for DIFF... " >&6; }
7173          if test ! -x "$tool_specified"; then
7174            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7175$as_echo "not found" >&6; }
7176            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7177          fi
7178          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7179$as_echo "$tool_specified" >&6; }
7180        fi
7181      fi
7182    fi
7183
7184  fi
7185
7186
7187
7188  if test "x$DIFF" = x; then
7189    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7190  fi
7191
7192
7193
7194
7195
7196  # Publish this variable in the help.
7197
7198
7199  if [ -z "${DIRNAME+x}" ]; then
7200    # The variable is not set by user, try to locate tool using the code snippet
7201    for ac_prog in dirname
7202do
7203  # Extract the first word of "$ac_prog", so it can be a program name with args.
7204set dummy $ac_prog; ac_word=$2
7205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7206$as_echo_n "checking for $ac_word... " >&6; }
7207if ${ac_cv_path_DIRNAME+:} false; then :
7208  $as_echo_n "(cached) " >&6
7209else
7210  case $DIRNAME in
7211  [\\/]* | ?:[\\/]*)
7212  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7213  ;;
7214  *)
7215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7216for as_dir in $PATH
7217do
7218  IFS=$as_save_IFS
7219  test -z "$as_dir" && as_dir=.
7220    for ac_exec_ext in '' $ac_executable_extensions; do
7221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7222    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7224    break 2
7225  fi
7226done
7227  done
7228IFS=$as_save_IFS
7229
7230  ;;
7231esac
7232fi
7233DIRNAME=$ac_cv_path_DIRNAME
7234if test -n "$DIRNAME"; then
7235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7236$as_echo "$DIRNAME" >&6; }
7237else
7238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7239$as_echo "no" >&6; }
7240fi
7241
7242
7243  test -n "$DIRNAME" && break
7244done
7245
7246  else
7247    # The variable is set, but is it from the command line or the environment?
7248
7249    # Try to remove the string !DIRNAME! from our list.
7250    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7251    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7252      # If it failed, the variable was not from the command line. Ignore it,
7253      # but warn the user (except for BASH, which is always set by the calling BASH).
7254      if test "xDIRNAME" != xBASH; then
7255        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7256$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7257      fi
7258      # Try to locate tool using the code snippet
7259      for ac_prog in dirname
7260do
7261  # Extract the first word of "$ac_prog", so it can be a program name with args.
7262set dummy $ac_prog; ac_word=$2
7263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7264$as_echo_n "checking for $ac_word... " >&6; }
7265if ${ac_cv_path_DIRNAME+:} false; then :
7266  $as_echo_n "(cached) " >&6
7267else
7268  case $DIRNAME in
7269  [\\/]* | ?:[\\/]*)
7270  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7271  ;;
7272  *)
7273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7274for as_dir in $PATH
7275do
7276  IFS=$as_save_IFS
7277  test -z "$as_dir" && as_dir=.
7278    for ac_exec_ext in '' $ac_executable_extensions; do
7279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7280    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7282    break 2
7283  fi
7284done
7285  done
7286IFS=$as_save_IFS
7287
7288  ;;
7289esac
7290fi
7291DIRNAME=$ac_cv_path_DIRNAME
7292if test -n "$DIRNAME"; then
7293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7294$as_echo "$DIRNAME" >&6; }
7295else
7296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7297$as_echo "no" >&6; }
7298fi
7299
7300
7301  test -n "$DIRNAME" && break
7302done
7303
7304    else
7305      # If it succeeded, then it was overridden by the user. We will use it
7306      # for the tool.
7307
7308      # First remove it from the list of overridden variables, so we can test
7309      # for unknown variables in the end.
7310      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7311
7312      # Check if we try to supply an empty value
7313      if test "x$DIRNAME" = x; then
7314        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7315$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7317$as_echo_n "checking for DIRNAME... " >&6; }
7318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7319$as_echo "disabled" >&6; }
7320      else
7321        # Check if the provided tool contains a complete path.
7322        tool_specified="$DIRNAME"
7323        tool_basename="${tool_specified##*/}"
7324        if test "x$tool_basename" = "x$tool_specified"; then
7325          # A command without a complete path is provided, search $PATH.
7326          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7327$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7328          # Extract the first word of "$tool_basename", so it can be a program name with args.
7329set dummy $tool_basename; ac_word=$2
7330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7331$as_echo_n "checking for $ac_word... " >&6; }
7332if ${ac_cv_path_DIRNAME+:} false; then :
7333  $as_echo_n "(cached) " >&6
7334else
7335  case $DIRNAME in
7336  [\\/]* | ?:[\\/]*)
7337  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7338  ;;
7339  *)
7340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7341for as_dir in $PATH
7342do
7343  IFS=$as_save_IFS
7344  test -z "$as_dir" && as_dir=.
7345    for ac_exec_ext in '' $ac_executable_extensions; do
7346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7347    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7349    break 2
7350  fi
7351done
7352  done
7353IFS=$as_save_IFS
7354
7355  ;;
7356esac
7357fi
7358DIRNAME=$ac_cv_path_DIRNAME
7359if test -n "$DIRNAME"; then
7360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7361$as_echo "$DIRNAME" >&6; }
7362else
7363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7364$as_echo "no" >&6; }
7365fi
7366
7367
7368          if test "x$DIRNAME" = x; then
7369            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7370          fi
7371        else
7372          # Otherwise we believe it is a complete path. Use it as it is.
7373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7374$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7375          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7376$as_echo_n "checking for DIRNAME... " >&6; }
7377          if test ! -x "$tool_specified"; then
7378            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7379$as_echo "not found" >&6; }
7380            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7381          fi
7382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7383$as_echo "$tool_specified" >&6; }
7384        fi
7385      fi
7386    fi
7387
7388  fi
7389
7390
7391
7392  if test "x$DIRNAME" = x; then
7393    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7394  fi
7395
7396
7397
7398
7399
7400  # Publish this variable in the help.
7401
7402
7403  if [ -z "${ECHO+x}" ]; then
7404    # The variable is not set by user, try to locate tool using the code snippet
7405    for ac_prog in echo
7406do
7407  # Extract the first word of "$ac_prog", so it can be a program name with args.
7408set dummy $ac_prog; ac_word=$2
7409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7410$as_echo_n "checking for $ac_word... " >&6; }
7411if ${ac_cv_path_ECHO+:} false; then :
7412  $as_echo_n "(cached) " >&6
7413else
7414  case $ECHO in
7415  [\\/]* | ?:[\\/]*)
7416  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7417  ;;
7418  *)
7419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7420for as_dir in $PATH
7421do
7422  IFS=$as_save_IFS
7423  test -z "$as_dir" && as_dir=.
7424    for ac_exec_ext in '' $ac_executable_extensions; do
7425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7426    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7428    break 2
7429  fi
7430done
7431  done
7432IFS=$as_save_IFS
7433
7434  ;;
7435esac
7436fi
7437ECHO=$ac_cv_path_ECHO
7438if test -n "$ECHO"; then
7439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7440$as_echo "$ECHO" >&6; }
7441else
7442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7443$as_echo "no" >&6; }
7444fi
7445
7446
7447  test -n "$ECHO" && break
7448done
7449
7450  else
7451    # The variable is set, but is it from the command line or the environment?
7452
7453    # Try to remove the string !ECHO! from our list.
7454    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7455    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7456      # If it failed, the variable was not from the command line. Ignore it,
7457      # but warn the user (except for BASH, which is always set by the calling BASH).
7458      if test "xECHO" != xBASH; then
7459        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7460$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7461      fi
7462      # Try to locate tool using the code snippet
7463      for ac_prog in echo
7464do
7465  # Extract the first word of "$ac_prog", so it can be a program name with args.
7466set dummy $ac_prog; ac_word=$2
7467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7468$as_echo_n "checking for $ac_word... " >&6; }
7469if ${ac_cv_path_ECHO+:} false; then :
7470  $as_echo_n "(cached) " >&6
7471else
7472  case $ECHO in
7473  [\\/]* | ?:[\\/]*)
7474  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7475  ;;
7476  *)
7477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7478for as_dir in $PATH
7479do
7480  IFS=$as_save_IFS
7481  test -z "$as_dir" && as_dir=.
7482    for ac_exec_ext in '' $ac_executable_extensions; do
7483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7484    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7486    break 2
7487  fi
7488done
7489  done
7490IFS=$as_save_IFS
7491
7492  ;;
7493esac
7494fi
7495ECHO=$ac_cv_path_ECHO
7496if test -n "$ECHO"; then
7497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7498$as_echo "$ECHO" >&6; }
7499else
7500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7501$as_echo "no" >&6; }
7502fi
7503
7504
7505  test -n "$ECHO" && break
7506done
7507
7508    else
7509      # If it succeeded, then it was overridden by the user. We will use it
7510      # for the tool.
7511
7512      # First remove it from the list of overridden variables, so we can test
7513      # for unknown variables in the end.
7514      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7515
7516      # Check if we try to supply an empty value
7517      if test "x$ECHO" = x; then
7518        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7519$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7521$as_echo_n "checking for ECHO... " >&6; }
7522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7523$as_echo "disabled" >&6; }
7524      else
7525        # Check if the provided tool contains a complete path.
7526        tool_specified="$ECHO"
7527        tool_basename="${tool_specified##*/}"
7528        if test "x$tool_basename" = "x$tool_specified"; then
7529          # A command without a complete path is provided, search $PATH.
7530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7531$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7532          # Extract the first word of "$tool_basename", so it can be a program name with args.
7533set dummy $tool_basename; ac_word=$2
7534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7535$as_echo_n "checking for $ac_word... " >&6; }
7536if ${ac_cv_path_ECHO+:} false; then :
7537  $as_echo_n "(cached) " >&6
7538else
7539  case $ECHO in
7540  [\\/]* | ?:[\\/]*)
7541  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7542  ;;
7543  *)
7544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7545for as_dir in $PATH
7546do
7547  IFS=$as_save_IFS
7548  test -z "$as_dir" && as_dir=.
7549    for ac_exec_ext in '' $ac_executable_extensions; do
7550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7551    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7553    break 2
7554  fi
7555done
7556  done
7557IFS=$as_save_IFS
7558
7559  ;;
7560esac
7561fi
7562ECHO=$ac_cv_path_ECHO
7563if test -n "$ECHO"; then
7564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7565$as_echo "$ECHO" >&6; }
7566else
7567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7568$as_echo "no" >&6; }
7569fi
7570
7571
7572          if test "x$ECHO" = x; then
7573            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7574          fi
7575        else
7576          # Otherwise we believe it is a complete path. Use it as it is.
7577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7578$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7579          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7580$as_echo_n "checking for ECHO... " >&6; }
7581          if test ! -x "$tool_specified"; then
7582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7583$as_echo "not found" >&6; }
7584            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7585          fi
7586          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7587$as_echo "$tool_specified" >&6; }
7588        fi
7589      fi
7590    fi
7591
7592  fi
7593
7594
7595
7596  if test "x$ECHO" = x; then
7597    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7598  fi
7599
7600
7601
7602
7603
7604  # Publish this variable in the help.
7605
7606
7607  if [ -z "${EXPR+x}" ]; then
7608    # The variable is not set by user, try to locate tool using the code snippet
7609    for ac_prog in expr
7610do
7611  # Extract the first word of "$ac_prog", so it can be a program name with args.
7612set dummy $ac_prog; ac_word=$2
7613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7614$as_echo_n "checking for $ac_word... " >&6; }
7615if ${ac_cv_path_EXPR+:} false; then :
7616  $as_echo_n "(cached) " >&6
7617else
7618  case $EXPR in
7619  [\\/]* | ?:[\\/]*)
7620  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7621  ;;
7622  *)
7623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7624for as_dir in $PATH
7625do
7626  IFS=$as_save_IFS
7627  test -z "$as_dir" && as_dir=.
7628    for ac_exec_ext in '' $ac_executable_extensions; do
7629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7630    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7632    break 2
7633  fi
7634done
7635  done
7636IFS=$as_save_IFS
7637
7638  ;;
7639esac
7640fi
7641EXPR=$ac_cv_path_EXPR
7642if test -n "$EXPR"; then
7643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7644$as_echo "$EXPR" >&6; }
7645else
7646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7647$as_echo "no" >&6; }
7648fi
7649
7650
7651  test -n "$EXPR" && break
7652done
7653
7654  else
7655    # The variable is set, but is it from the command line or the environment?
7656
7657    # Try to remove the string !EXPR! from our list.
7658    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7659    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7660      # If it failed, the variable was not from the command line. Ignore it,
7661      # but warn the user (except for BASH, which is always set by the calling BASH).
7662      if test "xEXPR" != xBASH; then
7663        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7664$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7665      fi
7666      # Try to locate tool using the code snippet
7667      for ac_prog in expr
7668do
7669  # Extract the first word of "$ac_prog", so it can be a program name with args.
7670set dummy $ac_prog; ac_word=$2
7671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7672$as_echo_n "checking for $ac_word... " >&6; }
7673if ${ac_cv_path_EXPR+:} false; then :
7674  $as_echo_n "(cached) " >&6
7675else
7676  case $EXPR in
7677  [\\/]* | ?:[\\/]*)
7678  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7679  ;;
7680  *)
7681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7682for as_dir in $PATH
7683do
7684  IFS=$as_save_IFS
7685  test -z "$as_dir" && as_dir=.
7686    for ac_exec_ext in '' $ac_executable_extensions; do
7687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7688    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7690    break 2
7691  fi
7692done
7693  done
7694IFS=$as_save_IFS
7695
7696  ;;
7697esac
7698fi
7699EXPR=$ac_cv_path_EXPR
7700if test -n "$EXPR"; then
7701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7702$as_echo "$EXPR" >&6; }
7703else
7704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7705$as_echo "no" >&6; }
7706fi
7707
7708
7709  test -n "$EXPR" && break
7710done
7711
7712    else
7713      # If it succeeded, then it was overridden by the user. We will use it
7714      # for the tool.
7715
7716      # First remove it from the list of overridden variables, so we can test
7717      # for unknown variables in the end.
7718      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7719
7720      # Check if we try to supply an empty value
7721      if test "x$EXPR" = x; then
7722        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7723$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7724        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7725$as_echo_n "checking for EXPR... " >&6; }
7726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7727$as_echo "disabled" >&6; }
7728      else
7729        # Check if the provided tool contains a complete path.
7730        tool_specified="$EXPR"
7731        tool_basename="${tool_specified##*/}"
7732        if test "x$tool_basename" = "x$tool_specified"; then
7733          # A command without a complete path is provided, search $PATH.
7734          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7735$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7736          # Extract the first word of "$tool_basename", so it can be a program name with args.
7737set dummy $tool_basename; ac_word=$2
7738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7739$as_echo_n "checking for $ac_word... " >&6; }
7740if ${ac_cv_path_EXPR+:} false; then :
7741  $as_echo_n "(cached) " >&6
7742else
7743  case $EXPR in
7744  [\\/]* | ?:[\\/]*)
7745  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7746  ;;
7747  *)
7748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7749for as_dir in $PATH
7750do
7751  IFS=$as_save_IFS
7752  test -z "$as_dir" && as_dir=.
7753    for ac_exec_ext in '' $ac_executable_extensions; do
7754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7755    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7757    break 2
7758  fi
7759done
7760  done
7761IFS=$as_save_IFS
7762
7763  ;;
7764esac
7765fi
7766EXPR=$ac_cv_path_EXPR
7767if test -n "$EXPR"; then
7768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7769$as_echo "$EXPR" >&6; }
7770else
7771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7772$as_echo "no" >&6; }
7773fi
7774
7775
7776          if test "x$EXPR" = x; then
7777            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7778          fi
7779        else
7780          # Otherwise we believe it is a complete path. Use it as it is.
7781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7782$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7783          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7784$as_echo_n "checking for EXPR... " >&6; }
7785          if test ! -x "$tool_specified"; then
7786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7787$as_echo "not found" >&6; }
7788            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7789          fi
7790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7791$as_echo "$tool_specified" >&6; }
7792        fi
7793      fi
7794    fi
7795
7796  fi
7797
7798
7799
7800  if test "x$EXPR" = x; then
7801    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7802  fi
7803
7804
7805
7806
7807
7808  # Publish this variable in the help.
7809
7810
7811  if [ -z "${FILE+x}" ]; then
7812    # The variable is not set by user, try to locate tool using the code snippet
7813    for ac_prog in file
7814do
7815  # Extract the first word of "$ac_prog", so it can be a program name with args.
7816set dummy $ac_prog; ac_word=$2
7817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7818$as_echo_n "checking for $ac_word... " >&6; }
7819if ${ac_cv_path_FILE+:} false; then :
7820  $as_echo_n "(cached) " >&6
7821else
7822  case $FILE in
7823  [\\/]* | ?:[\\/]*)
7824  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7825  ;;
7826  *)
7827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7828for as_dir in $PATH
7829do
7830  IFS=$as_save_IFS
7831  test -z "$as_dir" && as_dir=.
7832    for ac_exec_ext in '' $ac_executable_extensions; do
7833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7834    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7836    break 2
7837  fi
7838done
7839  done
7840IFS=$as_save_IFS
7841
7842  ;;
7843esac
7844fi
7845FILE=$ac_cv_path_FILE
7846if test -n "$FILE"; then
7847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7848$as_echo "$FILE" >&6; }
7849else
7850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7851$as_echo "no" >&6; }
7852fi
7853
7854
7855  test -n "$FILE" && break
7856done
7857
7858  else
7859    # The variable is set, but is it from the command line or the environment?
7860
7861    # Try to remove the string !FILE! from our list.
7862    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7863    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7864      # If it failed, the variable was not from the command line. Ignore it,
7865      # but warn the user (except for BASH, which is always set by the calling BASH).
7866      if test "xFILE" != xBASH; then
7867        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7868$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7869      fi
7870      # Try to locate tool using the code snippet
7871      for ac_prog in file
7872do
7873  # Extract the first word of "$ac_prog", so it can be a program name with args.
7874set dummy $ac_prog; ac_word=$2
7875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7876$as_echo_n "checking for $ac_word... " >&6; }
7877if ${ac_cv_path_FILE+:} false; then :
7878  $as_echo_n "(cached) " >&6
7879else
7880  case $FILE in
7881  [\\/]* | ?:[\\/]*)
7882  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7883  ;;
7884  *)
7885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7886for as_dir in $PATH
7887do
7888  IFS=$as_save_IFS
7889  test -z "$as_dir" && as_dir=.
7890    for ac_exec_ext in '' $ac_executable_extensions; do
7891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7892    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7894    break 2
7895  fi
7896done
7897  done
7898IFS=$as_save_IFS
7899
7900  ;;
7901esac
7902fi
7903FILE=$ac_cv_path_FILE
7904if test -n "$FILE"; then
7905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7906$as_echo "$FILE" >&6; }
7907else
7908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7909$as_echo "no" >&6; }
7910fi
7911
7912
7913  test -n "$FILE" && break
7914done
7915
7916    else
7917      # If it succeeded, then it was overridden by the user. We will use it
7918      # for the tool.
7919
7920      # First remove it from the list of overridden variables, so we can test
7921      # for unknown variables in the end.
7922      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7923
7924      # Check if we try to supply an empty value
7925      if test "x$FILE" = x; then
7926        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7927$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7929$as_echo_n "checking for FILE... " >&6; }
7930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7931$as_echo "disabled" >&6; }
7932      else
7933        # Check if the provided tool contains a complete path.
7934        tool_specified="$FILE"
7935        tool_basename="${tool_specified##*/}"
7936        if test "x$tool_basename" = "x$tool_specified"; then
7937          # A command without a complete path is provided, search $PATH.
7938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7939$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7940          # Extract the first word of "$tool_basename", so it can be a program name with args.
7941set dummy $tool_basename; ac_word=$2
7942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7943$as_echo_n "checking for $ac_word... " >&6; }
7944if ${ac_cv_path_FILE+:} false; then :
7945  $as_echo_n "(cached) " >&6
7946else
7947  case $FILE in
7948  [\\/]* | ?:[\\/]*)
7949  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7950  ;;
7951  *)
7952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7953for as_dir in $PATH
7954do
7955  IFS=$as_save_IFS
7956  test -z "$as_dir" && as_dir=.
7957    for ac_exec_ext in '' $ac_executable_extensions; do
7958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7959    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7961    break 2
7962  fi
7963done
7964  done
7965IFS=$as_save_IFS
7966
7967  ;;
7968esac
7969fi
7970FILE=$ac_cv_path_FILE
7971if test -n "$FILE"; then
7972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7973$as_echo "$FILE" >&6; }
7974else
7975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7976$as_echo "no" >&6; }
7977fi
7978
7979
7980          if test "x$FILE" = x; then
7981            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7982          fi
7983        else
7984          # Otherwise we believe it is a complete path. Use it as it is.
7985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7986$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7987          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7988$as_echo_n "checking for FILE... " >&6; }
7989          if test ! -x "$tool_specified"; then
7990            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7991$as_echo "not found" >&6; }
7992            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7993          fi
7994          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7995$as_echo "$tool_specified" >&6; }
7996        fi
7997      fi
7998    fi
7999
8000  fi
8001
8002
8003
8004  if test "x$FILE" = x; then
8005    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8006  fi
8007
8008
8009
8010
8011
8012  # Publish this variable in the help.
8013
8014
8015  if [ -z "${FIND+x}" ]; then
8016    # The variable is not set by user, try to locate tool using the code snippet
8017    for ac_prog in find
8018do
8019  # Extract the first word of "$ac_prog", so it can be a program name with args.
8020set dummy $ac_prog; ac_word=$2
8021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8022$as_echo_n "checking for $ac_word... " >&6; }
8023if ${ac_cv_path_FIND+:} false; then :
8024  $as_echo_n "(cached) " >&6
8025else
8026  case $FIND in
8027  [\\/]* | ?:[\\/]*)
8028  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8029  ;;
8030  *)
8031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8032for as_dir in $PATH
8033do
8034  IFS=$as_save_IFS
8035  test -z "$as_dir" && as_dir=.
8036    for ac_exec_ext in '' $ac_executable_extensions; do
8037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8038    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8040    break 2
8041  fi
8042done
8043  done
8044IFS=$as_save_IFS
8045
8046  ;;
8047esac
8048fi
8049FIND=$ac_cv_path_FIND
8050if test -n "$FIND"; then
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8052$as_echo "$FIND" >&6; }
8053else
8054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055$as_echo "no" >&6; }
8056fi
8057
8058
8059  test -n "$FIND" && break
8060done
8061
8062  else
8063    # The variable is set, but is it from the command line or the environment?
8064
8065    # Try to remove the string !FIND! from our list.
8066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8068      # If it failed, the variable was not from the command line. Ignore it,
8069      # but warn the user (except for BASH, which is always set by the calling BASH).
8070      if test "xFIND" != xBASH; then
8071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8072$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8073      fi
8074      # Try to locate tool using the code snippet
8075      for ac_prog in find
8076do
8077  # Extract the first word of "$ac_prog", so it can be a program name with args.
8078set dummy $ac_prog; ac_word=$2
8079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8080$as_echo_n "checking for $ac_word... " >&6; }
8081if ${ac_cv_path_FIND+:} false; then :
8082  $as_echo_n "(cached) " >&6
8083else
8084  case $FIND in
8085  [\\/]* | ?:[\\/]*)
8086  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8087  ;;
8088  *)
8089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8090for as_dir in $PATH
8091do
8092  IFS=$as_save_IFS
8093  test -z "$as_dir" && as_dir=.
8094    for ac_exec_ext in '' $ac_executable_extensions; do
8095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8096    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8098    break 2
8099  fi
8100done
8101  done
8102IFS=$as_save_IFS
8103
8104  ;;
8105esac
8106fi
8107FIND=$ac_cv_path_FIND
8108if test -n "$FIND"; then
8109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8110$as_echo "$FIND" >&6; }
8111else
8112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8113$as_echo "no" >&6; }
8114fi
8115
8116
8117  test -n "$FIND" && break
8118done
8119
8120    else
8121      # If it succeeded, then it was overridden by the user. We will use it
8122      # for the tool.
8123
8124      # First remove it from the list of overridden variables, so we can test
8125      # for unknown variables in the end.
8126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8127
8128      # Check if we try to supply an empty value
8129      if test "x$FIND" = x; then
8130        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8131$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8132        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8133$as_echo_n "checking for FIND... " >&6; }
8134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8135$as_echo "disabled" >&6; }
8136      else
8137        # Check if the provided tool contains a complete path.
8138        tool_specified="$FIND"
8139        tool_basename="${tool_specified##*/}"
8140        if test "x$tool_basename" = "x$tool_specified"; then
8141          # A command without a complete path is provided, search $PATH.
8142          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8143$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8144          # Extract the first word of "$tool_basename", so it can be a program name with args.
8145set dummy $tool_basename; ac_word=$2
8146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8147$as_echo_n "checking for $ac_word... " >&6; }
8148if ${ac_cv_path_FIND+:} false; then :
8149  $as_echo_n "(cached) " >&6
8150else
8151  case $FIND in
8152  [\\/]* | ?:[\\/]*)
8153  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8154  ;;
8155  *)
8156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8157for as_dir in $PATH
8158do
8159  IFS=$as_save_IFS
8160  test -z "$as_dir" && as_dir=.
8161    for ac_exec_ext in '' $ac_executable_extensions; do
8162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8163    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8165    break 2
8166  fi
8167done
8168  done
8169IFS=$as_save_IFS
8170
8171  ;;
8172esac
8173fi
8174FIND=$ac_cv_path_FIND
8175if test -n "$FIND"; then
8176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8177$as_echo "$FIND" >&6; }
8178else
8179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8180$as_echo "no" >&6; }
8181fi
8182
8183
8184          if test "x$FIND" = x; then
8185            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8186          fi
8187        else
8188          # Otherwise we believe it is a complete path. Use it as it is.
8189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8190$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8191          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8192$as_echo_n "checking for FIND... " >&6; }
8193          if test ! -x "$tool_specified"; then
8194            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8195$as_echo "not found" >&6; }
8196            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8197          fi
8198          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8199$as_echo "$tool_specified" >&6; }
8200        fi
8201      fi
8202    fi
8203
8204  fi
8205
8206
8207
8208  if test "x$FIND" = x; then
8209    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8210  fi
8211
8212
8213
8214
8215
8216  # Publish this variable in the help.
8217
8218
8219  if [ -z "${HEAD+x}" ]; then
8220    # The variable is not set by user, try to locate tool using the code snippet
8221    for ac_prog in head
8222do
8223  # Extract the first word of "$ac_prog", so it can be a program name with args.
8224set dummy $ac_prog; ac_word=$2
8225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8226$as_echo_n "checking for $ac_word... " >&6; }
8227if ${ac_cv_path_HEAD+:} false; then :
8228  $as_echo_n "(cached) " >&6
8229else
8230  case $HEAD in
8231  [\\/]* | ?:[\\/]*)
8232  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8233  ;;
8234  *)
8235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8236for as_dir in $PATH
8237do
8238  IFS=$as_save_IFS
8239  test -z "$as_dir" && as_dir=.
8240    for ac_exec_ext in '' $ac_executable_extensions; do
8241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8242    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8244    break 2
8245  fi
8246done
8247  done
8248IFS=$as_save_IFS
8249
8250  ;;
8251esac
8252fi
8253HEAD=$ac_cv_path_HEAD
8254if test -n "$HEAD"; then
8255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8256$as_echo "$HEAD" >&6; }
8257else
8258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8259$as_echo "no" >&6; }
8260fi
8261
8262
8263  test -n "$HEAD" && break
8264done
8265
8266  else
8267    # The variable is set, but is it from the command line or the environment?
8268
8269    # Try to remove the string !HEAD! from our list.
8270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8272      # If it failed, the variable was not from the command line. Ignore it,
8273      # but warn the user (except for BASH, which is always set by the calling BASH).
8274      if test "xHEAD" != xBASH; then
8275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8276$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8277      fi
8278      # Try to locate tool using the code snippet
8279      for ac_prog in head
8280do
8281  # Extract the first word of "$ac_prog", so it can be a program name with args.
8282set dummy $ac_prog; ac_word=$2
8283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8284$as_echo_n "checking for $ac_word... " >&6; }
8285if ${ac_cv_path_HEAD+:} false; then :
8286  $as_echo_n "(cached) " >&6
8287else
8288  case $HEAD in
8289  [\\/]* | ?:[\\/]*)
8290  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8291  ;;
8292  *)
8293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8294for as_dir in $PATH
8295do
8296  IFS=$as_save_IFS
8297  test -z "$as_dir" && as_dir=.
8298    for ac_exec_ext in '' $ac_executable_extensions; do
8299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8300    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8302    break 2
8303  fi
8304done
8305  done
8306IFS=$as_save_IFS
8307
8308  ;;
8309esac
8310fi
8311HEAD=$ac_cv_path_HEAD
8312if test -n "$HEAD"; then
8313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8314$as_echo "$HEAD" >&6; }
8315else
8316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8317$as_echo "no" >&6; }
8318fi
8319
8320
8321  test -n "$HEAD" && break
8322done
8323
8324    else
8325      # If it succeeded, then it was overridden by the user. We will use it
8326      # for the tool.
8327
8328      # First remove it from the list of overridden variables, so we can test
8329      # for unknown variables in the end.
8330      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8331
8332      # Check if we try to supply an empty value
8333      if test "x$HEAD" = x; then
8334        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8335$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8336        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8337$as_echo_n "checking for HEAD... " >&6; }
8338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8339$as_echo "disabled" >&6; }
8340      else
8341        # Check if the provided tool contains a complete path.
8342        tool_specified="$HEAD"
8343        tool_basename="${tool_specified##*/}"
8344        if test "x$tool_basename" = "x$tool_specified"; then
8345          # A command without a complete path is provided, search $PATH.
8346          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8347$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8348          # Extract the first word of "$tool_basename", so it can be a program name with args.
8349set dummy $tool_basename; ac_word=$2
8350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8351$as_echo_n "checking for $ac_word... " >&6; }
8352if ${ac_cv_path_HEAD+:} false; then :
8353  $as_echo_n "(cached) " >&6
8354else
8355  case $HEAD in
8356  [\\/]* | ?:[\\/]*)
8357  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8358  ;;
8359  *)
8360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8361for as_dir in $PATH
8362do
8363  IFS=$as_save_IFS
8364  test -z "$as_dir" && as_dir=.
8365    for ac_exec_ext in '' $ac_executable_extensions; do
8366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8367    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8369    break 2
8370  fi
8371done
8372  done
8373IFS=$as_save_IFS
8374
8375  ;;
8376esac
8377fi
8378HEAD=$ac_cv_path_HEAD
8379if test -n "$HEAD"; then
8380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8381$as_echo "$HEAD" >&6; }
8382else
8383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8384$as_echo "no" >&6; }
8385fi
8386
8387
8388          if test "x$HEAD" = x; then
8389            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8390          fi
8391        else
8392          # Otherwise we believe it is a complete path. Use it as it is.
8393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8394$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8395          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8396$as_echo_n "checking for HEAD... " >&6; }
8397          if test ! -x "$tool_specified"; then
8398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8399$as_echo "not found" >&6; }
8400            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8401          fi
8402          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8403$as_echo "$tool_specified" >&6; }
8404        fi
8405      fi
8406    fi
8407
8408  fi
8409
8410
8411
8412  if test "x$HEAD" = x; then
8413    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8414  fi
8415
8416
8417
8418
8419
8420  # Publish this variable in the help.
8421
8422
8423  if [ -z "${GUNZIP+x}" ]; then
8424    # The variable is not set by user, try to locate tool using the code snippet
8425    for ac_prog in gunzip
8426do
8427  # Extract the first word of "$ac_prog", so it can be a program name with args.
8428set dummy $ac_prog; ac_word=$2
8429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8430$as_echo_n "checking for $ac_word... " >&6; }
8431if ${ac_cv_path_GUNZIP+:} false; then :
8432  $as_echo_n "(cached) " >&6
8433else
8434  case $GUNZIP in
8435  [\\/]* | ?:[\\/]*)
8436  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8437  ;;
8438  *)
8439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8440for as_dir in $PATH
8441do
8442  IFS=$as_save_IFS
8443  test -z "$as_dir" && as_dir=.
8444    for ac_exec_ext in '' $ac_executable_extensions; do
8445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8446    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8448    break 2
8449  fi
8450done
8451  done
8452IFS=$as_save_IFS
8453
8454  ;;
8455esac
8456fi
8457GUNZIP=$ac_cv_path_GUNZIP
8458if test -n "$GUNZIP"; then
8459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8460$as_echo "$GUNZIP" >&6; }
8461else
8462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8463$as_echo "no" >&6; }
8464fi
8465
8466
8467  test -n "$GUNZIP" && break
8468done
8469
8470  else
8471    # The variable is set, but is it from the command line or the environment?
8472
8473    # Try to remove the string !GUNZIP! from our list.
8474    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8475    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8476      # If it failed, the variable was not from the command line. Ignore it,
8477      # but warn the user (except for BASH, which is always set by the calling BASH).
8478      if test "xGUNZIP" != xBASH; then
8479        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8480$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8481      fi
8482      # Try to locate tool using the code snippet
8483      for ac_prog in gunzip
8484do
8485  # Extract the first word of "$ac_prog", so it can be a program name with args.
8486set dummy $ac_prog; ac_word=$2
8487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8488$as_echo_n "checking for $ac_word... " >&6; }
8489if ${ac_cv_path_GUNZIP+:} false; then :
8490  $as_echo_n "(cached) " >&6
8491else
8492  case $GUNZIP in
8493  [\\/]* | ?:[\\/]*)
8494  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8495  ;;
8496  *)
8497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8498for as_dir in $PATH
8499do
8500  IFS=$as_save_IFS
8501  test -z "$as_dir" && as_dir=.
8502    for ac_exec_ext in '' $ac_executable_extensions; do
8503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8504    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8506    break 2
8507  fi
8508done
8509  done
8510IFS=$as_save_IFS
8511
8512  ;;
8513esac
8514fi
8515GUNZIP=$ac_cv_path_GUNZIP
8516if test -n "$GUNZIP"; then
8517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8518$as_echo "$GUNZIP" >&6; }
8519else
8520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8521$as_echo "no" >&6; }
8522fi
8523
8524
8525  test -n "$GUNZIP" && break
8526done
8527
8528    else
8529      # If it succeeded, then it was overridden by the user. We will use it
8530      # for the tool.
8531
8532      # First remove it from the list of overridden variables, so we can test
8533      # for unknown variables in the end.
8534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8535
8536      # Check if we try to supply an empty value
8537      if test "x$GUNZIP" = x; then
8538        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8539$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8540        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8541$as_echo_n "checking for GUNZIP... " >&6; }
8542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8543$as_echo "disabled" >&6; }
8544      else
8545        # Check if the provided tool contains a complete path.
8546        tool_specified="$GUNZIP"
8547        tool_basename="${tool_specified##*/}"
8548        if test "x$tool_basename" = "x$tool_specified"; then
8549          # A command without a complete path is provided, search $PATH.
8550          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8551$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8552          # Extract the first word of "$tool_basename", so it can be a program name with args.
8553set dummy $tool_basename; ac_word=$2
8554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8555$as_echo_n "checking for $ac_word... " >&6; }
8556if ${ac_cv_path_GUNZIP+:} false; then :
8557  $as_echo_n "(cached) " >&6
8558else
8559  case $GUNZIP in
8560  [\\/]* | ?:[\\/]*)
8561  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8562  ;;
8563  *)
8564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8565for as_dir in $PATH
8566do
8567  IFS=$as_save_IFS
8568  test -z "$as_dir" && as_dir=.
8569    for ac_exec_ext in '' $ac_executable_extensions; do
8570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8571    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8573    break 2
8574  fi
8575done
8576  done
8577IFS=$as_save_IFS
8578
8579  ;;
8580esac
8581fi
8582GUNZIP=$ac_cv_path_GUNZIP
8583if test -n "$GUNZIP"; then
8584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8585$as_echo "$GUNZIP" >&6; }
8586else
8587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8588$as_echo "no" >&6; }
8589fi
8590
8591
8592          if test "x$GUNZIP" = x; then
8593            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8594          fi
8595        else
8596          # Otherwise we believe it is a complete path. Use it as it is.
8597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8598$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8599          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8600$as_echo_n "checking for GUNZIP... " >&6; }
8601          if test ! -x "$tool_specified"; then
8602            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8603$as_echo "not found" >&6; }
8604            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8605          fi
8606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8607$as_echo "$tool_specified" >&6; }
8608        fi
8609      fi
8610    fi
8611
8612  fi
8613
8614
8615
8616  if test "x$GUNZIP" = x; then
8617    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8618  fi
8619
8620
8621
8622
8623
8624  # Publish this variable in the help.
8625
8626
8627  if [ -z "${GZIP+x}" ]; then
8628    # The variable is not set by user, try to locate tool using the code snippet
8629    for ac_prog in pigz gzip
8630do
8631  # Extract the first word of "$ac_prog", so it can be a program name with args.
8632set dummy $ac_prog; ac_word=$2
8633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8634$as_echo_n "checking for $ac_word... " >&6; }
8635if ${ac_cv_path_GZIP+:} false; then :
8636  $as_echo_n "(cached) " >&6
8637else
8638  case $GZIP in
8639  [\\/]* | ?:[\\/]*)
8640  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8641  ;;
8642  *)
8643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8644for as_dir in $PATH
8645do
8646  IFS=$as_save_IFS
8647  test -z "$as_dir" && as_dir=.
8648    for ac_exec_ext in '' $ac_executable_extensions; do
8649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8650    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8652    break 2
8653  fi
8654done
8655  done
8656IFS=$as_save_IFS
8657
8658  ;;
8659esac
8660fi
8661GZIP=$ac_cv_path_GZIP
8662if test -n "$GZIP"; then
8663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8664$as_echo "$GZIP" >&6; }
8665else
8666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8667$as_echo "no" >&6; }
8668fi
8669
8670
8671  test -n "$GZIP" && break
8672done
8673
8674  else
8675    # The variable is set, but is it from the command line or the environment?
8676
8677    # Try to remove the string !GZIP! from our list.
8678    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8679    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8680      # If it failed, the variable was not from the command line. Ignore it,
8681      # but warn the user (except for BASH, which is always set by the calling BASH).
8682      if test "xGZIP" != xBASH; then
8683        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8684$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8685      fi
8686      # Try to locate tool using the code snippet
8687      for ac_prog in pigz gzip
8688do
8689  # Extract the first word of "$ac_prog", so it can be a program name with args.
8690set dummy $ac_prog; ac_word=$2
8691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8692$as_echo_n "checking for $ac_word... " >&6; }
8693if ${ac_cv_path_GZIP+:} false; then :
8694  $as_echo_n "(cached) " >&6
8695else
8696  case $GZIP in
8697  [\\/]* | ?:[\\/]*)
8698  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8699  ;;
8700  *)
8701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8702for as_dir in $PATH
8703do
8704  IFS=$as_save_IFS
8705  test -z "$as_dir" && as_dir=.
8706    for ac_exec_ext in '' $ac_executable_extensions; do
8707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8708    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8710    break 2
8711  fi
8712done
8713  done
8714IFS=$as_save_IFS
8715
8716  ;;
8717esac
8718fi
8719GZIP=$ac_cv_path_GZIP
8720if test -n "$GZIP"; then
8721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8722$as_echo "$GZIP" >&6; }
8723else
8724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8725$as_echo "no" >&6; }
8726fi
8727
8728
8729  test -n "$GZIP" && break
8730done
8731
8732    else
8733      # If it succeeded, then it was overridden by the user. We will use it
8734      # for the tool.
8735
8736      # First remove it from the list of overridden variables, so we can test
8737      # for unknown variables in the end.
8738      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8739
8740      # Check if we try to supply an empty value
8741      if test "x$GZIP" = x; then
8742        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8743$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8745$as_echo_n "checking for GZIP... " >&6; }
8746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8747$as_echo "disabled" >&6; }
8748      else
8749        # Check if the provided tool contains a complete path.
8750        tool_specified="$GZIP"
8751        tool_basename="${tool_specified##*/}"
8752        if test "x$tool_basename" = "x$tool_specified"; then
8753          # A command without a complete path is provided, search $PATH.
8754          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8755$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8756          # Extract the first word of "$tool_basename", so it can be a program name with args.
8757set dummy $tool_basename; ac_word=$2
8758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8759$as_echo_n "checking for $ac_word... " >&6; }
8760if ${ac_cv_path_GZIP+:} false; then :
8761  $as_echo_n "(cached) " >&6
8762else
8763  case $GZIP in
8764  [\\/]* | ?:[\\/]*)
8765  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8766  ;;
8767  *)
8768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8769for as_dir in $PATH
8770do
8771  IFS=$as_save_IFS
8772  test -z "$as_dir" && as_dir=.
8773    for ac_exec_ext in '' $ac_executable_extensions; do
8774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8775    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8777    break 2
8778  fi
8779done
8780  done
8781IFS=$as_save_IFS
8782
8783  ;;
8784esac
8785fi
8786GZIP=$ac_cv_path_GZIP
8787if test -n "$GZIP"; then
8788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8789$as_echo "$GZIP" >&6; }
8790else
8791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8792$as_echo "no" >&6; }
8793fi
8794
8795
8796          if test "x$GZIP" = x; then
8797            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8798          fi
8799        else
8800          # Otherwise we believe it is a complete path. Use it as it is.
8801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8802$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8803          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8804$as_echo_n "checking for GZIP... " >&6; }
8805          if test ! -x "$tool_specified"; then
8806            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8807$as_echo "not found" >&6; }
8808            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8809          fi
8810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8811$as_echo "$tool_specified" >&6; }
8812        fi
8813      fi
8814    fi
8815
8816  fi
8817
8818
8819
8820  if test "x$GZIP" = x; then
8821    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8822  fi
8823
8824
8825
8826
8827
8828  # Publish this variable in the help.
8829
8830
8831  if [ -z "${LN+x}" ]; then
8832    # The variable is not set by user, try to locate tool using the code snippet
8833    for ac_prog in ln
8834do
8835  # Extract the first word of "$ac_prog", so it can be a program name with args.
8836set dummy $ac_prog; ac_word=$2
8837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8838$as_echo_n "checking for $ac_word... " >&6; }
8839if ${ac_cv_path_LN+:} false; then :
8840  $as_echo_n "(cached) " >&6
8841else
8842  case $LN in
8843  [\\/]* | ?:[\\/]*)
8844  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8845  ;;
8846  *)
8847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8848for as_dir in $PATH
8849do
8850  IFS=$as_save_IFS
8851  test -z "$as_dir" && as_dir=.
8852    for ac_exec_ext in '' $ac_executable_extensions; do
8853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8854    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8856    break 2
8857  fi
8858done
8859  done
8860IFS=$as_save_IFS
8861
8862  ;;
8863esac
8864fi
8865LN=$ac_cv_path_LN
8866if test -n "$LN"; then
8867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8868$as_echo "$LN" >&6; }
8869else
8870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8871$as_echo "no" >&6; }
8872fi
8873
8874
8875  test -n "$LN" && break
8876done
8877
8878  else
8879    # The variable is set, but is it from the command line or the environment?
8880
8881    # Try to remove the string !LN! from our list.
8882    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8883    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8884      # If it failed, the variable was not from the command line. Ignore it,
8885      # but warn the user (except for BASH, which is always set by the calling BASH).
8886      if test "xLN" != xBASH; then
8887        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8888$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8889      fi
8890      # Try to locate tool using the code snippet
8891      for ac_prog in ln
8892do
8893  # Extract the first word of "$ac_prog", so it can be a program name with args.
8894set dummy $ac_prog; ac_word=$2
8895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8896$as_echo_n "checking for $ac_word... " >&6; }
8897if ${ac_cv_path_LN+:} false; then :
8898  $as_echo_n "(cached) " >&6
8899else
8900  case $LN in
8901  [\\/]* | ?:[\\/]*)
8902  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8903  ;;
8904  *)
8905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8906for as_dir in $PATH
8907do
8908  IFS=$as_save_IFS
8909  test -z "$as_dir" && as_dir=.
8910    for ac_exec_ext in '' $ac_executable_extensions; do
8911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8912    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8914    break 2
8915  fi
8916done
8917  done
8918IFS=$as_save_IFS
8919
8920  ;;
8921esac
8922fi
8923LN=$ac_cv_path_LN
8924if test -n "$LN"; then
8925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8926$as_echo "$LN" >&6; }
8927else
8928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8929$as_echo "no" >&6; }
8930fi
8931
8932
8933  test -n "$LN" && break
8934done
8935
8936    else
8937      # If it succeeded, then it was overridden by the user. We will use it
8938      # for the tool.
8939
8940      # First remove it from the list of overridden variables, so we can test
8941      # for unknown variables in the end.
8942      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8943
8944      # Check if we try to supply an empty value
8945      if test "x$LN" = x; then
8946        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8947$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8948        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8949$as_echo_n "checking for LN... " >&6; }
8950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8951$as_echo "disabled" >&6; }
8952      else
8953        # Check if the provided tool contains a complete path.
8954        tool_specified="$LN"
8955        tool_basename="${tool_specified##*/}"
8956        if test "x$tool_basename" = "x$tool_specified"; then
8957          # A command without a complete path is provided, search $PATH.
8958          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8959$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8960          # Extract the first word of "$tool_basename", so it can be a program name with args.
8961set dummy $tool_basename; ac_word=$2
8962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8963$as_echo_n "checking for $ac_word... " >&6; }
8964if ${ac_cv_path_LN+:} false; then :
8965  $as_echo_n "(cached) " >&6
8966else
8967  case $LN in
8968  [\\/]* | ?:[\\/]*)
8969  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8970  ;;
8971  *)
8972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8973for as_dir in $PATH
8974do
8975  IFS=$as_save_IFS
8976  test -z "$as_dir" && as_dir=.
8977    for ac_exec_ext in '' $ac_executable_extensions; do
8978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8979    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8981    break 2
8982  fi
8983done
8984  done
8985IFS=$as_save_IFS
8986
8987  ;;
8988esac
8989fi
8990LN=$ac_cv_path_LN
8991if test -n "$LN"; then
8992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8993$as_echo "$LN" >&6; }
8994else
8995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8996$as_echo "no" >&6; }
8997fi
8998
8999
9000          if test "x$LN" = x; then
9001            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9002          fi
9003        else
9004          # Otherwise we believe it is a complete path. Use it as it is.
9005          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9006$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9007          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9008$as_echo_n "checking for LN... " >&6; }
9009          if test ! -x "$tool_specified"; then
9010            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9011$as_echo "not found" >&6; }
9012            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9013          fi
9014          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9015$as_echo "$tool_specified" >&6; }
9016        fi
9017      fi
9018    fi
9019
9020  fi
9021
9022
9023
9024  if test "x$LN" = x; then
9025    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9026  fi
9027
9028
9029
9030
9031
9032  # Publish this variable in the help.
9033
9034
9035  if [ -z "${LS+x}" ]; then
9036    # The variable is not set by user, try to locate tool using the code snippet
9037    for ac_prog in ls
9038do
9039  # Extract the first word of "$ac_prog", so it can be a program name with args.
9040set dummy $ac_prog; ac_word=$2
9041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9042$as_echo_n "checking for $ac_word... " >&6; }
9043if ${ac_cv_path_LS+:} false; then :
9044  $as_echo_n "(cached) " >&6
9045else
9046  case $LS in
9047  [\\/]* | ?:[\\/]*)
9048  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9049  ;;
9050  *)
9051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9052for as_dir in $PATH
9053do
9054  IFS=$as_save_IFS
9055  test -z "$as_dir" && as_dir=.
9056    for ac_exec_ext in '' $ac_executable_extensions; do
9057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9058    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9060    break 2
9061  fi
9062done
9063  done
9064IFS=$as_save_IFS
9065
9066  ;;
9067esac
9068fi
9069LS=$ac_cv_path_LS
9070if test -n "$LS"; then
9071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9072$as_echo "$LS" >&6; }
9073else
9074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9075$as_echo "no" >&6; }
9076fi
9077
9078
9079  test -n "$LS" && break
9080done
9081
9082  else
9083    # The variable is set, but is it from the command line or the environment?
9084
9085    # Try to remove the string !LS! from our list.
9086    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9087    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9088      # If it failed, the variable was not from the command line. Ignore it,
9089      # but warn the user (except for BASH, which is always set by the calling BASH).
9090      if test "xLS" != xBASH; then
9091        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9092$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9093      fi
9094      # Try to locate tool using the code snippet
9095      for ac_prog in ls
9096do
9097  # Extract the first word of "$ac_prog", so it can be a program name with args.
9098set dummy $ac_prog; ac_word=$2
9099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9100$as_echo_n "checking for $ac_word... " >&6; }
9101if ${ac_cv_path_LS+:} false; then :
9102  $as_echo_n "(cached) " >&6
9103else
9104  case $LS in
9105  [\\/]* | ?:[\\/]*)
9106  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9107  ;;
9108  *)
9109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9110for as_dir in $PATH
9111do
9112  IFS=$as_save_IFS
9113  test -z "$as_dir" && as_dir=.
9114    for ac_exec_ext in '' $ac_executable_extensions; do
9115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9116    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9118    break 2
9119  fi
9120done
9121  done
9122IFS=$as_save_IFS
9123
9124  ;;
9125esac
9126fi
9127LS=$ac_cv_path_LS
9128if test -n "$LS"; then
9129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9130$as_echo "$LS" >&6; }
9131else
9132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9133$as_echo "no" >&6; }
9134fi
9135
9136
9137  test -n "$LS" && break
9138done
9139
9140    else
9141      # If it succeeded, then it was overridden by the user. We will use it
9142      # for the tool.
9143
9144      # First remove it from the list of overridden variables, so we can test
9145      # for unknown variables in the end.
9146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9147
9148      # Check if we try to supply an empty value
9149      if test "x$LS" = x; then
9150        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9151$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9153$as_echo_n "checking for LS... " >&6; }
9154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9155$as_echo "disabled" >&6; }
9156      else
9157        # Check if the provided tool contains a complete path.
9158        tool_specified="$LS"
9159        tool_basename="${tool_specified##*/}"
9160        if test "x$tool_basename" = "x$tool_specified"; then
9161          # A command without a complete path is provided, search $PATH.
9162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9163$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9164          # Extract the first word of "$tool_basename", so it can be a program name with args.
9165set dummy $tool_basename; ac_word=$2
9166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9167$as_echo_n "checking for $ac_word... " >&6; }
9168if ${ac_cv_path_LS+:} false; then :
9169  $as_echo_n "(cached) " >&6
9170else
9171  case $LS in
9172  [\\/]* | ?:[\\/]*)
9173  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9174  ;;
9175  *)
9176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9177for as_dir in $PATH
9178do
9179  IFS=$as_save_IFS
9180  test -z "$as_dir" && as_dir=.
9181    for ac_exec_ext in '' $ac_executable_extensions; do
9182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9183    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9185    break 2
9186  fi
9187done
9188  done
9189IFS=$as_save_IFS
9190
9191  ;;
9192esac
9193fi
9194LS=$ac_cv_path_LS
9195if test -n "$LS"; then
9196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9197$as_echo "$LS" >&6; }
9198else
9199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9200$as_echo "no" >&6; }
9201fi
9202
9203
9204          if test "x$LS" = x; then
9205            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9206          fi
9207        else
9208          # Otherwise we believe it is a complete path. Use it as it is.
9209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9210$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9211          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9212$as_echo_n "checking for LS... " >&6; }
9213          if test ! -x "$tool_specified"; then
9214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9215$as_echo "not found" >&6; }
9216            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9217          fi
9218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9219$as_echo "$tool_specified" >&6; }
9220        fi
9221      fi
9222    fi
9223
9224  fi
9225
9226
9227
9228  if test "x$LS" = x; then
9229    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9230  fi
9231
9232
9233
9234
9235
9236  # Publish this variable in the help.
9237
9238
9239  if [ -z "${MKDIR+x}" ]; then
9240    # The variable is not set by user, try to locate tool using the code snippet
9241    for ac_prog in mkdir
9242do
9243  # Extract the first word of "$ac_prog", so it can be a program name with args.
9244set dummy $ac_prog; ac_word=$2
9245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9246$as_echo_n "checking for $ac_word... " >&6; }
9247if ${ac_cv_path_MKDIR+:} false; then :
9248  $as_echo_n "(cached) " >&6
9249else
9250  case $MKDIR in
9251  [\\/]* | ?:[\\/]*)
9252  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9253  ;;
9254  *)
9255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9256for as_dir in $PATH
9257do
9258  IFS=$as_save_IFS
9259  test -z "$as_dir" && as_dir=.
9260    for ac_exec_ext in '' $ac_executable_extensions; do
9261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9262    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9264    break 2
9265  fi
9266done
9267  done
9268IFS=$as_save_IFS
9269
9270  ;;
9271esac
9272fi
9273MKDIR=$ac_cv_path_MKDIR
9274if test -n "$MKDIR"; then
9275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9276$as_echo "$MKDIR" >&6; }
9277else
9278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9279$as_echo "no" >&6; }
9280fi
9281
9282
9283  test -n "$MKDIR" && break
9284done
9285
9286  else
9287    # The variable is set, but is it from the command line or the environment?
9288
9289    # Try to remove the string !MKDIR! from our list.
9290    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9291    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9292      # If it failed, the variable was not from the command line. Ignore it,
9293      # but warn the user (except for BASH, which is always set by the calling BASH).
9294      if test "xMKDIR" != xBASH; then
9295        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9296$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9297      fi
9298      # Try to locate tool using the code snippet
9299      for ac_prog in mkdir
9300do
9301  # Extract the first word of "$ac_prog", so it can be a program name with args.
9302set dummy $ac_prog; ac_word=$2
9303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9304$as_echo_n "checking for $ac_word... " >&6; }
9305if ${ac_cv_path_MKDIR+:} false; then :
9306  $as_echo_n "(cached) " >&6
9307else
9308  case $MKDIR in
9309  [\\/]* | ?:[\\/]*)
9310  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9311  ;;
9312  *)
9313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9314for as_dir in $PATH
9315do
9316  IFS=$as_save_IFS
9317  test -z "$as_dir" && as_dir=.
9318    for ac_exec_ext in '' $ac_executable_extensions; do
9319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9320    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9322    break 2
9323  fi
9324done
9325  done
9326IFS=$as_save_IFS
9327
9328  ;;
9329esac
9330fi
9331MKDIR=$ac_cv_path_MKDIR
9332if test -n "$MKDIR"; then
9333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9334$as_echo "$MKDIR" >&6; }
9335else
9336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9337$as_echo "no" >&6; }
9338fi
9339
9340
9341  test -n "$MKDIR" && break
9342done
9343
9344    else
9345      # If it succeeded, then it was overridden by the user. We will use it
9346      # for the tool.
9347
9348      # First remove it from the list of overridden variables, so we can test
9349      # for unknown variables in the end.
9350      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9351
9352      # Check if we try to supply an empty value
9353      if test "x$MKDIR" = x; then
9354        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9355$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9356        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9357$as_echo_n "checking for MKDIR... " >&6; }
9358        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9359$as_echo "disabled" >&6; }
9360      else
9361        # Check if the provided tool contains a complete path.
9362        tool_specified="$MKDIR"
9363        tool_basename="${tool_specified##*/}"
9364        if test "x$tool_basename" = "x$tool_specified"; then
9365          # A command without a complete path is provided, search $PATH.
9366          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9367$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9368          # Extract the first word of "$tool_basename", so it can be a program name with args.
9369set dummy $tool_basename; ac_word=$2
9370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9371$as_echo_n "checking for $ac_word... " >&6; }
9372if ${ac_cv_path_MKDIR+:} false; then :
9373  $as_echo_n "(cached) " >&6
9374else
9375  case $MKDIR in
9376  [\\/]* | ?:[\\/]*)
9377  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9378  ;;
9379  *)
9380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9381for as_dir in $PATH
9382do
9383  IFS=$as_save_IFS
9384  test -z "$as_dir" && as_dir=.
9385    for ac_exec_ext in '' $ac_executable_extensions; do
9386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9387    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9389    break 2
9390  fi
9391done
9392  done
9393IFS=$as_save_IFS
9394
9395  ;;
9396esac
9397fi
9398MKDIR=$ac_cv_path_MKDIR
9399if test -n "$MKDIR"; then
9400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9401$as_echo "$MKDIR" >&6; }
9402else
9403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9404$as_echo "no" >&6; }
9405fi
9406
9407
9408          if test "x$MKDIR" = x; then
9409            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9410          fi
9411        else
9412          # Otherwise we believe it is a complete path. Use it as it is.
9413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9414$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9415          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9416$as_echo_n "checking for MKDIR... " >&6; }
9417          if test ! -x "$tool_specified"; then
9418            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9419$as_echo "not found" >&6; }
9420            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9421          fi
9422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9423$as_echo "$tool_specified" >&6; }
9424        fi
9425      fi
9426    fi
9427
9428  fi
9429
9430
9431
9432  if test "x$MKDIR" = x; then
9433    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9434  fi
9435
9436
9437
9438
9439
9440  # Publish this variable in the help.
9441
9442
9443  if [ -z "${MKTEMP+x}" ]; then
9444    # The variable is not set by user, try to locate tool using the code snippet
9445    for ac_prog in mktemp
9446do
9447  # Extract the first word of "$ac_prog", so it can be a program name with args.
9448set dummy $ac_prog; ac_word=$2
9449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9450$as_echo_n "checking for $ac_word... " >&6; }
9451if ${ac_cv_path_MKTEMP+:} false; then :
9452  $as_echo_n "(cached) " >&6
9453else
9454  case $MKTEMP in
9455  [\\/]* | ?:[\\/]*)
9456  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9457  ;;
9458  *)
9459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9460for as_dir in $PATH
9461do
9462  IFS=$as_save_IFS
9463  test -z "$as_dir" && as_dir=.
9464    for ac_exec_ext in '' $ac_executable_extensions; do
9465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9466    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9468    break 2
9469  fi
9470done
9471  done
9472IFS=$as_save_IFS
9473
9474  ;;
9475esac
9476fi
9477MKTEMP=$ac_cv_path_MKTEMP
9478if test -n "$MKTEMP"; then
9479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9480$as_echo "$MKTEMP" >&6; }
9481else
9482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9483$as_echo "no" >&6; }
9484fi
9485
9486
9487  test -n "$MKTEMP" && break
9488done
9489
9490  else
9491    # The variable is set, but is it from the command line or the environment?
9492
9493    # Try to remove the string !MKTEMP! from our list.
9494    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9495    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9496      # If it failed, the variable was not from the command line. Ignore it,
9497      # but warn the user (except for BASH, which is always set by the calling BASH).
9498      if test "xMKTEMP" != xBASH; then
9499        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9500$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9501      fi
9502      # Try to locate tool using the code snippet
9503      for ac_prog in mktemp
9504do
9505  # Extract the first word of "$ac_prog", so it can be a program name with args.
9506set dummy $ac_prog; ac_word=$2
9507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9508$as_echo_n "checking for $ac_word... " >&6; }
9509if ${ac_cv_path_MKTEMP+:} false; then :
9510  $as_echo_n "(cached) " >&6
9511else
9512  case $MKTEMP in
9513  [\\/]* | ?:[\\/]*)
9514  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9515  ;;
9516  *)
9517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9518for as_dir in $PATH
9519do
9520  IFS=$as_save_IFS
9521  test -z "$as_dir" && as_dir=.
9522    for ac_exec_ext in '' $ac_executable_extensions; do
9523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9524    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9526    break 2
9527  fi
9528done
9529  done
9530IFS=$as_save_IFS
9531
9532  ;;
9533esac
9534fi
9535MKTEMP=$ac_cv_path_MKTEMP
9536if test -n "$MKTEMP"; then
9537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9538$as_echo "$MKTEMP" >&6; }
9539else
9540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541$as_echo "no" >&6; }
9542fi
9543
9544
9545  test -n "$MKTEMP" && break
9546done
9547
9548    else
9549      # If it succeeded, then it was overridden by the user. We will use it
9550      # for the tool.
9551
9552      # First remove it from the list of overridden variables, so we can test
9553      # for unknown variables in the end.
9554      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9555
9556      # Check if we try to supply an empty value
9557      if test "x$MKTEMP" = x; then
9558        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9559$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9560        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9561$as_echo_n "checking for MKTEMP... " >&6; }
9562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9563$as_echo "disabled" >&6; }
9564      else
9565        # Check if the provided tool contains a complete path.
9566        tool_specified="$MKTEMP"
9567        tool_basename="${tool_specified##*/}"
9568        if test "x$tool_basename" = "x$tool_specified"; then
9569          # A command without a complete path is provided, search $PATH.
9570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9571$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9572          # Extract the first word of "$tool_basename", so it can be a program name with args.
9573set dummy $tool_basename; ac_word=$2
9574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9575$as_echo_n "checking for $ac_word... " >&6; }
9576if ${ac_cv_path_MKTEMP+:} false; then :
9577  $as_echo_n "(cached) " >&6
9578else
9579  case $MKTEMP in
9580  [\\/]* | ?:[\\/]*)
9581  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9582  ;;
9583  *)
9584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9585for as_dir in $PATH
9586do
9587  IFS=$as_save_IFS
9588  test -z "$as_dir" && as_dir=.
9589    for ac_exec_ext in '' $ac_executable_extensions; do
9590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9591    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9593    break 2
9594  fi
9595done
9596  done
9597IFS=$as_save_IFS
9598
9599  ;;
9600esac
9601fi
9602MKTEMP=$ac_cv_path_MKTEMP
9603if test -n "$MKTEMP"; then
9604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9605$as_echo "$MKTEMP" >&6; }
9606else
9607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9608$as_echo "no" >&6; }
9609fi
9610
9611
9612          if test "x$MKTEMP" = x; then
9613            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9614          fi
9615        else
9616          # Otherwise we believe it is a complete path. Use it as it is.
9617          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9618$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9619          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9620$as_echo_n "checking for MKTEMP... " >&6; }
9621          if test ! -x "$tool_specified"; then
9622            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9623$as_echo "not found" >&6; }
9624            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9625          fi
9626          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9627$as_echo "$tool_specified" >&6; }
9628        fi
9629      fi
9630    fi
9631
9632  fi
9633
9634
9635
9636  if test "x$MKTEMP" = x; then
9637    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9638  fi
9639
9640
9641
9642
9643
9644  # Publish this variable in the help.
9645
9646
9647  if [ -z "${MV+x}" ]; then
9648    # The variable is not set by user, try to locate tool using the code snippet
9649    for ac_prog in mv
9650do
9651  # Extract the first word of "$ac_prog", so it can be a program name with args.
9652set dummy $ac_prog; ac_word=$2
9653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9654$as_echo_n "checking for $ac_word... " >&6; }
9655if ${ac_cv_path_MV+:} false; then :
9656  $as_echo_n "(cached) " >&6
9657else
9658  case $MV in
9659  [\\/]* | ?:[\\/]*)
9660  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9661  ;;
9662  *)
9663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9664for as_dir in $PATH
9665do
9666  IFS=$as_save_IFS
9667  test -z "$as_dir" && as_dir=.
9668    for ac_exec_ext in '' $ac_executable_extensions; do
9669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9670    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9672    break 2
9673  fi
9674done
9675  done
9676IFS=$as_save_IFS
9677
9678  ;;
9679esac
9680fi
9681MV=$ac_cv_path_MV
9682if test -n "$MV"; then
9683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9684$as_echo "$MV" >&6; }
9685else
9686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9687$as_echo "no" >&6; }
9688fi
9689
9690
9691  test -n "$MV" && break
9692done
9693
9694  else
9695    # The variable is set, but is it from the command line or the environment?
9696
9697    # Try to remove the string !MV! from our list.
9698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9700      # If it failed, the variable was not from the command line. Ignore it,
9701      # but warn the user (except for BASH, which is always set by the calling BASH).
9702      if test "xMV" != xBASH; then
9703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9704$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9705      fi
9706      # Try to locate tool using the code snippet
9707      for ac_prog in mv
9708do
9709  # Extract the first word of "$ac_prog", so it can be a program name with args.
9710set dummy $ac_prog; ac_word=$2
9711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9712$as_echo_n "checking for $ac_word... " >&6; }
9713if ${ac_cv_path_MV+:} false; then :
9714  $as_echo_n "(cached) " >&6
9715else
9716  case $MV in
9717  [\\/]* | ?:[\\/]*)
9718  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9719  ;;
9720  *)
9721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9722for as_dir in $PATH
9723do
9724  IFS=$as_save_IFS
9725  test -z "$as_dir" && as_dir=.
9726    for ac_exec_ext in '' $ac_executable_extensions; do
9727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9728    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9730    break 2
9731  fi
9732done
9733  done
9734IFS=$as_save_IFS
9735
9736  ;;
9737esac
9738fi
9739MV=$ac_cv_path_MV
9740if test -n "$MV"; then
9741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9742$as_echo "$MV" >&6; }
9743else
9744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9745$as_echo "no" >&6; }
9746fi
9747
9748
9749  test -n "$MV" && break
9750done
9751
9752    else
9753      # If it succeeded, then it was overridden by the user. We will use it
9754      # for the tool.
9755
9756      # First remove it from the list of overridden variables, so we can test
9757      # for unknown variables in the end.
9758      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9759
9760      # Check if we try to supply an empty value
9761      if test "x$MV" = x; then
9762        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9763$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9765$as_echo_n "checking for MV... " >&6; }
9766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9767$as_echo "disabled" >&6; }
9768      else
9769        # Check if the provided tool contains a complete path.
9770        tool_specified="$MV"
9771        tool_basename="${tool_specified##*/}"
9772        if test "x$tool_basename" = "x$tool_specified"; then
9773          # A command without a complete path is provided, search $PATH.
9774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9775$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9776          # Extract the first word of "$tool_basename", so it can be a program name with args.
9777set dummy $tool_basename; ac_word=$2
9778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9779$as_echo_n "checking for $ac_word... " >&6; }
9780if ${ac_cv_path_MV+:} false; then :
9781  $as_echo_n "(cached) " >&6
9782else
9783  case $MV in
9784  [\\/]* | ?:[\\/]*)
9785  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9786  ;;
9787  *)
9788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9789for as_dir in $PATH
9790do
9791  IFS=$as_save_IFS
9792  test -z "$as_dir" && as_dir=.
9793    for ac_exec_ext in '' $ac_executable_extensions; do
9794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9795    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9797    break 2
9798  fi
9799done
9800  done
9801IFS=$as_save_IFS
9802
9803  ;;
9804esac
9805fi
9806MV=$ac_cv_path_MV
9807if test -n "$MV"; then
9808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9809$as_echo "$MV" >&6; }
9810else
9811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9812$as_echo "no" >&6; }
9813fi
9814
9815
9816          if test "x$MV" = x; then
9817            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9818          fi
9819        else
9820          # Otherwise we believe it is a complete path. Use it as it is.
9821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9822$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9823          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9824$as_echo_n "checking for MV... " >&6; }
9825          if test ! -x "$tool_specified"; then
9826            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9827$as_echo "not found" >&6; }
9828            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9829          fi
9830          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9831$as_echo "$tool_specified" >&6; }
9832        fi
9833      fi
9834    fi
9835
9836  fi
9837
9838
9839
9840  if test "x$MV" = x; then
9841    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9842  fi
9843
9844
9845
9846
9847
9848  # Publish this variable in the help.
9849
9850
9851  if [ -z "${NAWK+x}" ]; then
9852    # The variable is not set by user, try to locate tool using the code snippet
9853    for ac_prog in nawk gawk awk
9854do
9855  # Extract the first word of "$ac_prog", so it can be a program name with args.
9856set dummy $ac_prog; ac_word=$2
9857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9858$as_echo_n "checking for $ac_word... " >&6; }
9859if ${ac_cv_path_NAWK+:} false; then :
9860  $as_echo_n "(cached) " >&6
9861else
9862  case $NAWK in
9863  [\\/]* | ?:[\\/]*)
9864  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9865  ;;
9866  *)
9867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9868for as_dir in $PATH
9869do
9870  IFS=$as_save_IFS
9871  test -z "$as_dir" && as_dir=.
9872    for ac_exec_ext in '' $ac_executable_extensions; do
9873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9874    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9876    break 2
9877  fi
9878done
9879  done
9880IFS=$as_save_IFS
9881
9882  ;;
9883esac
9884fi
9885NAWK=$ac_cv_path_NAWK
9886if test -n "$NAWK"; then
9887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9888$as_echo "$NAWK" >&6; }
9889else
9890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9891$as_echo "no" >&6; }
9892fi
9893
9894
9895  test -n "$NAWK" && break
9896done
9897
9898  else
9899    # The variable is set, but is it from the command line or the environment?
9900
9901    # Try to remove the string !NAWK! from our list.
9902    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9903    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9904      # If it failed, the variable was not from the command line. Ignore it,
9905      # but warn the user (except for BASH, which is always set by the calling BASH).
9906      if test "xNAWK" != xBASH; then
9907        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9908$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9909      fi
9910      # Try to locate tool using the code snippet
9911      for ac_prog in nawk gawk awk
9912do
9913  # Extract the first word of "$ac_prog", so it can be a program name with args.
9914set dummy $ac_prog; ac_word=$2
9915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9916$as_echo_n "checking for $ac_word... " >&6; }
9917if ${ac_cv_path_NAWK+:} false; then :
9918  $as_echo_n "(cached) " >&6
9919else
9920  case $NAWK in
9921  [\\/]* | ?:[\\/]*)
9922  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9923  ;;
9924  *)
9925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9926for as_dir in $PATH
9927do
9928  IFS=$as_save_IFS
9929  test -z "$as_dir" && as_dir=.
9930    for ac_exec_ext in '' $ac_executable_extensions; do
9931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9932    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9934    break 2
9935  fi
9936done
9937  done
9938IFS=$as_save_IFS
9939
9940  ;;
9941esac
9942fi
9943NAWK=$ac_cv_path_NAWK
9944if test -n "$NAWK"; then
9945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9946$as_echo "$NAWK" >&6; }
9947else
9948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9949$as_echo "no" >&6; }
9950fi
9951
9952
9953  test -n "$NAWK" && break
9954done
9955
9956    else
9957      # If it succeeded, then it was overridden by the user. We will use it
9958      # for the tool.
9959
9960      # First remove it from the list of overridden variables, so we can test
9961      # for unknown variables in the end.
9962      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9963
9964      # Check if we try to supply an empty value
9965      if test "x$NAWK" = x; then
9966        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9967$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9968        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9969$as_echo_n "checking for NAWK... " >&6; }
9970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9971$as_echo "disabled" >&6; }
9972      else
9973        # Check if the provided tool contains a complete path.
9974        tool_specified="$NAWK"
9975        tool_basename="${tool_specified##*/}"
9976        if test "x$tool_basename" = "x$tool_specified"; then
9977          # A command without a complete path is provided, search $PATH.
9978          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9979$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9980          # Extract the first word of "$tool_basename", so it can be a program name with args.
9981set dummy $tool_basename; ac_word=$2
9982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9983$as_echo_n "checking for $ac_word... " >&6; }
9984if ${ac_cv_path_NAWK+:} false; then :
9985  $as_echo_n "(cached) " >&6
9986else
9987  case $NAWK in
9988  [\\/]* | ?:[\\/]*)
9989  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9990  ;;
9991  *)
9992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9993for as_dir in $PATH
9994do
9995  IFS=$as_save_IFS
9996  test -z "$as_dir" && as_dir=.
9997    for ac_exec_ext in '' $ac_executable_extensions; do
9998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9999    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10001    break 2
10002  fi
10003done
10004  done
10005IFS=$as_save_IFS
10006
10007  ;;
10008esac
10009fi
10010NAWK=$ac_cv_path_NAWK
10011if test -n "$NAWK"; then
10012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10013$as_echo "$NAWK" >&6; }
10014else
10015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10016$as_echo "no" >&6; }
10017fi
10018
10019
10020          if test "x$NAWK" = x; then
10021            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10022          fi
10023        else
10024          # Otherwise we believe it is a complete path. Use it as it is.
10025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10026$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10027          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10028$as_echo_n "checking for NAWK... " >&6; }
10029          if test ! -x "$tool_specified"; then
10030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10031$as_echo "not found" >&6; }
10032            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10033          fi
10034          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10035$as_echo "$tool_specified" >&6; }
10036        fi
10037      fi
10038    fi
10039
10040  fi
10041
10042
10043
10044  if test "x$NAWK" = x; then
10045    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10046  fi
10047
10048
10049
10050
10051
10052  # Publish this variable in the help.
10053
10054
10055  if [ -z "${PRINTF+x}" ]; then
10056    # The variable is not set by user, try to locate tool using the code snippet
10057    for ac_prog in printf
10058do
10059  # Extract the first word of "$ac_prog", so it can be a program name with args.
10060set dummy $ac_prog; ac_word=$2
10061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10062$as_echo_n "checking for $ac_word... " >&6; }
10063if ${ac_cv_path_PRINTF+:} false; then :
10064  $as_echo_n "(cached) " >&6
10065else
10066  case $PRINTF in
10067  [\\/]* | ?:[\\/]*)
10068  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10069  ;;
10070  *)
10071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10072for as_dir in $PATH
10073do
10074  IFS=$as_save_IFS
10075  test -z "$as_dir" && as_dir=.
10076    for ac_exec_ext in '' $ac_executable_extensions; do
10077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10078    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10080    break 2
10081  fi
10082done
10083  done
10084IFS=$as_save_IFS
10085
10086  ;;
10087esac
10088fi
10089PRINTF=$ac_cv_path_PRINTF
10090if test -n "$PRINTF"; then
10091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10092$as_echo "$PRINTF" >&6; }
10093else
10094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10095$as_echo "no" >&6; }
10096fi
10097
10098
10099  test -n "$PRINTF" && break
10100done
10101
10102  else
10103    # The variable is set, but is it from the command line or the environment?
10104
10105    # Try to remove the string !PRINTF! from our list.
10106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10108      # If it failed, the variable was not from the command line. Ignore it,
10109      # but warn the user (except for BASH, which is always set by the calling BASH).
10110      if test "xPRINTF" != xBASH; then
10111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10112$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10113      fi
10114      # Try to locate tool using the code snippet
10115      for ac_prog in printf
10116do
10117  # Extract the first word of "$ac_prog", so it can be a program name with args.
10118set dummy $ac_prog; ac_word=$2
10119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10120$as_echo_n "checking for $ac_word... " >&6; }
10121if ${ac_cv_path_PRINTF+:} false; then :
10122  $as_echo_n "(cached) " >&6
10123else
10124  case $PRINTF in
10125  [\\/]* | ?:[\\/]*)
10126  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10127  ;;
10128  *)
10129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10130for as_dir in $PATH
10131do
10132  IFS=$as_save_IFS
10133  test -z "$as_dir" && as_dir=.
10134    for ac_exec_ext in '' $ac_executable_extensions; do
10135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10136    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10138    break 2
10139  fi
10140done
10141  done
10142IFS=$as_save_IFS
10143
10144  ;;
10145esac
10146fi
10147PRINTF=$ac_cv_path_PRINTF
10148if test -n "$PRINTF"; then
10149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10150$as_echo "$PRINTF" >&6; }
10151else
10152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10153$as_echo "no" >&6; }
10154fi
10155
10156
10157  test -n "$PRINTF" && break
10158done
10159
10160    else
10161      # If it succeeded, then it was overridden by the user. We will use it
10162      # for the tool.
10163
10164      # First remove it from the list of overridden variables, so we can test
10165      # for unknown variables in the end.
10166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10167
10168      # Check if we try to supply an empty value
10169      if test "x$PRINTF" = x; then
10170        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10171$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10173$as_echo_n "checking for PRINTF... " >&6; }
10174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10175$as_echo "disabled" >&6; }
10176      else
10177        # Check if the provided tool contains a complete path.
10178        tool_specified="$PRINTF"
10179        tool_basename="${tool_specified##*/}"
10180        if test "x$tool_basename" = "x$tool_specified"; then
10181          # A command without a complete path is provided, search $PATH.
10182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10183$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10184          # Extract the first word of "$tool_basename", so it can be a program name with args.
10185set dummy $tool_basename; ac_word=$2
10186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10187$as_echo_n "checking for $ac_word... " >&6; }
10188if ${ac_cv_path_PRINTF+:} false; then :
10189  $as_echo_n "(cached) " >&6
10190else
10191  case $PRINTF in
10192  [\\/]* | ?:[\\/]*)
10193  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10194  ;;
10195  *)
10196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10197for as_dir in $PATH
10198do
10199  IFS=$as_save_IFS
10200  test -z "$as_dir" && as_dir=.
10201    for ac_exec_ext in '' $ac_executable_extensions; do
10202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10203    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10205    break 2
10206  fi
10207done
10208  done
10209IFS=$as_save_IFS
10210
10211  ;;
10212esac
10213fi
10214PRINTF=$ac_cv_path_PRINTF
10215if test -n "$PRINTF"; then
10216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10217$as_echo "$PRINTF" >&6; }
10218else
10219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10220$as_echo "no" >&6; }
10221fi
10222
10223
10224          if test "x$PRINTF" = x; then
10225            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10226          fi
10227        else
10228          # Otherwise we believe it is a complete path. Use it as it is.
10229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10230$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10231          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10232$as_echo_n "checking for PRINTF... " >&6; }
10233          if test ! -x "$tool_specified"; then
10234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10235$as_echo "not found" >&6; }
10236            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10237          fi
10238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10239$as_echo "$tool_specified" >&6; }
10240        fi
10241      fi
10242    fi
10243
10244  fi
10245
10246
10247
10248  if test "x$PRINTF" = x; then
10249    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10250  fi
10251
10252
10253
10254
10255
10256  # Publish this variable in the help.
10257
10258
10259  if [ -z "${RM+x}" ]; then
10260    # The variable is not set by user, try to locate tool using the code snippet
10261    for ac_prog in rm
10262do
10263  # Extract the first word of "$ac_prog", so it can be a program name with args.
10264set dummy $ac_prog; ac_word=$2
10265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10266$as_echo_n "checking for $ac_word... " >&6; }
10267if ${ac_cv_path_RM+:} false; then :
10268  $as_echo_n "(cached) " >&6
10269else
10270  case $RM in
10271  [\\/]* | ?:[\\/]*)
10272  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10273  ;;
10274  *)
10275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10276for as_dir in $PATH
10277do
10278  IFS=$as_save_IFS
10279  test -z "$as_dir" && as_dir=.
10280    for ac_exec_ext in '' $ac_executable_extensions; do
10281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10282    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10284    break 2
10285  fi
10286done
10287  done
10288IFS=$as_save_IFS
10289
10290  ;;
10291esac
10292fi
10293RM=$ac_cv_path_RM
10294if test -n "$RM"; then
10295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10296$as_echo "$RM" >&6; }
10297else
10298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10299$as_echo "no" >&6; }
10300fi
10301
10302
10303  test -n "$RM" && break
10304done
10305
10306  else
10307    # The variable is set, but is it from the command line or the environment?
10308
10309    # Try to remove the string !RM! from our list.
10310    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10311    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10312      # If it failed, the variable was not from the command line. Ignore it,
10313      # but warn the user (except for BASH, which is always set by the calling BASH).
10314      if test "xRM" != xBASH; then
10315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10316$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10317      fi
10318      # Try to locate tool using the code snippet
10319      for ac_prog in rm
10320do
10321  # Extract the first word of "$ac_prog", so it can be a program name with args.
10322set dummy $ac_prog; ac_word=$2
10323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10324$as_echo_n "checking for $ac_word... " >&6; }
10325if ${ac_cv_path_RM+:} false; then :
10326  $as_echo_n "(cached) " >&6
10327else
10328  case $RM in
10329  [\\/]* | ?:[\\/]*)
10330  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10331  ;;
10332  *)
10333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10334for as_dir in $PATH
10335do
10336  IFS=$as_save_IFS
10337  test -z "$as_dir" && as_dir=.
10338    for ac_exec_ext in '' $ac_executable_extensions; do
10339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10340    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10342    break 2
10343  fi
10344done
10345  done
10346IFS=$as_save_IFS
10347
10348  ;;
10349esac
10350fi
10351RM=$ac_cv_path_RM
10352if test -n "$RM"; then
10353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10354$as_echo "$RM" >&6; }
10355else
10356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10357$as_echo "no" >&6; }
10358fi
10359
10360
10361  test -n "$RM" && break
10362done
10363
10364    else
10365      # If it succeeded, then it was overridden by the user. We will use it
10366      # for the tool.
10367
10368      # First remove it from the list of overridden variables, so we can test
10369      # for unknown variables in the end.
10370      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10371
10372      # Check if we try to supply an empty value
10373      if test "x$RM" = x; then
10374        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10375$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10377$as_echo_n "checking for RM... " >&6; }
10378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10379$as_echo "disabled" >&6; }
10380      else
10381        # Check if the provided tool contains a complete path.
10382        tool_specified="$RM"
10383        tool_basename="${tool_specified##*/}"
10384        if test "x$tool_basename" = "x$tool_specified"; then
10385          # A command without a complete path is provided, search $PATH.
10386          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10387$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10388          # Extract the first word of "$tool_basename", so it can be a program name with args.
10389set dummy $tool_basename; ac_word=$2
10390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10391$as_echo_n "checking for $ac_word... " >&6; }
10392if ${ac_cv_path_RM+:} false; then :
10393  $as_echo_n "(cached) " >&6
10394else
10395  case $RM in
10396  [\\/]* | ?:[\\/]*)
10397  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10398  ;;
10399  *)
10400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10401for as_dir in $PATH
10402do
10403  IFS=$as_save_IFS
10404  test -z "$as_dir" && as_dir=.
10405    for ac_exec_ext in '' $ac_executable_extensions; do
10406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10407    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10409    break 2
10410  fi
10411done
10412  done
10413IFS=$as_save_IFS
10414
10415  ;;
10416esac
10417fi
10418RM=$ac_cv_path_RM
10419if test -n "$RM"; then
10420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10421$as_echo "$RM" >&6; }
10422else
10423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10424$as_echo "no" >&6; }
10425fi
10426
10427
10428          if test "x$RM" = x; then
10429            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10430          fi
10431        else
10432          # Otherwise we believe it is a complete path. Use it as it is.
10433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10434$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10435          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10436$as_echo_n "checking for RM... " >&6; }
10437          if test ! -x "$tool_specified"; then
10438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10439$as_echo "not found" >&6; }
10440            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10441          fi
10442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10443$as_echo "$tool_specified" >&6; }
10444        fi
10445      fi
10446    fi
10447
10448  fi
10449
10450
10451
10452  if test "x$RM" = x; then
10453    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10454  fi
10455
10456
10457
10458
10459
10460  # Publish this variable in the help.
10461
10462
10463  if [ -z "${RMDIR+x}" ]; then
10464    # The variable is not set by user, try to locate tool using the code snippet
10465    for ac_prog in rmdir
10466do
10467  # Extract the first word of "$ac_prog", so it can be a program name with args.
10468set dummy $ac_prog; ac_word=$2
10469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10470$as_echo_n "checking for $ac_word... " >&6; }
10471if ${ac_cv_path_RMDIR+:} false; then :
10472  $as_echo_n "(cached) " >&6
10473else
10474  case $RMDIR in
10475  [\\/]* | ?:[\\/]*)
10476  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10477  ;;
10478  *)
10479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10480for as_dir in $PATH
10481do
10482  IFS=$as_save_IFS
10483  test -z "$as_dir" && as_dir=.
10484    for ac_exec_ext in '' $ac_executable_extensions; do
10485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10486    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10488    break 2
10489  fi
10490done
10491  done
10492IFS=$as_save_IFS
10493
10494  ;;
10495esac
10496fi
10497RMDIR=$ac_cv_path_RMDIR
10498if test -n "$RMDIR"; then
10499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10500$as_echo "$RMDIR" >&6; }
10501else
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10503$as_echo "no" >&6; }
10504fi
10505
10506
10507  test -n "$RMDIR" && break
10508done
10509
10510  else
10511    # The variable is set, but is it from the command line or the environment?
10512
10513    # Try to remove the string !RMDIR! from our list.
10514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10516      # If it failed, the variable was not from the command line. Ignore it,
10517      # but warn the user (except for BASH, which is always set by the calling BASH).
10518      if test "xRMDIR" != xBASH; then
10519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10520$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10521      fi
10522      # Try to locate tool using the code snippet
10523      for ac_prog in rmdir
10524do
10525  # Extract the first word of "$ac_prog", so it can be a program name with args.
10526set dummy $ac_prog; ac_word=$2
10527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10528$as_echo_n "checking for $ac_word... " >&6; }
10529if ${ac_cv_path_RMDIR+:} false; then :
10530  $as_echo_n "(cached) " >&6
10531else
10532  case $RMDIR in
10533  [\\/]* | ?:[\\/]*)
10534  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10535  ;;
10536  *)
10537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10538for as_dir in $PATH
10539do
10540  IFS=$as_save_IFS
10541  test -z "$as_dir" && as_dir=.
10542    for ac_exec_ext in '' $ac_executable_extensions; do
10543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10544    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10546    break 2
10547  fi
10548done
10549  done
10550IFS=$as_save_IFS
10551
10552  ;;
10553esac
10554fi
10555RMDIR=$ac_cv_path_RMDIR
10556if test -n "$RMDIR"; then
10557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10558$as_echo "$RMDIR" >&6; }
10559else
10560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10561$as_echo "no" >&6; }
10562fi
10563
10564
10565  test -n "$RMDIR" && break
10566done
10567
10568    else
10569      # If it succeeded, then it was overridden by the user. We will use it
10570      # for the tool.
10571
10572      # First remove it from the list of overridden variables, so we can test
10573      # for unknown variables in the end.
10574      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10575
10576      # Check if we try to supply an empty value
10577      if test "x$RMDIR" = x; then
10578        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10579$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10580        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10581$as_echo_n "checking for RMDIR... " >&6; }
10582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10583$as_echo "disabled" >&6; }
10584      else
10585        # Check if the provided tool contains a complete path.
10586        tool_specified="$RMDIR"
10587        tool_basename="${tool_specified##*/}"
10588        if test "x$tool_basename" = "x$tool_specified"; then
10589          # A command without a complete path is provided, search $PATH.
10590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10591$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10592          # Extract the first word of "$tool_basename", so it can be a program name with args.
10593set dummy $tool_basename; ac_word=$2
10594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10595$as_echo_n "checking for $ac_word... " >&6; }
10596if ${ac_cv_path_RMDIR+:} false; then :
10597  $as_echo_n "(cached) " >&6
10598else
10599  case $RMDIR in
10600  [\\/]* | ?:[\\/]*)
10601  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10602  ;;
10603  *)
10604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10605for as_dir in $PATH
10606do
10607  IFS=$as_save_IFS
10608  test -z "$as_dir" && as_dir=.
10609    for ac_exec_ext in '' $ac_executable_extensions; do
10610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10611    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10613    break 2
10614  fi
10615done
10616  done
10617IFS=$as_save_IFS
10618
10619  ;;
10620esac
10621fi
10622RMDIR=$ac_cv_path_RMDIR
10623if test -n "$RMDIR"; then
10624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10625$as_echo "$RMDIR" >&6; }
10626else
10627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10628$as_echo "no" >&6; }
10629fi
10630
10631
10632          if test "x$RMDIR" = x; then
10633            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10634          fi
10635        else
10636          # Otherwise we believe it is a complete path. Use it as it is.
10637          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10638$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10639          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10640$as_echo_n "checking for RMDIR... " >&6; }
10641          if test ! -x "$tool_specified"; then
10642            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10643$as_echo "not found" >&6; }
10644            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10645          fi
10646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10647$as_echo "$tool_specified" >&6; }
10648        fi
10649      fi
10650    fi
10651
10652  fi
10653
10654
10655
10656  if test "x$RMDIR" = x; then
10657    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10658  fi
10659
10660
10661
10662
10663
10664  # Publish this variable in the help.
10665
10666
10667  if [ -z "${SH+x}" ]; then
10668    # The variable is not set by user, try to locate tool using the code snippet
10669    for ac_prog in sh
10670do
10671  # Extract the first word of "$ac_prog", so it can be a program name with args.
10672set dummy $ac_prog; ac_word=$2
10673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10674$as_echo_n "checking for $ac_word... " >&6; }
10675if ${ac_cv_path_SH+:} false; then :
10676  $as_echo_n "(cached) " >&6
10677else
10678  case $SH in
10679  [\\/]* | ?:[\\/]*)
10680  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10681  ;;
10682  *)
10683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10684for as_dir in $PATH
10685do
10686  IFS=$as_save_IFS
10687  test -z "$as_dir" && as_dir=.
10688    for ac_exec_ext in '' $ac_executable_extensions; do
10689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10690    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10692    break 2
10693  fi
10694done
10695  done
10696IFS=$as_save_IFS
10697
10698  ;;
10699esac
10700fi
10701SH=$ac_cv_path_SH
10702if test -n "$SH"; then
10703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10704$as_echo "$SH" >&6; }
10705else
10706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10707$as_echo "no" >&6; }
10708fi
10709
10710
10711  test -n "$SH" && break
10712done
10713
10714  else
10715    # The variable is set, but is it from the command line or the environment?
10716
10717    # Try to remove the string !SH! from our list.
10718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10720      # If it failed, the variable was not from the command line. Ignore it,
10721      # but warn the user (except for BASH, which is always set by the calling BASH).
10722      if test "xSH" != xBASH; then
10723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10724$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10725      fi
10726      # Try to locate tool using the code snippet
10727      for ac_prog in sh
10728do
10729  # Extract the first word of "$ac_prog", so it can be a program name with args.
10730set dummy $ac_prog; ac_word=$2
10731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10732$as_echo_n "checking for $ac_word... " >&6; }
10733if ${ac_cv_path_SH+:} false; then :
10734  $as_echo_n "(cached) " >&6
10735else
10736  case $SH in
10737  [\\/]* | ?:[\\/]*)
10738  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10739  ;;
10740  *)
10741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10742for as_dir in $PATH
10743do
10744  IFS=$as_save_IFS
10745  test -z "$as_dir" && as_dir=.
10746    for ac_exec_ext in '' $ac_executable_extensions; do
10747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10748    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10750    break 2
10751  fi
10752done
10753  done
10754IFS=$as_save_IFS
10755
10756  ;;
10757esac
10758fi
10759SH=$ac_cv_path_SH
10760if test -n "$SH"; then
10761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10762$as_echo "$SH" >&6; }
10763else
10764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10765$as_echo "no" >&6; }
10766fi
10767
10768
10769  test -n "$SH" && break
10770done
10771
10772    else
10773      # If it succeeded, then it was overridden by the user. We will use it
10774      # for the tool.
10775
10776      # First remove it from the list of overridden variables, so we can test
10777      # for unknown variables in the end.
10778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10779
10780      # Check if we try to supply an empty value
10781      if test "x$SH" = x; then
10782        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10783$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10785$as_echo_n "checking for SH... " >&6; }
10786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10787$as_echo "disabled" >&6; }
10788      else
10789        # Check if the provided tool contains a complete path.
10790        tool_specified="$SH"
10791        tool_basename="${tool_specified##*/}"
10792        if test "x$tool_basename" = "x$tool_specified"; then
10793          # A command without a complete path is provided, search $PATH.
10794          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10795$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10796          # Extract the first word of "$tool_basename", so it can be a program name with args.
10797set dummy $tool_basename; ac_word=$2
10798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10799$as_echo_n "checking for $ac_word... " >&6; }
10800if ${ac_cv_path_SH+:} false; then :
10801  $as_echo_n "(cached) " >&6
10802else
10803  case $SH in
10804  [\\/]* | ?:[\\/]*)
10805  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10806  ;;
10807  *)
10808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10809for as_dir in $PATH
10810do
10811  IFS=$as_save_IFS
10812  test -z "$as_dir" && as_dir=.
10813    for ac_exec_ext in '' $ac_executable_extensions; do
10814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10815    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10817    break 2
10818  fi
10819done
10820  done
10821IFS=$as_save_IFS
10822
10823  ;;
10824esac
10825fi
10826SH=$ac_cv_path_SH
10827if test -n "$SH"; then
10828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10829$as_echo "$SH" >&6; }
10830else
10831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10832$as_echo "no" >&6; }
10833fi
10834
10835
10836          if test "x$SH" = x; then
10837            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10838          fi
10839        else
10840          # Otherwise we believe it is a complete path. Use it as it is.
10841          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10842$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10843          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10844$as_echo_n "checking for SH... " >&6; }
10845          if test ! -x "$tool_specified"; then
10846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10847$as_echo "not found" >&6; }
10848            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10849          fi
10850          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10851$as_echo "$tool_specified" >&6; }
10852        fi
10853      fi
10854    fi
10855
10856  fi
10857
10858
10859
10860  if test "x$SH" = x; then
10861    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10862  fi
10863
10864
10865
10866
10867
10868  # Publish this variable in the help.
10869
10870
10871  if [ -z "${SORT+x}" ]; then
10872    # The variable is not set by user, try to locate tool using the code snippet
10873    for ac_prog in sort
10874do
10875  # Extract the first word of "$ac_prog", so it can be a program name with args.
10876set dummy $ac_prog; ac_word=$2
10877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10878$as_echo_n "checking for $ac_word... " >&6; }
10879if ${ac_cv_path_SORT+:} false; then :
10880  $as_echo_n "(cached) " >&6
10881else
10882  case $SORT in
10883  [\\/]* | ?:[\\/]*)
10884  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10885  ;;
10886  *)
10887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10888for as_dir in $PATH
10889do
10890  IFS=$as_save_IFS
10891  test -z "$as_dir" && as_dir=.
10892    for ac_exec_ext in '' $ac_executable_extensions; do
10893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10894    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10896    break 2
10897  fi
10898done
10899  done
10900IFS=$as_save_IFS
10901
10902  ;;
10903esac
10904fi
10905SORT=$ac_cv_path_SORT
10906if test -n "$SORT"; then
10907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10908$as_echo "$SORT" >&6; }
10909else
10910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10911$as_echo "no" >&6; }
10912fi
10913
10914
10915  test -n "$SORT" && break
10916done
10917
10918  else
10919    # The variable is set, but is it from the command line or the environment?
10920
10921    # Try to remove the string !SORT! from our list.
10922    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10923    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10924      # If it failed, the variable was not from the command line. Ignore it,
10925      # but warn the user (except for BASH, which is always set by the calling BASH).
10926      if test "xSORT" != xBASH; then
10927        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10928$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10929      fi
10930      # Try to locate tool using the code snippet
10931      for ac_prog in sort
10932do
10933  # Extract the first word of "$ac_prog", so it can be a program name with args.
10934set dummy $ac_prog; ac_word=$2
10935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10936$as_echo_n "checking for $ac_word... " >&6; }
10937if ${ac_cv_path_SORT+:} false; then :
10938  $as_echo_n "(cached) " >&6
10939else
10940  case $SORT in
10941  [\\/]* | ?:[\\/]*)
10942  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10943  ;;
10944  *)
10945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10946for as_dir in $PATH
10947do
10948  IFS=$as_save_IFS
10949  test -z "$as_dir" && as_dir=.
10950    for ac_exec_ext in '' $ac_executable_extensions; do
10951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10952    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10954    break 2
10955  fi
10956done
10957  done
10958IFS=$as_save_IFS
10959
10960  ;;
10961esac
10962fi
10963SORT=$ac_cv_path_SORT
10964if test -n "$SORT"; then
10965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10966$as_echo "$SORT" >&6; }
10967else
10968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10969$as_echo "no" >&6; }
10970fi
10971
10972
10973  test -n "$SORT" && break
10974done
10975
10976    else
10977      # If it succeeded, then it was overridden by the user. We will use it
10978      # for the tool.
10979
10980      # First remove it from the list of overridden variables, so we can test
10981      # for unknown variables in the end.
10982      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10983
10984      # Check if we try to supply an empty value
10985      if test "x$SORT" = x; then
10986        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10987$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10988        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10989$as_echo_n "checking for SORT... " >&6; }
10990        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10991$as_echo "disabled" >&6; }
10992      else
10993        # Check if the provided tool contains a complete path.
10994        tool_specified="$SORT"
10995        tool_basename="${tool_specified##*/}"
10996        if test "x$tool_basename" = "x$tool_specified"; then
10997          # A command without a complete path is provided, search $PATH.
10998          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10999$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11000          # Extract the first word of "$tool_basename", so it can be a program name with args.
11001set dummy $tool_basename; ac_word=$2
11002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11003$as_echo_n "checking for $ac_word... " >&6; }
11004if ${ac_cv_path_SORT+:} false; then :
11005  $as_echo_n "(cached) " >&6
11006else
11007  case $SORT in
11008  [\\/]* | ?:[\\/]*)
11009  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11010  ;;
11011  *)
11012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11013for as_dir in $PATH
11014do
11015  IFS=$as_save_IFS
11016  test -z "$as_dir" && as_dir=.
11017    for ac_exec_ext in '' $ac_executable_extensions; do
11018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11019    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11021    break 2
11022  fi
11023done
11024  done
11025IFS=$as_save_IFS
11026
11027  ;;
11028esac
11029fi
11030SORT=$ac_cv_path_SORT
11031if test -n "$SORT"; then
11032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11033$as_echo "$SORT" >&6; }
11034else
11035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11036$as_echo "no" >&6; }
11037fi
11038
11039
11040          if test "x$SORT" = x; then
11041            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11042          fi
11043        else
11044          # Otherwise we believe it is a complete path. Use it as it is.
11045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11046$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11047          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11048$as_echo_n "checking for SORT... " >&6; }
11049          if test ! -x "$tool_specified"; then
11050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11051$as_echo "not found" >&6; }
11052            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11053          fi
11054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11055$as_echo "$tool_specified" >&6; }
11056        fi
11057      fi
11058    fi
11059
11060  fi
11061
11062
11063
11064  if test "x$SORT" = x; then
11065    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11066  fi
11067
11068
11069
11070
11071
11072  # Publish this variable in the help.
11073
11074
11075  if [ -z "${TAIL+x}" ]; then
11076    # The variable is not set by user, try to locate tool using the code snippet
11077    for ac_prog in tail
11078do
11079  # Extract the first word of "$ac_prog", so it can be a program name with args.
11080set dummy $ac_prog; ac_word=$2
11081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11082$as_echo_n "checking for $ac_word... " >&6; }
11083if ${ac_cv_path_TAIL+:} false; then :
11084  $as_echo_n "(cached) " >&6
11085else
11086  case $TAIL in
11087  [\\/]* | ?:[\\/]*)
11088  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11089  ;;
11090  *)
11091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11092for as_dir in $PATH
11093do
11094  IFS=$as_save_IFS
11095  test -z "$as_dir" && as_dir=.
11096    for ac_exec_ext in '' $ac_executable_extensions; do
11097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11098    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11100    break 2
11101  fi
11102done
11103  done
11104IFS=$as_save_IFS
11105
11106  ;;
11107esac
11108fi
11109TAIL=$ac_cv_path_TAIL
11110if test -n "$TAIL"; then
11111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11112$as_echo "$TAIL" >&6; }
11113else
11114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11115$as_echo "no" >&6; }
11116fi
11117
11118
11119  test -n "$TAIL" && break
11120done
11121
11122  else
11123    # The variable is set, but is it from the command line or the environment?
11124
11125    # Try to remove the string !TAIL! from our list.
11126    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11127    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11128      # If it failed, the variable was not from the command line. Ignore it,
11129      # but warn the user (except for BASH, which is always set by the calling BASH).
11130      if test "xTAIL" != xBASH; then
11131        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11132$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11133      fi
11134      # Try to locate tool using the code snippet
11135      for ac_prog in tail
11136do
11137  # Extract the first word of "$ac_prog", so it can be a program name with args.
11138set dummy $ac_prog; ac_word=$2
11139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11140$as_echo_n "checking for $ac_word... " >&6; }
11141if ${ac_cv_path_TAIL+:} false; then :
11142  $as_echo_n "(cached) " >&6
11143else
11144  case $TAIL in
11145  [\\/]* | ?:[\\/]*)
11146  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11147  ;;
11148  *)
11149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11150for as_dir in $PATH
11151do
11152  IFS=$as_save_IFS
11153  test -z "$as_dir" && as_dir=.
11154    for ac_exec_ext in '' $ac_executable_extensions; do
11155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11156    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11158    break 2
11159  fi
11160done
11161  done
11162IFS=$as_save_IFS
11163
11164  ;;
11165esac
11166fi
11167TAIL=$ac_cv_path_TAIL
11168if test -n "$TAIL"; then
11169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11170$as_echo "$TAIL" >&6; }
11171else
11172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11173$as_echo "no" >&6; }
11174fi
11175
11176
11177  test -n "$TAIL" && break
11178done
11179
11180    else
11181      # If it succeeded, then it was overridden by the user. We will use it
11182      # for the tool.
11183
11184      # First remove it from the list of overridden variables, so we can test
11185      # for unknown variables in the end.
11186      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11187
11188      # Check if we try to supply an empty value
11189      if test "x$TAIL" = x; then
11190        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11191$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11192        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11193$as_echo_n "checking for TAIL... " >&6; }
11194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11195$as_echo "disabled" >&6; }
11196      else
11197        # Check if the provided tool contains a complete path.
11198        tool_specified="$TAIL"
11199        tool_basename="${tool_specified##*/}"
11200        if test "x$tool_basename" = "x$tool_specified"; then
11201          # A command without a complete path is provided, search $PATH.
11202          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11203$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11204          # Extract the first word of "$tool_basename", so it can be a program name with args.
11205set dummy $tool_basename; ac_word=$2
11206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11207$as_echo_n "checking for $ac_word... " >&6; }
11208if ${ac_cv_path_TAIL+:} false; then :
11209  $as_echo_n "(cached) " >&6
11210else
11211  case $TAIL in
11212  [\\/]* | ?:[\\/]*)
11213  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11214  ;;
11215  *)
11216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11217for as_dir in $PATH
11218do
11219  IFS=$as_save_IFS
11220  test -z "$as_dir" && as_dir=.
11221    for ac_exec_ext in '' $ac_executable_extensions; do
11222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11223    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11225    break 2
11226  fi
11227done
11228  done
11229IFS=$as_save_IFS
11230
11231  ;;
11232esac
11233fi
11234TAIL=$ac_cv_path_TAIL
11235if test -n "$TAIL"; then
11236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11237$as_echo "$TAIL" >&6; }
11238else
11239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11240$as_echo "no" >&6; }
11241fi
11242
11243
11244          if test "x$TAIL" = x; then
11245            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11246          fi
11247        else
11248          # Otherwise we believe it is a complete path. Use it as it is.
11249          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11250$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11251          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11252$as_echo_n "checking for TAIL... " >&6; }
11253          if test ! -x "$tool_specified"; then
11254            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11255$as_echo "not found" >&6; }
11256            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11257          fi
11258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11259$as_echo "$tool_specified" >&6; }
11260        fi
11261      fi
11262    fi
11263
11264  fi
11265
11266
11267
11268  if test "x$TAIL" = x; then
11269    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11270  fi
11271
11272
11273
11274
11275
11276  # Publish this variable in the help.
11277
11278
11279  if [ -z "${TAR+x}" ]; then
11280    # The variable is not set by user, try to locate tool using the code snippet
11281    for ac_prog in gtar tar
11282do
11283  # Extract the first word of "$ac_prog", so it can be a program name with args.
11284set dummy $ac_prog; ac_word=$2
11285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11286$as_echo_n "checking for $ac_word... " >&6; }
11287if ${ac_cv_path_TAR+:} false; then :
11288  $as_echo_n "(cached) " >&6
11289else
11290  case $TAR in
11291  [\\/]* | ?:[\\/]*)
11292  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11293  ;;
11294  *)
11295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11296for as_dir in $PATH
11297do
11298  IFS=$as_save_IFS
11299  test -z "$as_dir" && as_dir=.
11300    for ac_exec_ext in '' $ac_executable_extensions; do
11301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11302    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11304    break 2
11305  fi
11306done
11307  done
11308IFS=$as_save_IFS
11309
11310  ;;
11311esac
11312fi
11313TAR=$ac_cv_path_TAR
11314if test -n "$TAR"; then
11315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11316$as_echo "$TAR" >&6; }
11317else
11318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11319$as_echo "no" >&6; }
11320fi
11321
11322
11323  test -n "$TAR" && break
11324done
11325
11326  else
11327    # The variable is set, but is it from the command line or the environment?
11328
11329    # Try to remove the string !TAR! from our list.
11330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11332      # If it failed, the variable was not from the command line. Ignore it,
11333      # but warn the user (except for BASH, which is always set by the calling BASH).
11334      if test "xTAR" != xBASH; then
11335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11336$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11337      fi
11338      # Try to locate tool using the code snippet
11339      for ac_prog in gtar tar
11340do
11341  # Extract the first word of "$ac_prog", so it can be a program name with args.
11342set dummy $ac_prog; ac_word=$2
11343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11344$as_echo_n "checking for $ac_word... " >&6; }
11345if ${ac_cv_path_TAR+:} false; then :
11346  $as_echo_n "(cached) " >&6
11347else
11348  case $TAR in
11349  [\\/]* | ?:[\\/]*)
11350  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11351  ;;
11352  *)
11353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11354for as_dir in $PATH
11355do
11356  IFS=$as_save_IFS
11357  test -z "$as_dir" && as_dir=.
11358    for ac_exec_ext in '' $ac_executable_extensions; do
11359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11360    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11362    break 2
11363  fi
11364done
11365  done
11366IFS=$as_save_IFS
11367
11368  ;;
11369esac
11370fi
11371TAR=$ac_cv_path_TAR
11372if test -n "$TAR"; then
11373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11374$as_echo "$TAR" >&6; }
11375else
11376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11377$as_echo "no" >&6; }
11378fi
11379
11380
11381  test -n "$TAR" && break
11382done
11383
11384    else
11385      # If it succeeded, then it was overridden by the user. We will use it
11386      # for the tool.
11387
11388      # First remove it from the list of overridden variables, so we can test
11389      # for unknown variables in the end.
11390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11391
11392      # Check if we try to supply an empty value
11393      if test "x$TAR" = x; then
11394        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11395$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11396        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11397$as_echo_n "checking for TAR... " >&6; }
11398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11399$as_echo "disabled" >&6; }
11400      else
11401        # Check if the provided tool contains a complete path.
11402        tool_specified="$TAR"
11403        tool_basename="${tool_specified##*/}"
11404        if test "x$tool_basename" = "x$tool_specified"; then
11405          # A command without a complete path is provided, search $PATH.
11406          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11407$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11408          # Extract the first word of "$tool_basename", so it can be a program name with args.
11409set dummy $tool_basename; ac_word=$2
11410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11411$as_echo_n "checking for $ac_word... " >&6; }
11412if ${ac_cv_path_TAR+:} false; then :
11413  $as_echo_n "(cached) " >&6
11414else
11415  case $TAR in
11416  [\\/]* | ?:[\\/]*)
11417  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11418  ;;
11419  *)
11420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11421for as_dir in $PATH
11422do
11423  IFS=$as_save_IFS
11424  test -z "$as_dir" && as_dir=.
11425    for ac_exec_ext in '' $ac_executable_extensions; do
11426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11427    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11429    break 2
11430  fi
11431done
11432  done
11433IFS=$as_save_IFS
11434
11435  ;;
11436esac
11437fi
11438TAR=$ac_cv_path_TAR
11439if test -n "$TAR"; then
11440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11441$as_echo "$TAR" >&6; }
11442else
11443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11444$as_echo "no" >&6; }
11445fi
11446
11447
11448          if test "x$TAR" = x; then
11449            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11450          fi
11451        else
11452          # Otherwise we believe it is a complete path. Use it as it is.
11453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11454$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11455          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11456$as_echo_n "checking for TAR... " >&6; }
11457          if test ! -x "$tool_specified"; then
11458            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11459$as_echo "not found" >&6; }
11460            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11461          fi
11462          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11463$as_echo "$tool_specified" >&6; }
11464        fi
11465      fi
11466    fi
11467
11468  fi
11469
11470
11471
11472  if test "x$TAR" = x; then
11473    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11474  fi
11475
11476
11477
11478
11479
11480  # Publish this variable in the help.
11481
11482
11483  if [ -z "${TEE+x}" ]; then
11484    # The variable is not set by user, try to locate tool using the code snippet
11485    for ac_prog in tee
11486do
11487  # Extract the first word of "$ac_prog", so it can be a program name with args.
11488set dummy $ac_prog; ac_word=$2
11489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11490$as_echo_n "checking for $ac_word... " >&6; }
11491if ${ac_cv_path_TEE+:} false; then :
11492  $as_echo_n "(cached) " >&6
11493else
11494  case $TEE in
11495  [\\/]* | ?:[\\/]*)
11496  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11497  ;;
11498  *)
11499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11500for as_dir in $PATH
11501do
11502  IFS=$as_save_IFS
11503  test -z "$as_dir" && as_dir=.
11504    for ac_exec_ext in '' $ac_executable_extensions; do
11505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11506    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11508    break 2
11509  fi
11510done
11511  done
11512IFS=$as_save_IFS
11513
11514  ;;
11515esac
11516fi
11517TEE=$ac_cv_path_TEE
11518if test -n "$TEE"; then
11519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11520$as_echo "$TEE" >&6; }
11521else
11522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11523$as_echo "no" >&6; }
11524fi
11525
11526
11527  test -n "$TEE" && break
11528done
11529
11530  else
11531    # The variable is set, but is it from the command line or the environment?
11532
11533    # Try to remove the string !TEE! from our list.
11534    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11535    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11536      # If it failed, the variable was not from the command line. Ignore it,
11537      # but warn the user (except for BASH, which is always set by the calling BASH).
11538      if test "xTEE" != xBASH; then
11539        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11540$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11541      fi
11542      # Try to locate tool using the code snippet
11543      for ac_prog in tee
11544do
11545  # Extract the first word of "$ac_prog", so it can be a program name with args.
11546set dummy $ac_prog; ac_word=$2
11547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11548$as_echo_n "checking for $ac_word... " >&6; }
11549if ${ac_cv_path_TEE+:} false; then :
11550  $as_echo_n "(cached) " >&6
11551else
11552  case $TEE in
11553  [\\/]* | ?:[\\/]*)
11554  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11555  ;;
11556  *)
11557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11558for as_dir in $PATH
11559do
11560  IFS=$as_save_IFS
11561  test -z "$as_dir" && as_dir=.
11562    for ac_exec_ext in '' $ac_executable_extensions; do
11563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11564    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11566    break 2
11567  fi
11568done
11569  done
11570IFS=$as_save_IFS
11571
11572  ;;
11573esac
11574fi
11575TEE=$ac_cv_path_TEE
11576if test -n "$TEE"; then
11577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11578$as_echo "$TEE" >&6; }
11579else
11580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11581$as_echo "no" >&6; }
11582fi
11583
11584
11585  test -n "$TEE" && break
11586done
11587
11588    else
11589      # If it succeeded, then it was overridden by the user. We will use it
11590      # for the tool.
11591
11592      # First remove it from the list of overridden variables, so we can test
11593      # for unknown variables in the end.
11594      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11595
11596      # Check if we try to supply an empty value
11597      if test "x$TEE" = x; then
11598        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11599$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11600        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11601$as_echo_n "checking for TEE... " >&6; }
11602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11603$as_echo "disabled" >&6; }
11604      else
11605        # Check if the provided tool contains a complete path.
11606        tool_specified="$TEE"
11607        tool_basename="${tool_specified##*/}"
11608        if test "x$tool_basename" = "x$tool_specified"; then
11609          # A command without a complete path is provided, search $PATH.
11610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11611$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11612          # Extract the first word of "$tool_basename", so it can be a program name with args.
11613set dummy $tool_basename; ac_word=$2
11614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11615$as_echo_n "checking for $ac_word... " >&6; }
11616if ${ac_cv_path_TEE+:} false; then :
11617  $as_echo_n "(cached) " >&6
11618else
11619  case $TEE in
11620  [\\/]* | ?:[\\/]*)
11621  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11622  ;;
11623  *)
11624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11625for as_dir in $PATH
11626do
11627  IFS=$as_save_IFS
11628  test -z "$as_dir" && as_dir=.
11629    for ac_exec_ext in '' $ac_executable_extensions; do
11630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11631    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11633    break 2
11634  fi
11635done
11636  done
11637IFS=$as_save_IFS
11638
11639  ;;
11640esac
11641fi
11642TEE=$ac_cv_path_TEE
11643if test -n "$TEE"; then
11644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11645$as_echo "$TEE" >&6; }
11646else
11647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11648$as_echo "no" >&6; }
11649fi
11650
11651
11652          if test "x$TEE" = x; then
11653            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11654          fi
11655        else
11656          # Otherwise we believe it is a complete path. Use it as it is.
11657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11658$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11659          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11660$as_echo_n "checking for TEE... " >&6; }
11661          if test ! -x "$tool_specified"; then
11662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11663$as_echo "not found" >&6; }
11664            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11665          fi
11666          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11667$as_echo "$tool_specified" >&6; }
11668        fi
11669      fi
11670    fi
11671
11672  fi
11673
11674
11675
11676  if test "x$TEE" = x; then
11677    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11678  fi
11679
11680
11681
11682
11683
11684  # Publish this variable in the help.
11685
11686
11687  if [ -z "${TOUCH+x}" ]; then
11688    # The variable is not set by user, try to locate tool using the code snippet
11689    for ac_prog in touch
11690do
11691  # Extract the first word of "$ac_prog", so it can be a program name with args.
11692set dummy $ac_prog; ac_word=$2
11693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11694$as_echo_n "checking for $ac_word... " >&6; }
11695if ${ac_cv_path_TOUCH+:} false; then :
11696  $as_echo_n "(cached) " >&6
11697else
11698  case $TOUCH in
11699  [\\/]* | ?:[\\/]*)
11700  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11701  ;;
11702  *)
11703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11704for as_dir in $PATH
11705do
11706  IFS=$as_save_IFS
11707  test -z "$as_dir" && as_dir=.
11708    for ac_exec_ext in '' $ac_executable_extensions; do
11709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11710    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11712    break 2
11713  fi
11714done
11715  done
11716IFS=$as_save_IFS
11717
11718  ;;
11719esac
11720fi
11721TOUCH=$ac_cv_path_TOUCH
11722if test -n "$TOUCH"; then
11723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11724$as_echo "$TOUCH" >&6; }
11725else
11726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11727$as_echo "no" >&6; }
11728fi
11729
11730
11731  test -n "$TOUCH" && break
11732done
11733
11734  else
11735    # The variable is set, but is it from the command line or the environment?
11736
11737    # Try to remove the string !TOUCH! from our list.
11738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11740      # If it failed, the variable was not from the command line. Ignore it,
11741      # but warn the user (except for BASH, which is always set by the calling BASH).
11742      if test "xTOUCH" != xBASH; then
11743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11744$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11745      fi
11746      # Try to locate tool using the code snippet
11747      for ac_prog in touch
11748do
11749  # Extract the first word of "$ac_prog", so it can be a program name with args.
11750set dummy $ac_prog; ac_word=$2
11751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11752$as_echo_n "checking for $ac_word... " >&6; }
11753if ${ac_cv_path_TOUCH+:} false; then :
11754  $as_echo_n "(cached) " >&6
11755else
11756  case $TOUCH in
11757  [\\/]* | ?:[\\/]*)
11758  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11759  ;;
11760  *)
11761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11762for as_dir in $PATH
11763do
11764  IFS=$as_save_IFS
11765  test -z "$as_dir" && as_dir=.
11766    for ac_exec_ext in '' $ac_executable_extensions; do
11767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11768    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11770    break 2
11771  fi
11772done
11773  done
11774IFS=$as_save_IFS
11775
11776  ;;
11777esac
11778fi
11779TOUCH=$ac_cv_path_TOUCH
11780if test -n "$TOUCH"; then
11781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11782$as_echo "$TOUCH" >&6; }
11783else
11784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11785$as_echo "no" >&6; }
11786fi
11787
11788
11789  test -n "$TOUCH" && break
11790done
11791
11792    else
11793      # If it succeeded, then it was overridden by the user. We will use it
11794      # for the tool.
11795
11796      # First remove it from the list of overridden variables, so we can test
11797      # for unknown variables in the end.
11798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11799
11800      # Check if we try to supply an empty value
11801      if test "x$TOUCH" = x; then
11802        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11803$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11805$as_echo_n "checking for TOUCH... " >&6; }
11806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11807$as_echo "disabled" >&6; }
11808      else
11809        # Check if the provided tool contains a complete path.
11810        tool_specified="$TOUCH"
11811        tool_basename="${tool_specified##*/}"
11812        if test "x$tool_basename" = "x$tool_specified"; then
11813          # A command without a complete path is provided, search $PATH.
11814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11815$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11816          # Extract the first word of "$tool_basename", so it can be a program name with args.
11817set dummy $tool_basename; ac_word=$2
11818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11819$as_echo_n "checking for $ac_word... " >&6; }
11820if ${ac_cv_path_TOUCH+:} false; then :
11821  $as_echo_n "(cached) " >&6
11822else
11823  case $TOUCH in
11824  [\\/]* | ?:[\\/]*)
11825  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11826  ;;
11827  *)
11828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11829for as_dir in $PATH
11830do
11831  IFS=$as_save_IFS
11832  test -z "$as_dir" && as_dir=.
11833    for ac_exec_ext in '' $ac_executable_extensions; do
11834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11835    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11837    break 2
11838  fi
11839done
11840  done
11841IFS=$as_save_IFS
11842
11843  ;;
11844esac
11845fi
11846TOUCH=$ac_cv_path_TOUCH
11847if test -n "$TOUCH"; then
11848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11849$as_echo "$TOUCH" >&6; }
11850else
11851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11852$as_echo "no" >&6; }
11853fi
11854
11855
11856          if test "x$TOUCH" = x; then
11857            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11858          fi
11859        else
11860          # Otherwise we believe it is a complete path. Use it as it is.
11861          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11862$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11863          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11864$as_echo_n "checking for TOUCH... " >&6; }
11865          if test ! -x "$tool_specified"; then
11866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11867$as_echo "not found" >&6; }
11868            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11869          fi
11870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11871$as_echo "$tool_specified" >&6; }
11872        fi
11873      fi
11874    fi
11875
11876  fi
11877
11878
11879
11880  if test "x$TOUCH" = x; then
11881    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11882  fi
11883
11884
11885
11886
11887
11888  # Publish this variable in the help.
11889
11890
11891  if [ -z "${TR+x}" ]; then
11892    # The variable is not set by user, try to locate tool using the code snippet
11893    for ac_prog in tr
11894do
11895  # Extract the first word of "$ac_prog", so it can be a program name with args.
11896set dummy $ac_prog; ac_word=$2
11897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11898$as_echo_n "checking for $ac_word... " >&6; }
11899if ${ac_cv_path_TR+:} false; then :
11900  $as_echo_n "(cached) " >&6
11901else
11902  case $TR in
11903  [\\/]* | ?:[\\/]*)
11904  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11905  ;;
11906  *)
11907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11908for as_dir in $PATH
11909do
11910  IFS=$as_save_IFS
11911  test -z "$as_dir" && as_dir=.
11912    for ac_exec_ext in '' $ac_executable_extensions; do
11913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11914    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11916    break 2
11917  fi
11918done
11919  done
11920IFS=$as_save_IFS
11921
11922  ;;
11923esac
11924fi
11925TR=$ac_cv_path_TR
11926if test -n "$TR"; then
11927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11928$as_echo "$TR" >&6; }
11929else
11930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11931$as_echo "no" >&6; }
11932fi
11933
11934
11935  test -n "$TR" && break
11936done
11937
11938  else
11939    # The variable is set, but is it from the command line or the environment?
11940
11941    # Try to remove the string !TR! from our list.
11942    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11943    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11944      # If it failed, the variable was not from the command line. Ignore it,
11945      # but warn the user (except for BASH, which is always set by the calling BASH).
11946      if test "xTR" != xBASH; then
11947        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11948$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11949      fi
11950      # Try to locate tool using the code snippet
11951      for ac_prog in tr
11952do
11953  # Extract the first word of "$ac_prog", so it can be a program name with args.
11954set dummy $ac_prog; ac_word=$2
11955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11956$as_echo_n "checking for $ac_word... " >&6; }
11957if ${ac_cv_path_TR+:} false; then :
11958  $as_echo_n "(cached) " >&6
11959else
11960  case $TR in
11961  [\\/]* | ?:[\\/]*)
11962  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11963  ;;
11964  *)
11965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11966for as_dir in $PATH
11967do
11968  IFS=$as_save_IFS
11969  test -z "$as_dir" && as_dir=.
11970    for ac_exec_ext in '' $ac_executable_extensions; do
11971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11972    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11974    break 2
11975  fi
11976done
11977  done
11978IFS=$as_save_IFS
11979
11980  ;;
11981esac
11982fi
11983TR=$ac_cv_path_TR
11984if test -n "$TR"; then
11985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11986$as_echo "$TR" >&6; }
11987else
11988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11989$as_echo "no" >&6; }
11990fi
11991
11992
11993  test -n "$TR" && break
11994done
11995
11996    else
11997      # If it succeeded, then it was overridden by the user. We will use it
11998      # for the tool.
11999
12000      # First remove it from the list of overridden variables, so we can test
12001      # for unknown variables in the end.
12002      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12003
12004      # Check if we try to supply an empty value
12005      if test "x$TR" = x; then
12006        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12007$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12009$as_echo_n "checking for TR... " >&6; }
12010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12011$as_echo "disabled" >&6; }
12012      else
12013        # Check if the provided tool contains a complete path.
12014        tool_specified="$TR"
12015        tool_basename="${tool_specified##*/}"
12016        if test "x$tool_basename" = "x$tool_specified"; then
12017          # A command without a complete path is provided, search $PATH.
12018          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12019$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12020          # Extract the first word of "$tool_basename", so it can be a program name with args.
12021set dummy $tool_basename; ac_word=$2
12022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12023$as_echo_n "checking for $ac_word... " >&6; }
12024if ${ac_cv_path_TR+:} false; then :
12025  $as_echo_n "(cached) " >&6
12026else
12027  case $TR in
12028  [\\/]* | ?:[\\/]*)
12029  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12030  ;;
12031  *)
12032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12033for as_dir in $PATH
12034do
12035  IFS=$as_save_IFS
12036  test -z "$as_dir" && as_dir=.
12037    for ac_exec_ext in '' $ac_executable_extensions; do
12038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12039    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12041    break 2
12042  fi
12043done
12044  done
12045IFS=$as_save_IFS
12046
12047  ;;
12048esac
12049fi
12050TR=$ac_cv_path_TR
12051if test -n "$TR"; then
12052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12053$as_echo "$TR" >&6; }
12054else
12055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12056$as_echo "no" >&6; }
12057fi
12058
12059
12060          if test "x$TR" = x; then
12061            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12062          fi
12063        else
12064          # Otherwise we believe it is a complete path. Use it as it is.
12065          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12066$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12067          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12068$as_echo_n "checking for TR... " >&6; }
12069          if test ! -x "$tool_specified"; then
12070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12071$as_echo "not found" >&6; }
12072            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12073          fi
12074          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12075$as_echo "$tool_specified" >&6; }
12076        fi
12077      fi
12078    fi
12079
12080  fi
12081
12082
12083
12084  if test "x$TR" = x; then
12085    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12086  fi
12087
12088
12089
12090
12091
12092  # Publish this variable in the help.
12093
12094
12095  if [ -z "${UNAME+x}" ]; then
12096    # The variable is not set by user, try to locate tool using the code snippet
12097    for ac_prog in uname
12098do
12099  # Extract the first word of "$ac_prog", so it can be a program name with args.
12100set dummy $ac_prog; ac_word=$2
12101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12102$as_echo_n "checking for $ac_word... " >&6; }
12103if ${ac_cv_path_UNAME+:} false; then :
12104  $as_echo_n "(cached) " >&6
12105else
12106  case $UNAME in
12107  [\\/]* | ?:[\\/]*)
12108  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12109  ;;
12110  *)
12111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12112for as_dir in $PATH
12113do
12114  IFS=$as_save_IFS
12115  test -z "$as_dir" && as_dir=.
12116    for ac_exec_ext in '' $ac_executable_extensions; do
12117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12118    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12120    break 2
12121  fi
12122done
12123  done
12124IFS=$as_save_IFS
12125
12126  ;;
12127esac
12128fi
12129UNAME=$ac_cv_path_UNAME
12130if test -n "$UNAME"; then
12131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12132$as_echo "$UNAME" >&6; }
12133else
12134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12135$as_echo "no" >&6; }
12136fi
12137
12138
12139  test -n "$UNAME" && break
12140done
12141
12142  else
12143    # The variable is set, but is it from the command line or the environment?
12144
12145    # Try to remove the string !UNAME! from our list.
12146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12148      # If it failed, the variable was not from the command line. Ignore it,
12149      # but warn the user (except for BASH, which is always set by the calling BASH).
12150      if test "xUNAME" != xBASH; then
12151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12152$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12153      fi
12154      # Try to locate tool using the code snippet
12155      for ac_prog in uname
12156do
12157  # Extract the first word of "$ac_prog", so it can be a program name with args.
12158set dummy $ac_prog; ac_word=$2
12159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12160$as_echo_n "checking for $ac_word... " >&6; }
12161if ${ac_cv_path_UNAME+:} false; then :
12162  $as_echo_n "(cached) " >&6
12163else
12164  case $UNAME in
12165  [\\/]* | ?:[\\/]*)
12166  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12167  ;;
12168  *)
12169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12170for as_dir in $PATH
12171do
12172  IFS=$as_save_IFS
12173  test -z "$as_dir" && as_dir=.
12174    for ac_exec_ext in '' $ac_executable_extensions; do
12175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12176    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12178    break 2
12179  fi
12180done
12181  done
12182IFS=$as_save_IFS
12183
12184  ;;
12185esac
12186fi
12187UNAME=$ac_cv_path_UNAME
12188if test -n "$UNAME"; then
12189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12190$as_echo "$UNAME" >&6; }
12191else
12192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12193$as_echo "no" >&6; }
12194fi
12195
12196
12197  test -n "$UNAME" && break
12198done
12199
12200    else
12201      # If it succeeded, then it was overridden by the user. We will use it
12202      # for the tool.
12203
12204      # First remove it from the list of overridden variables, so we can test
12205      # for unknown variables in the end.
12206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12207
12208      # Check if we try to supply an empty value
12209      if test "x$UNAME" = x; then
12210        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12211$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12213$as_echo_n "checking for UNAME... " >&6; }
12214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12215$as_echo "disabled" >&6; }
12216      else
12217        # Check if the provided tool contains a complete path.
12218        tool_specified="$UNAME"
12219        tool_basename="${tool_specified##*/}"
12220        if test "x$tool_basename" = "x$tool_specified"; then
12221          # A command without a complete path is provided, search $PATH.
12222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12223$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12224          # Extract the first word of "$tool_basename", so it can be a program name with args.
12225set dummy $tool_basename; ac_word=$2
12226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12227$as_echo_n "checking for $ac_word... " >&6; }
12228if ${ac_cv_path_UNAME+:} false; then :
12229  $as_echo_n "(cached) " >&6
12230else
12231  case $UNAME in
12232  [\\/]* | ?:[\\/]*)
12233  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12234  ;;
12235  *)
12236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12237for as_dir in $PATH
12238do
12239  IFS=$as_save_IFS
12240  test -z "$as_dir" && as_dir=.
12241    for ac_exec_ext in '' $ac_executable_extensions; do
12242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12243    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12245    break 2
12246  fi
12247done
12248  done
12249IFS=$as_save_IFS
12250
12251  ;;
12252esac
12253fi
12254UNAME=$ac_cv_path_UNAME
12255if test -n "$UNAME"; then
12256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12257$as_echo "$UNAME" >&6; }
12258else
12259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12260$as_echo "no" >&6; }
12261fi
12262
12263
12264          if test "x$UNAME" = x; then
12265            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12266          fi
12267        else
12268          # Otherwise we believe it is a complete path. Use it as it is.
12269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12270$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12271          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12272$as_echo_n "checking for UNAME... " >&6; }
12273          if test ! -x "$tool_specified"; then
12274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12275$as_echo "not found" >&6; }
12276            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12277          fi
12278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12279$as_echo "$tool_specified" >&6; }
12280        fi
12281      fi
12282    fi
12283
12284  fi
12285
12286
12287
12288  if test "x$UNAME" = x; then
12289    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12290  fi
12291
12292
12293
12294
12295
12296  # Publish this variable in the help.
12297
12298
12299  if [ -z "${UNIQ+x}" ]; then
12300    # The variable is not set by user, try to locate tool using the code snippet
12301    for ac_prog in uniq
12302do
12303  # Extract the first word of "$ac_prog", so it can be a program name with args.
12304set dummy $ac_prog; ac_word=$2
12305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12306$as_echo_n "checking for $ac_word... " >&6; }
12307if ${ac_cv_path_UNIQ+:} false; then :
12308  $as_echo_n "(cached) " >&6
12309else
12310  case $UNIQ in
12311  [\\/]* | ?:[\\/]*)
12312  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12313  ;;
12314  *)
12315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12316for as_dir in $PATH
12317do
12318  IFS=$as_save_IFS
12319  test -z "$as_dir" && as_dir=.
12320    for ac_exec_ext in '' $ac_executable_extensions; do
12321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12322    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12324    break 2
12325  fi
12326done
12327  done
12328IFS=$as_save_IFS
12329
12330  ;;
12331esac
12332fi
12333UNIQ=$ac_cv_path_UNIQ
12334if test -n "$UNIQ"; then
12335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12336$as_echo "$UNIQ" >&6; }
12337else
12338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12339$as_echo "no" >&6; }
12340fi
12341
12342
12343  test -n "$UNIQ" && break
12344done
12345
12346  else
12347    # The variable is set, but is it from the command line or the environment?
12348
12349    # Try to remove the string !UNIQ! from our list.
12350    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12351    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12352      # If it failed, the variable was not from the command line. Ignore it,
12353      # but warn the user (except for BASH, which is always set by the calling BASH).
12354      if test "xUNIQ" != xBASH; then
12355        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12356$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12357      fi
12358      # Try to locate tool using the code snippet
12359      for ac_prog in uniq
12360do
12361  # Extract the first word of "$ac_prog", so it can be a program name with args.
12362set dummy $ac_prog; ac_word=$2
12363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12364$as_echo_n "checking for $ac_word... " >&6; }
12365if ${ac_cv_path_UNIQ+:} false; then :
12366  $as_echo_n "(cached) " >&6
12367else
12368  case $UNIQ in
12369  [\\/]* | ?:[\\/]*)
12370  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12371  ;;
12372  *)
12373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12374for as_dir in $PATH
12375do
12376  IFS=$as_save_IFS
12377  test -z "$as_dir" && as_dir=.
12378    for ac_exec_ext in '' $ac_executable_extensions; do
12379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12380    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12382    break 2
12383  fi
12384done
12385  done
12386IFS=$as_save_IFS
12387
12388  ;;
12389esac
12390fi
12391UNIQ=$ac_cv_path_UNIQ
12392if test -n "$UNIQ"; then
12393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12394$as_echo "$UNIQ" >&6; }
12395else
12396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12397$as_echo "no" >&6; }
12398fi
12399
12400
12401  test -n "$UNIQ" && break
12402done
12403
12404    else
12405      # If it succeeded, then it was overridden by the user. We will use it
12406      # for the tool.
12407
12408      # First remove it from the list of overridden variables, so we can test
12409      # for unknown variables in the end.
12410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12411
12412      # Check if we try to supply an empty value
12413      if test "x$UNIQ" = x; then
12414        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12415$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12417$as_echo_n "checking for UNIQ... " >&6; }
12418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12419$as_echo "disabled" >&6; }
12420      else
12421        # Check if the provided tool contains a complete path.
12422        tool_specified="$UNIQ"
12423        tool_basename="${tool_specified##*/}"
12424        if test "x$tool_basename" = "x$tool_specified"; then
12425          # A command without a complete path is provided, search $PATH.
12426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12427$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12428          # Extract the first word of "$tool_basename", so it can be a program name with args.
12429set dummy $tool_basename; ac_word=$2
12430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12431$as_echo_n "checking for $ac_word... " >&6; }
12432if ${ac_cv_path_UNIQ+:} false; then :
12433  $as_echo_n "(cached) " >&6
12434else
12435  case $UNIQ in
12436  [\\/]* | ?:[\\/]*)
12437  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12438  ;;
12439  *)
12440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12441for as_dir in $PATH
12442do
12443  IFS=$as_save_IFS
12444  test -z "$as_dir" && as_dir=.
12445    for ac_exec_ext in '' $ac_executable_extensions; do
12446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12447    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12449    break 2
12450  fi
12451done
12452  done
12453IFS=$as_save_IFS
12454
12455  ;;
12456esac
12457fi
12458UNIQ=$ac_cv_path_UNIQ
12459if test -n "$UNIQ"; then
12460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12461$as_echo "$UNIQ" >&6; }
12462else
12463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12464$as_echo "no" >&6; }
12465fi
12466
12467
12468          if test "x$UNIQ" = x; then
12469            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12470          fi
12471        else
12472          # Otherwise we believe it is a complete path. Use it as it is.
12473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12474$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12475          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12476$as_echo_n "checking for UNIQ... " >&6; }
12477          if test ! -x "$tool_specified"; then
12478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12479$as_echo "not found" >&6; }
12480            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12481          fi
12482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12483$as_echo "$tool_specified" >&6; }
12484        fi
12485      fi
12486    fi
12487
12488  fi
12489
12490
12491
12492  if test "x$UNIQ" = x; then
12493    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12494  fi
12495
12496
12497
12498
12499
12500  # Publish this variable in the help.
12501
12502
12503  if [ -z "${WC+x}" ]; then
12504    # The variable is not set by user, try to locate tool using the code snippet
12505    for ac_prog in wc
12506do
12507  # Extract the first word of "$ac_prog", so it can be a program name with args.
12508set dummy $ac_prog; ac_word=$2
12509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12510$as_echo_n "checking for $ac_word... " >&6; }
12511if ${ac_cv_path_WC+:} false; then :
12512  $as_echo_n "(cached) " >&6
12513else
12514  case $WC in
12515  [\\/]* | ?:[\\/]*)
12516  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12517  ;;
12518  *)
12519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12520for as_dir in $PATH
12521do
12522  IFS=$as_save_IFS
12523  test -z "$as_dir" && as_dir=.
12524    for ac_exec_ext in '' $ac_executable_extensions; do
12525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12526    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12528    break 2
12529  fi
12530done
12531  done
12532IFS=$as_save_IFS
12533
12534  ;;
12535esac
12536fi
12537WC=$ac_cv_path_WC
12538if test -n "$WC"; then
12539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12540$as_echo "$WC" >&6; }
12541else
12542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12543$as_echo "no" >&6; }
12544fi
12545
12546
12547  test -n "$WC" && break
12548done
12549
12550  else
12551    # The variable is set, but is it from the command line or the environment?
12552
12553    # Try to remove the string !WC! from our list.
12554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12556      # If it failed, the variable was not from the command line. Ignore it,
12557      # but warn the user (except for BASH, which is always set by the calling BASH).
12558      if test "xWC" != xBASH; then
12559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12560$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12561      fi
12562      # Try to locate tool using the code snippet
12563      for ac_prog in wc
12564do
12565  # Extract the first word of "$ac_prog", so it can be a program name with args.
12566set dummy $ac_prog; ac_word=$2
12567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12568$as_echo_n "checking for $ac_word... " >&6; }
12569if ${ac_cv_path_WC+:} false; then :
12570  $as_echo_n "(cached) " >&6
12571else
12572  case $WC in
12573  [\\/]* | ?:[\\/]*)
12574  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12575  ;;
12576  *)
12577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12578for as_dir in $PATH
12579do
12580  IFS=$as_save_IFS
12581  test -z "$as_dir" && as_dir=.
12582    for ac_exec_ext in '' $ac_executable_extensions; do
12583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12584    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12586    break 2
12587  fi
12588done
12589  done
12590IFS=$as_save_IFS
12591
12592  ;;
12593esac
12594fi
12595WC=$ac_cv_path_WC
12596if test -n "$WC"; then
12597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12598$as_echo "$WC" >&6; }
12599else
12600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12601$as_echo "no" >&6; }
12602fi
12603
12604
12605  test -n "$WC" && break
12606done
12607
12608    else
12609      # If it succeeded, then it was overridden by the user. We will use it
12610      # for the tool.
12611
12612      # First remove it from the list of overridden variables, so we can test
12613      # for unknown variables in the end.
12614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12615
12616      # Check if we try to supply an empty value
12617      if test "x$WC" = x; then
12618        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12619$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12621$as_echo_n "checking for WC... " >&6; }
12622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12623$as_echo "disabled" >&6; }
12624      else
12625        # Check if the provided tool contains a complete path.
12626        tool_specified="$WC"
12627        tool_basename="${tool_specified##*/}"
12628        if test "x$tool_basename" = "x$tool_specified"; then
12629          # A command without a complete path is provided, search $PATH.
12630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12631$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12632          # Extract the first word of "$tool_basename", so it can be a program name with args.
12633set dummy $tool_basename; ac_word=$2
12634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12635$as_echo_n "checking for $ac_word... " >&6; }
12636if ${ac_cv_path_WC+:} false; then :
12637  $as_echo_n "(cached) " >&6
12638else
12639  case $WC in
12640  [\\/]* | ?:[\\/]*)
12641  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12642  ;;
12643  *)
12644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12645for as_dir in $PATH
12646do
12647  IFS=$as_save_IFS
12648  test -z "$as_dir" && as_dir=.
12649    for ac_exec_ext in '' $ac_executable_extensions; do
12650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12651    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12653    break 2
12654  fi
12655done
12656  done
12657IFS=$as_save_IFS
12658
12659  ;;
12660esac
12661fi
12662WC=$ac_cv_path_WC
12663if test -n "$WC"; then
12664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12665$as_echo "$WC" >&6; }
12666else
12667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12668$as_echo "no" >&6; }
12669fi
12670
12671
12672          if test "x$WC" = x; then
12673            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12674          fi
12675        else
12676          # Otherwise we believe it is a complete path. Use it as it is.
12677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12678$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12679          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12680$as_echo_n "checking for WC... " >&6; }
12681          if test ! -x "$tool_specified"; then
12682            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12683$as_echo "not found" >&6; }
12684            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12685          fi
12686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12687$as_echo "$tool_specified" >&6; }
12688        fi
12689      fi
12690    fi
12691
12692  fi
12693
12694
12695
12696  if test "x$WC" = x; then
12697    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12698  fi
12699
12700
12701
12702
12703
12704  # Publish this variable in the help.
12705
12706
12707  if [ -z "${WHICH+x}" ]; then
12708    # The variable is not set by user, try to locate tool using the code snippet
12709    for ac_prog in which
12710do
12711  # Extract the first word of "$ac_prog", so it can be a program name with args.
12712set dummy $ac_prog; ac_word=$2
12713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12714$as_echo_n "checking for $ac_word... " >&6; }
12715if ${ac_cv_path_WHICH+:} false; then :
12716  $as_echo_n "(cached) " >&6
12717else
12718  case $WHICH in
12719  [\\/]* | ?:[\\/]*)
12720  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12721  ;;
12722  *)
12723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12724for as_dir in $PATH
12725do
12726  IFS=$as_save_IFS
12727  test -z "$as_dir" && as_dir=.
12728    for ac_exec_ext in '' $ac_executable_extensions; do
12729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12730    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12732    break 2
12733  fi
12734done
12735  done
12736IFS=$as_save_IFS
12737
12738  ;;
12739esac
12740fi
12741WHICH=$ac_cv_path_WHICH
12742if test -n "$WHICH"; then
12743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12744$as_echo "$WHICH" >&6; }
12745else
12746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12747$as_echo "no" >&6; }
12748fi
12749
12750
12751  test -n "$WHICH" && break
12752done
12753
12754  else
12755    # The variable is set, but is it from the command line or the environment?
12756
12757    # Try to remove the string !WHICH! from our list.
12758    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12759    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12760      # If it failed, the variable was not from the command line. Ignore it,
12761      # but warn the user (except for BASH, which is always set by the calling BASH).
12762      if test "xWHICH" != xBASH; then
12763        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12764$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12765      fi
12766      # Try to locate tool using the code snippet
12767      for ac_prog in which
12768do
12769  # Extract the first word of "$ac_prog", so it can be a program name with args.
12770set dummy $ac_prog; ac_word=$2
12771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12772$as_echo_n "checking for $ac_word... " >&6; }
12773if ${ac_cv_path_WHICH+:} false; then :
12774  $as_echo_n "(cached) " >&6
12775else
12776  case $WHICH in
12777  [\\/]* | ?:[\\/]*)
12778  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12779  ;;
12780  *)
12781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12782for as_dir in $PATH
12783do
12784  IFS=$as_save_IFS
12785  test -z "$as_dir" && as_dir=.
12786    for ac_exec_ext in '' $ac_executable_extensions; do
12787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12788    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12790    break 2
12791  fi
12792done
12793  done
12794IFS=$as_save_IFS
12795
12796  ;;
12797esac
12798fi
12799WHICH=$ac_cv_path_WHICH
12800if test -n "$WHICH"; then
12801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12802$as_echo "$WHICH" >&6; }
12803else
12804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12805$as_echo "no" >&6; }
12806fi
12807
12808
12809  test -n "$WHICH" && break
12810done
12811
12812    else
12813      # If it succeeded, then it was overridden by the user. We will use it
12814      # for the tool.
12815
12816      # First remove it from the list of overridden variables, so we can test
12817      # for unknown variables in the end.
12818      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12819
12820      # Check if we try to supply an empty value
12821      if test "x$WHICH" = x; then
12822        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12823$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12824        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12825$as_echo_n "checking for WHICH... " >&6; }
12826        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12827$as_echo "disabled" >&6; }
12828      else
12829        # Check if the provided tool contains a complete path.
12830        tool_specified="$WHICH"
12831        tool_basename="${tool_specified##*/}"
12832        if test "x$tool_basename" = "x$tool_specified"; then
12833          # A command without a complete path is provided, search $PATH.
12834          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12835$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12836          # Extract the first word of "$tool_basename", so it can be a program name with args.
12837set dummy $tool_basename; ac_word=$2
12838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12839$as_echo_n "checking for $ac_word... " >&6; }
12840if ${ac_cv_path_WHICH+:} false; then :
12841  $as_echo_n "(cached) " >&6
12842else
12843  case $WHICH in
12844  [\\/]* | ?:[\\/]*)
12845  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12846  ;;
12847  *)
12848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12849for as_dir in $PATH
12850do
12851  IFS=$as_save_IFS
12852  test -z "$as_dir" && as_dir=.
12853    for ac_exec_ext in '' $ac_executable_extensions; do
12854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12855    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12857    break 2
12858  fi
12859done
12860  done
12861IFS=$as_save_IFS
12862
12863  ;;
12864esac
12865fi
12866WHICH=$ac_cv_path_WHICH
12867if test -n "$WHICH"; then
12868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12869$as_echo "$WHICH" >&6; }
12870else
12871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12872$as_echo "no" >&6; }
12873fi
12874
12875
12876          if test "x$WHICH" = x; then
12877            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12878          fi
12879        else
12880          # Otherwise we believe it is a complete path. Use it as it is.
12881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12882$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12883          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12884$as_echo_n "checking for WHICH... " >&6; }
12885          if test ! -x "$tool_specified"; then
12886            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12887$as_echo "not found" >&6; }
12888            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12889          fi
12890          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12891$as_echo "$tool_specified" >&6; }
12892        fi
12893      fi
12894    fi
12895
12896  fi
12897
12898
12899
12900  if test "x$WHICH" = x; then
12901    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12902  fi
12903
12904
12905
12906
12907
12908  # Publish this variable in the help.
12909
12910
12911  if [ -z "${XARGS+x}" ]; then
12912    # The variable is not set by user, try to locate tool using the code snippet
12913    for ac_prog in xargs
12914do
12915  # Extract the first word of "$ac_prog", so it can be a program name with args.
12916set dummy $ac_prog; ac_word=$2
12917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12918$as_echo_n "checking for $ac_word... " >&6; }
12919if ${ac_cv_path_XARGS+:} false; then :
12920  $as_echo_n "(cached) " >&6
12921else
12922  case $XARGS in
12923  [\\/]* | ?:[\\/]*)
12924  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12925  ;;
12926  *)
12927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12928for as_dir in $PATH
12929do
12930  IFS=$as_save_IFS
12931  test -z "$as_dir" && as_dir=.
12932    for ac_exec_ext in '' $ac_executable_extensions; do
12933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12934    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12936    break 2
12937  fi
12938done
12939  done
12940IFS=$as_save_IFS
12941
12942  ;;
12943esac
12944fi
12945XARGS=$ac_cv_path_XARGS
12946if test -n "$XARGS"; then
12947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12948$as_echo "$XARGS" >&6; }
12949else
12950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12951$as_echo "no" >&6; }
12952fi
12953
12954
12955  test -n "$XARGS" && break
12956done
12957
12958  else
12959    # The variable is set, but is it from the command line or the environment?
12960
12961    # Try to remove the string !XARGS! from our list.
12962    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12963    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12964      # If it failed, the variable was not from the command line. Ignore it,
12965      # but warn the user (except for BASH, which is always set by the calling BASH).
12966      if test "xXARGS" != xBASH; then
12967        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12968$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12969      fi
12970      # Try to locate tool using the code snippet
12971      for ac_prog in xargs
12972do
12973  # Extract the first word of "$ac_prog", so it can be a program name with args.
12974set dummy $ac_prog; ac_word=$2
12975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12976$as_echo_n "checking for $ac_word... " >&6; }
12977if ${ac_cv_path_XARGS+:} false; then :
12978  $as_echo_n "(cached) " >&6
12979else
12980  case $XARGS in
12981  [\\/]* | ?:[\\/]*)
12982  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12983  ;;
12984  *)
12985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12986for as_dir in $PATH
12987do
12988  IFS=$as_save_IFS
12989  test -z "$as_dir" && as_dir=.
12990    for ac_exec_ext in '' $ac_executable_extensions; do
12991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12992    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12994    break 2
12995  fi
12996done
12997  done
12998IFS=$as_save_IFS
12999
13000  ;;
13001esac
13002fi
13003XARGS=$ac_cv_path_XARGS
13004if test -n "$XARGS"; then
13005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13006$as_echo "$XARGS" >&6; }
13007else
13008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13009$as_echo "no" >&6; }
13010fi
13011
13012
13013  test -n "$XARGS" && break
13014done
13015
13016    else
13017      # If it succeeded, then it was overridden by the user. We will use it
13018      # for the tool.
13019
13020      # First remove it from the list of overridden variables, so we can test
13021      # for unknown variables in the end.
13022      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13023
13024      # Check if we try to supply an empty value
13025      if test "x$XARGS" = x; then
13026        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13027$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13028        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13029$as_echo_n "checking for XARGS... " >&6; }
13030        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13031$as_echo "disabled" >&6; }
13032      else
13033        # Check if the provided tool contains a complete path.
13034        tool_specified="$XARGS"
13035        tool_basename="${tool_specified##*/}"
13036        if test "x$tool_basename" = "x$tool_specified"; then
13037          # A command without a complete path is provided, search $PATH.
13038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13039$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13040          # Extract the first word of "$tool_basename", so it can be a program name with args.
13041set dummy $tool_basename; ac_word=$2
13042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13043$as_echo_n "checking for $ac_word... " >&6; }
13044if ${ac_cv_path_XARGS+:} false; then :
13045  $as_echo_n "(cached) " >&6
13046else
13047  case $XARGS in
13048  [\\/]* | ?:[\\/]*)
13049  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13050  ;;
13051  *)
13052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13053for as_dir in $PATH
13054do
13055  IFS=$as_save_IFS
13056  test -z "$as_dir" && as_dir=.
13057    for ac_exec_ext in '' $ac_executable_extensions; do
13058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13059    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13061    break 2
13062  fi
13063done
13064  done
13065IFS=$as_save_IFS
13066
13067  ;;
13068esac
13069fi
13070XARGS=$ac_cv_path_XARGS
13071if test -n "$XARGS"; then
13072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13073$as_echo "$XARGS" >&6; }
13074else
13075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13076$as_echo "no" >&6; }
13077fi
13078
13079
13080          if test "x$XARGS" = x; then
13081            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13082          fi
13083        else
13084          # Otherwise we believe it is a complete path. Use it as it is.
13085          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13086$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13087          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13088$as_echo_n "checking for XARGS... " >&6; }
13089          if test ! -x "$tool_specified"; then
13090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13091$as_echo "not found" >&6; }
13092            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13093          fi
13094          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13095$as_echo "$tool_specified" >&6; }
13096        fi
13097      fi
13098    fi
13099
13100  fi
13101
13102
13103
13104  if test "x$XARGS" = x; then
13105    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13106  fi
13107
13108
13109
13110  # Then required tools that require some special treatment.
13111
13112
13113  # Publish this variable in the help.
13114
13115
13116  if [ -z "${AWK+x}" ]; then
13117    # The variable is not set by user, try to locate tool using the code snippet
13118    for ac_prog in gawk mawk nawk awk
13119do
13120  # Extract the first word of "$ac_prog", so it can be a program name with args.
13121set dummy $ac_prog; ac_word=$2
13122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13123$as_echo_n "checking for $ac_word... " >&6; }
13124if ${ac_cv_prog_AWK+:} false; then :
13125  $as_echo_n "(cached) " >&6
13126else
13127  if test -n "$AWK"; then
13128  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13129else
13130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13131for as_dir in $PATH
13132do
13133  IFS=$as_save_IFS
13134  test -z "$as_dir" && as_dir=.
13135    for ac_exec_ext in '' $ac_executable_extensions; do
13136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13137    ac_cv_prog_AWK="$ac_prog"
13138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13139    break 2
13140  fi
13141done
13142  done
13143IFS=$as_save_IFS
13144
13145fi
13146fi
13147AWK=$ac_cv_prog_AWK
13148if test -n "$AWK"; then
13149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13150$as_echo "$AWK" >&6; }
13151else
13152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13153$as_echo "no" >&6; }
13154fi
13155
13156
13157  test -n "$AWK" && break
13158done
13159
13160  else
13161    # The variable is set, but is it from the command line or the environment?
13162
13163    # Try to remove the string !AWK! from our list.
13164    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13165    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13166      # If it failed, the variable was not from the command line. Ignore it,
13167      # but warn the user (except for BASH, which is always set by the calling BASH).
13168      if test "xAWK" != xBASH; then
13169        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13170$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13171      fi
13172      # Try to locate tool using the code snippet
13173      for ac_prog in gawk mawk nawk awk
13174do
13175  # Extract the first word of "$ac_prog", so it can be a program name with args.
13176set dummy $ac_prog; ac_word=$2
13177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13178$as_echo_n "checking for $ac_word... " >&6; }
13179if ${ac_cv_prog_AWK+:} false; then :
13180  $as_echo_n "(cached) " >&6
13181else
13182  if test -n "$AWK"; then
13183  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13184else
13185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13186for as_dir in $PATH
13187do
13188  IFS=$as_save_IFS
13189  test -z "$as_dir" && as_dir=.
13190    for ac_exec_ext in '' $ac_executable_extensions; do
13191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13192    ac_cv_prog_AWK="$ac_prog"
13193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13194    break 2
13195  fi
13196done
13197  done
13198IFS=$as_save_IFS
13199
13200fi
13201fi
13202AWK=$ac_cv_prog_AWK
13203if test -n "$AWK"; then
13204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13205$as_echo "$AWK" >&6; }
13206else
13207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13208$as_echo "no" >&6; }
13209fi
13210
13211
13212  test -n "$AWK" && break
13213done
13214
13215    else
13216      # If it succeeded, then it was overridden by the user. We will use it
13217      # for the tool.
13218
13219      # First remove it from the list of overridden variables, so we can test
13220      # for unknown variables in the end.
13221      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13222
13223      # Check if we try to supply an empty value
13224      if test "x$AWK" = x; then
13225        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13226$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13227        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13228$as_echo_n "checking for AWK... " >&6; }
13229        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13230$as_echo "disabled" >&6; }
13231      else
13232        # Check if the provided tool contains a complete path.
13233        tool_specified="$AWK"
13234        tool_basename="${tool_specified##*/}"
13235        if test "x$tool_basename" = "x$tool_specified"; then
13236          # A command without a complete path is provided, search $PATH.
13237          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13238$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13239          # Extract the first word of "$tool_basename", so it can be a program name with args.
13240set dummy $tool_basename; ac_word=$2
13241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13242$as_echo_n "checking for $ac_word... " >&6; }
13243if ${ac_cv_path_AWK+:} false; then :
13244  $as_echo_n "(cached) " >&6
13245else
13246  case $AWK in
13247  [\\/]* | ?:[\\/]*)
13248  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13249  ;;
13250  *)
13251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13252for as_dir in $PATH
13253do
13254  IFS=$as_save_IFS
13255  test -z "$as_dir" && as_dir=.
13256    for ac_exec_ext in '' $ac_executable_extensions; do
13257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13258    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13260    break 2
13261  fi
13262done
13263  done
13264IFS=$as_save_IFS
13265
13266  ;;
13267esac
13268fi
13269AWK=$ac_cv_path_AWK
13270if test -n "$AWK"; then
13271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13272$as_echo "$AWK" >&6; }
13273else
13274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13275$as_echo "no" >&6; }
13276fi
13277
13278
13279          if test "x$AWK" = x; then
13280            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13281          fi
13282        else
13283          # Otherwise we believe it is a complete path. Use it as it is.
13284          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13285$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13286          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13287$as_echo_n "checking for AWK... " >&6; }
13288          if test ! -x "$tool_specified"; then
13289            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13290$as_echo "not found" >&6; }
13291            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13292          fi
13293          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13294$as_echo "$tool_specified" >&6; }
13295        fi
13296      fi
13297    fi
13298
13299  fi
13300
13301
13302  if test "x$AWK" = x; then
13303    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13304  fi
13305
13306
13307
13308
13309  # Publish this variable in the help.
13310
13311
13312  if [ -z "${GREP+x}" ]; then
13313    # The variable is not set by user, try to locate tool using the code snippet
13314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13315$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13316if ${ac_cv_path_GREP+:} false; then :
13317  $as_echo_n "(cached) " >&6
13318else
13319  if test -z "$GREP"; then
13320  ac_path_GREP_found=false
13321  # Loop through the user's path and test for each of PROGNAME-LIST
13322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13323for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13324do
13325  IFS=$as_save_IFS
13326  test -z "$as_dir" && as_dir=.
13327    for ac_prog in grep ggrep; do
13328    for ac_exec_ext in '' $ac_executable_extensions; do
13329      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13330      as_fn_executable_p "$ac_path_GREP" || continue
13331# Check for GNU ac_path_GREP and select it if it is found.
13332  # Check for GNU $ac_path_GREP
13333case `"$ac_path_GREP" --version 2>&1` in
13334*GNU*)
13335  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13336*)
13337  ac_count=0
13338  $as_echo_n 0123456789 >"conftest.in"
13339  while :
13340  do
13341    cat "conftest.in" "conftest.in" >"conftest.tmp"
13342    mv "conftest.tmp" "conftest.in"
13343    cp "conftest.in" "conftest.nl"
13344    $as_echo 'GREP' >> "conftest.nl"
13345    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13346    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13347    as_fn_arith $ac_count + 1 && ac_count=$as_val
13348    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13349      # Best one so far, save it but keep looking for a better one
13350      ac_cv_path_GREP="$ac_path_GREP"
13351      ac_path_GREP_max=$ac_count
13352    fi
13353    # 10*(2^10) chars as input seems more than enough
13354    test $ac_count -gt 10 && break
13355  done
13356  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13357esac
13358
13359      $ac_path_GREP_found && break 3
13360    done
13361  done
13362  done
13363IFS=$as_save_IFS
13364  if test -z "$ac_cv_path_GREP"; then
13365    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13366  fi
13367else
13368  ac_cv_path_GREP=$GREP
13369fi
13370
13371fi
13372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13373$as_echo "$ac_cv_path_GREP" >&6; }
13374 GREP="$ac_cv_path_GREP"
13375
13376
13377  else
13378    # The variable is set, but is it from the command line or the environment?
13379
13380    # Try to remove the string !GREP! from our list.
13381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13383      # If it failed, the variable was not from the command line. Ignore it,
13384      # but warn the user (except for BASH, which is always set by the calling BASH).
13385      if test "xGREP" != xBASH; then
13386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13387$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13388      fi
13389      # Try to locate tool using the code snippet
13390      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13391$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13392if ${ac_cv_path_GREP+:} false; then :
13393  $as_echo_n "(cached) " >&6
13394else
13395  if test -z "$GREP"; then
13396  ac_path_GREP_found=false
13397  # Loop through the user's path and test for each of PROGNAME-LIST
13398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13399for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13400do
13401  IFS=$as_save_IFS
13402  test -z "$as_dir" && as_dir=.
13403    for ac_prog in grep ggrep; do
13404    for ac_exec_ext in '' $ac_executable_extensions; do
13405      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13406      as_fn_executable_p "$ac_path_GREP" || continue
13407# Check for GNU ac_path_GREP and select it if it is found.
13408  # Check for GNU $ac_path_GREP
13409case `"$ac_path_GREP" --version 2>&1` in
13410*GNU*)
13411  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13412*)
13413  ac_count=0
13414  $as_echo_n 0123456789 >"conftest.in"
13415  while :
13416  do
13417    cat "conftest.in" "conftest.in" >"conftest.tmp"
13418    mv "conftest.tmp" "conftest.in"
13419    cp "conftest.in" "conftest.nl"
13420    $as_echo 'GREP' >> "conftest.nl"
13421    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13422    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13423    as_fn_arith $ac_count + 1 && ac_count=$as_val
13424    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13425      # Best one so far, save it but keep looking for a better one
13426      ac_cv_path_GREP="$ac_path_GREP"
13427      ac_path_GREP_max=$ac_count
13428    fi
13429    # 10*(2^10) chars as input seems more than enough
13430    test $ac_count -gt 10 && break
13431  done
13432  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13433esac
13434
13435      $ac_path_GREP_found && break 3
13436    done
13437  done
13438  done
13439IFS=$as_save_IFS
13440  if test -z "$ac_cv_path_GREP"; then
13441    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13442  fi
13443else
13444  ac_cv_path_GREP=$GREP
13445fi
13446
13447fi
13448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13449$as_echo "$ac_cv_path_GREP" >&6; }
13450 GREP="$ac_cv_path_GREP"
13451
13452
13453    else
13454      # If it succeeded, then it was overridden by the user. We will use it
13455      # for the tool.
13456
13457      # First remove it from the list of overridden variables, so we can test
13458      # for unknown variables in the end.
13459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13460
13461      # Check if we try to supply an empty value
13462      if test "x$GREP" = x; then
13463        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13464$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13465        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13466$as_echo_n "checking for GREP... " >&6; }
13467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13468$as_echo "disabled" >&6; }
13469      else
13470        # Check if the provided tool contains a complete path.
13471        tool_specified="$GREP"
13472        tool_basename="${tool_specified##*/}"
13473        if test "x$tool_basename" = "x$tool_specified"; then
13474          # A command without a complete path is provided, search $PATH.
13475          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13476$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13477          # Extract the first word of "$tool_basename", so it can be a program name with args.
13478set dummy $tool_basename; ac_word=$2
13479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13480$as_echo_n "checking for $ac_word... " >&6; }
13481if ${ac_cv_path_GREP+:} false; then :
13482  $as_echo_n "(cached) " >&6
13483else
13484  case $GREP in
13485  [\\/]* | ?:[\\/]*)
13486  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13487  ;;
13488  *)
13489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13490for as_dir in $PATH
13491do
13492  IFS=$as_save_IFS
13493  test -z "$as_dir" && as_dir=.
13494    for ac_exec_ext in '' $ac_executable_extensions; do
13495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13496    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13498    break 2
13499  fi
13500done
13501  done
13502IFS=$as_save_IFS
13503
13504  ;;
13505esac
13506fi
13507GREP=$ac_cv_path_GREP
13508if test -n "$GREP"; then
13509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13510$as_echo "$GREP" >&6; }
13511else
13512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13513$as_echo "no" >&6; }
13514fi
13515
13516
13517          if test "x$GREP" = x; then
13518            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13519          fi
13520        else
13521          # Otherwise we believe it is a complete path. Use it as it is.
13522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13523$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13524          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13525$as_echo_n "checking for GREP... " >&6; }
13526          if test ! -x "$tool_specified"; then
13527            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13528$as_echo "not found" >&6; }
13529            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13530          fi
13531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13532$as_echo "$tool_specified" >&6; }
13533        fi
13534      fi
13535    fi
13536
13537  fi
13538
13539
13540  if test "x$GREP" = x; then
13541    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13542  fi
13543
13544
13545
13546
13547  # Publish this variable in the help.
13548
13549
13550  if [ -z "${EGREP+x}" ]; then
13551    # The variable is not set by user, try to locate tool using the code snippet
13552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13553$as_echo_n "checking for egrep... " >&6; }
13554if ${ac_cv_path_EGREP+:} false; then :
13555  $as_echo_n "(cached) " >&6
13556else
13557  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13558   then ac_cv_path_EGREP="$GREP -E"
13559   else
13560     if test -z "$EGREP"; then
13561  ac_path_EGREP_found=false
13562  # Loop through the user's path and test for each of PROGNAME-LIST
13563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13564for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13565do
13566  IFS=$as_save_IFS
13567  test -z "$as_dir" && as_dir=.
13568    for ac_prog in egrep; do
13569    for ac_exec_ext in '' $ac_executable_extensions; do
13570      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13571      as_fn_executable_p "$ac_path_EGREP" || continue
13572# Check for GNU ac_path_EGREP and select it if it is found.
13573  # Check for GNU $ac_path_EGREP
13574case `"$ac_path_EGREP" --version 2>&1` in
13575*GNU*)
13576  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13577*)
13578  ac_count=0
13579  $as_echo_n 0123456789 >"conftest.in"
13580  while :
13581  do
13582    cat "conftest.in" "conftest.in" >"conftest.tmp"
13583    mv "conftest.tmp" "conftest.in"
13584    cp "conftest.in" "conftest.nl"
13585    $as_echo 'EGREP' >> "conftest.nl"
13586    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13587    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13588    as_fn_arith $ac_count + 1 && ac_count=$as_val
13589    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13590      # Best one so far, save it but keep looking for a better one
13591      ac_cv_path_EGREP="$ac_path_EGREP"
13592      ac_path_EGREP_max=$ac_count
13593    fi
13594    # 10*(2^10) chars as input seems more than enough
13595    test $ac_count -gt 10 && break
13596  done
13597  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13598esac
13599
13600      $ac_path_EGREP_found && break 3
13601    done
13602  done
13603  done
13604IFS=$as_save_IFS
13605  if test -z "$ac_cv_path_EGREP"; then
13606    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13607  fi
13608else
13609  ac_cv_path_EGREP=$EGREP
13610fi
13611
13612   fi
13613fi
13614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13615$as_echo "$ac_cv_path_EGREP" >&6; }
13616 EGREP="$ac_cv_path_EGREP"
13617
13618
13619  else
13620    # The variable is set, but is it from the command line or the environment?
13621
13622    # Try to remove the string !EGREP! from our list.
13623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13625      # If it failed, the variable was not from the command line. Ignore it,
13626      # but warn the user (except for BASH, which is always set by the calling BASH).
13627      if test "xEGREP" != xBASH; then
13628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13629$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13630      fi
13631      # Try to locate tool using the code snippet
13632      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13633$as_echo_n "checking for egrep... " >&6; }
13634if ${ac_cv_path_EGREP+:} false; then :
13635  $as_echo_n "(cached) " >&6
13636else
13637  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13638   then ac_cv_path_EGREP="$GREP -E"
13639   else
13640     if test -z "$EGREP"; then
13641  ac_path_EGREP_found=false
13642  # Loop through the user's path and test for each of PROGNAME-LIST
13643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13644for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13645do
13646  IFS=$as_save_IFS
13647  test -z "$as_dir" && as_dir=.
13648    for ac_prog in egrep; do
13649    for ac_exec_ext in '' $ac_executable_extensions; do
13650      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13651      as_fn_executable_p "$ac_path_EGREP" || continue
13652# Check for GNU ac_path_EGREP and select it if it is found.
13653  # Check for GNU $ac_path_EGREP
13654case `"$ac_path_EGREP" --version 2>&1` in
13655*GNU*)
13656  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13657*)
13658  ac_count=0
13659  $as_echo_n 0123456789 >"conftest.in"
13660  while :
13661  do
13662    cat "conftest.in" "conftest.in" >"conftest.tmp"
13663    mv "conftest.tmp" "conftest.in"
13664    cp "conftest.in" "conftest.nl"
13665    $as_echo 'EGREP' >> "conftest.nl"
13666    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13667    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13668    as_fn_arith $ac_count + 1 && ac_count=$as_val
13669    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13670      # Best one so far, save it but keep looking for a better one
13671      ac_cv_path_EGREP="$ac_path_EGREP"
13672      ac_path_EGREP_max=$ac_count
13673    fi
13674    # 10*(2^10) chars as input seems more than enough
13675    test $ac_count -gt 10 && break
13676  done
13677  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13678esac
13679
13680      $ac_path_EGREP_found && break 3
13681    done
13682  done
13683  done
13684IFS=$as_save_IFS
13685  if test -z "$ac_cv_path_EGREP"; then
13686    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13687  fi
13688else
13689  ac_cv_path_EGREP=$EGREP
13690fi
13691
13692   fi
13693fi
13694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13695$as_echo "$ac_cv_path_EGREP" >&6; }
13696 EGREP="$ac_cv_path_EGREP"
13697
13698
13699    else
13700      # If it succeeded, then it was overridden by the user. We will use it
13701      # for the tool.
13702
13703      # First remove it from the list of overridden variables, so we can test
13704      # for unknown variables in the end.
13705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13706
13707      # Check if we try to supply an empty value
13708      if test "x$EGREP" = x; then
13709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13710$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13712$as_echo_n "checking for EGREP... " >&6; }
13713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13714$as_echo "disabled" >&6; }
13715      else
13716        # Check if the provided tool contains a complete path.
13717        tool_specified="$EGREP"
13718        tool_basename="${tool_specified##*/}"
13719        if test "x$tool_basename" = "x$tool_specified"; then
13720          # A command without a complete path is provided, search $PATH.
13721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13722$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13723          # Extract the first word of "$tool_basename", so it can be a program name with args.
13724set dummy $tool_basename; ac_word=$2
13725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13726$as_echo_n "checking for $ac_word... " >&6; }
13727if ${ac_cv_path_EGREP+:} false; then :
13728  $as_echo_n "(cached) " >&6
13729else
13730  case $EGREP in
13731  [\\/]* | ?:[\\/]*)
13732  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13733  ;;
13734  *)
13735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13736for as_dir in $PATH
13737do
13738  IFS=$as_save_IFS
13739  test -z "$as_dir" && as_dir=.
13740    for ac_exec_ext in '' $ac_executable_extensions; do
13741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13742    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13744    break 2
13745  fi
13746done
13747  done
13748IFS=$as_save_IFS
13749
13750  ;;
13751esac
13752fi
13753EGREP=$ac_cv_path_EGREP
13754if test -n "$EGREP"; then
13755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13756$as_echo "$EGREP" >&6; }
13757else
13758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13759$as_echo "no" >&6; }
13760fi
13761
13762
13763          if test "x$EGREP" = x; then
13764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13765          fi
13766        else
13767          # Otherwise we believe it is a complete path. Use it as it is.
13768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13769$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13771$as_echo_n "checking for EGREP... " >&6; }
13772          if test ! -x "$tool_specified"; then
13773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13774$as_echo "not found" >&6; }
13775            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13776          fi
13777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13778$as_echo "$tool_specified" >&6; }
13779        fi
13780      fi
13781    fi
13782
13783  fi
13784
13785
13786  if test "x$EGREP" = x; then
13787    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13788  fi
13789
13790
13791
13792
13793  # Publish this variable in the help.
13794
13795
13796  if [ -z "${FGREP+x}" ]; then
13797    # The variable is not set by user, try to locate tool using the code snippet
13798    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13799$as_echo_n "checking for fgrep... " >&6; }
13800if ${ac_cv_path_FGREP+:} false; then :
13801  $as_echo_n "(cached) " >&6
13802else
13803  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13804   then ac_cv_path_FGREP="$GREP -F"
13805   else
13806     if test -z "$FGREP"; then
13807  ac_path_FGREP_found=false
13808  # Loop through the user's path and test for each of PROGNAME-LIST
13809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13810for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13811do
13812  IFS=$as_save_IFS
13813  test -z "$as_dir" && as_dir=.
13814    for ac_prog in fgrep; do
13815    for ac_exec_ext in '' $ac_executable_extensions; do
13816      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13817      as_fn_executable_p "$ac_path_FGREP" || continue
13818# Check for GNU ac_path_FGREP and select it if it is found.
13819  # Check for GNU $ac_path_FGREP
13820case `"$ac_path_FGREP" --version 2>&1` in
13821*GNU*)
13822  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13823*)
13824  ac_count=0
13825  $as_echo_n 0123456789 >"conftest.in"
13826  while :
13827  do
13828    cat "conftest.in" "conftest.in" >"conftest.tmp"
13829    mv "conftest.tmp" "conftest.in"
13830    cp "conftest.in" "conftest.nl"
13831    $as_echo 'FGREP' >> "conftest.nl"
13832    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13833    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13834    as_fn_arith $ac_count + 1 && ac_count=$as_val
13835    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13836      # Best one so far, save it but keep looking for a better one
13837      ac_cv_path_FGREP="$ac_path_FGREP"
13838      ac_path_FGREP_max=$ac_count
13839    fi
13840    # 10*(2^10) chars as input seems more than enough
13841    test $ac_count -gt 10 && break
13842  done
13843  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13844esac
13845
13846      $ac_path_FGREP_found && break 3
13847    done
13848  done
13849  done
13850IFS=$as_save_IFS
13851  if test -z "$ac_cv_path_FGREP"; then
13852    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13853  fi
13854else
13855  ac_cv_path_FGREP=$FGREP
13856fi
13857
13858   fi
13859fi
13860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13861$as_echo "$ac_cv_path_FGREP" >&6; }
13862 FGREP="$ac_cv_path_FGREP"
13863
13864
13865  else
13866    # The variable is set, but is it from the command line or the environment?
13867
13868    # Try to remove the string !FGREP! from our list.
13869    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13870    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13871      # If it failed, the variable was not from the command line. Ignore it,
13872      # but warn the user (except for BASH, which is always set by the calling BASH).
13873      if test "xFGREP" != xBASH; then
13874        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13875$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13876      fi
13877      # Try to locate tool using the code snippet
13878      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13879$as_echo_n "checking for fgrep... " >&6; }
13880if ${ac_cv_path_FGREP+:} false; then :
13881  $as_echo_n "(cached) " >&6
13882else
13883  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13884   then ac_cv_path_FGREP="$GREP -F"
13885   else
13886     if test -z "$FGREP"; then
13887  ac_path_FGREP_found=false
13888  # Loop through the user's path and test for each of PROGNAME-LIST
13889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13890for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13891do
13892  IFS=$as_save_IFS
13893  test -z "$as_dir" && as_dir=.
13894    for ac_prog in fgrep; do
13895    for ac_exec_ext in '' $ac_executable_extensions; do
13896      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13897      as_fn_executable_p "$ac_path_FGREP" || continue
13898# Check for GNU ac_path_FGREP and select it if it is found.
13899  # Check for GNU $ac_path_FGREP
13900case `"$ac_path_FGREP" --version 2>&1` in
13901*GNU*)
13902  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13903*)
13904  ac_count=0
13905  $as_echo_n 0123456789 >"conftest.in"
13906  while :
13907  do
13908    cat "conftest.in" "conftest.in" >"conftest.tmp"
13909    mv "conftest.tmp" "conftest.in"
13910    cp "conftest.in" "conftest.nl"
13911    $as_echo 'FGREP' >> "conftest.nl"
13912    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13913    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13914    as_fn_arith $ac_count + 1 && ac_count=$as_val
13915    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13916      # Best one so far, save it but keep looking for a better one
13917      ac_cv_path_FGREP="$ac_path_FGREP"
13918      ac_path_FGREP_max=$ac_count
13919    fi
13920    # 10*(2^10) chars as input seems more than enough
13921    test $ac_count -gt 10 && break
13922  done
13923  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13924esac
13925
13926      $ac_path_FGREP_found && break 3
13927    done
13928  done
13929  done
13930IFS=$as_save_IFS
13931  if test -z "$ac_cv_path_FGREP"; then
13932    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13933  fi
13934else
13935  ac_cv_path_FGREP=$FGREP
13936fi
13937
13938   fi
13939fi
13940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13941$as_echo "$ac_cv_path_FGREP" >&6; }
13942 FGREP="$ac_cv_path_FGREP"
13943
13944
13945    else
13946      # If it succeeded, then it was overridden by the user. We will use it
13947      # for the tool.
13948
13949      # First remove it from the list of overridden variables, so we can test
13950      # for unknown variables in the end.
13951      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13952
13953      # Check if we try to supply an empty value
13954      if test "x$FGREP" = x; then
13955        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13956$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13957        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13958$as_echo_n "checking for FGREP... " >&6; }
13959        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13960$as_echo "disabled" >&6; }
13961      else
13962        # Check if the provided tool contains a complete path.
13963        tool_specified="$FGREP"
13964        tool_basename="${tool_specified##*/}"
13965        if test "x$tool_basename" = "x$tool_specified"; then
13966          # A command without a complete path is provided, search $PATH.
13967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13968$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13969          # Extract the first word of "$tool_basename", so it can be a program name with args.
13970set dummy $tool_basename; ac_word=$2
13971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13972$as_echo_n "checking for $ac_word... " >&6; }
13973if ${ac_cv_path_FGREP+:} false; then :
13974  $as_echo_n "(cached) " >&6
13975else
13976  case $FGREP in
13977  [\\/]* | ?:[\\/]*)
13978  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13979  ;;
13980  *)
13981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13982for as_dir in $PATH
13983do
13984  IFS=$as_save_IFS
13985  test -z "$as_dir" && as_dir=.
13986    for ac_exec_ext in '' $ac_executable_extensions; do
13987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13988    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13990    break 2
13991  fi
13992done
13993  done
13994IFS=$as_save_IFS
13995
13996  ;;
13997esac
13998fi
13999FGREP=$ac_cv_path_FGREP
14000if test -n "$FGREP"; then
14001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14002$as_echo "$FGREP" >&6; }
14003else
14004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14005$as_echo "no" >&6; }
14006fi
14007
14008
14009          if test "x$FGREP" = x; then
14010            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14011          fi
14012        else
14013          # Otherwise we believe it is a complete path. Use it as it is.
14014          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14015$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14016          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14017$as_echo_n "checking for FGREP... " >&6; }
14018          if test ! -x "$tool_specified"; then
14019            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14020$as_echo "not found" >&6; }
14021            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14022          fi
14023          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14024$as_echo "$tool_specified" >&6; }
14025        fi
14026      fi
14027    fi
14028
14029  fi
14030
14031
14032  if test "x$FGREP" = x; then
14033    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14034  fi
14035
14036
14037
14038
14039  # Publish this variable in the help.
14040
14041
14042  if [ -z "${SED+x}" ]; then
14043    # The variable is not set by user, try to locate tool using the code snippet
14044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14045$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14046if ${ac_cv_path_SED+:} false; then :
14047  $as_echo_n "(cached) " >&6
14048else
14049            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14050     for ac_i in 1 2 3 4 5 6 7; do
14051       ac_script="$ac_script$as_nl$ac_script"
14052     done
14053     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14054     { ac_script=; unset ac_script;}
14055     if test -z "$SED"; then
14056  ac_path_SED_found=false
14057  # Loop through the user's path and test for each of PROGNAME-LIST
14058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14059for as_dir in $PATH
14060do
14061  IFS=$as_save_IFS
14062  test -z "$as_dir" && as_dir=.
14063    for ac_prog in sed gsed; do
14064    for ac_exec_ext in '' $ac_executable_extensions; do
14065      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14066      as_fn_executable_p "$ac_path_SED" || continue
14067# Check for GNU ac_path_SED and select it if it is found.
14068  # Check for GNU $ac_path_SED
14069case `"$ac_path_SED" --version 2>&1` in
14070*GNU*)
14071  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14072*)
14073  ac_count=0
14074  $as_echo_n 0123456789 >"conftest.in"
14075  while :
14076  do
14077    cat "conftest.in" "conftest.in" >"conftest.tmp"
14078    mv "conftest.tmp" "conftest.in"
14079    cp "conftest.in" "conftest.nl"
14080    $as_echo '' >> "conftest.nl"
14081    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14082    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14083    as_fn_arith $ac_count + 1 && ac_count=$as_val
14084    if test $ac_count -gt ${ac_path_SED_max-0}; then
14085      # Best one so far, save it but keep looking for a better one
14086      ac_cv_path_SED="$ac_path_SED"
14087      ac_path_SED_max=$ac_count
14088    fi
14089    # 10*(2^10) chars as input seems more than enough
14090    test $ac_count -gt 10 && break
14091  done
14092  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14093esac
14094
14095      $ac_path_SED_found && break 3
14096    done
14097  done
14098  done
14099IFS=$as_save_IFS
14100  if test -z "$ac_cv_path_SED"; then
14101    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14102  fi
14103else
14104  ac_cv_path_SED=$SED
14105fi
14106
14107fi
14108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14109$as_echo "$ac_cv_path_SED" >&6; }
14110 SED="$ac_cv_path_SED"
14111  rm -f conftest.sed
14112
14113  else
14114    # The variable is set, but is it from the command line or the environment?
14115
14116    # Try to remove the string !SED! from our list.
14117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14119      # If it failed, the variable was not from the command line. Ignore it,
14120      # but warn the user (except for BASH, which is always set by the calling BASH).
14121      if test "xSED" != xBASH; then
14122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14123$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14124      fi
14125      # Try to locate tool using the code snippet
14126      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14127$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14128if ${ac_cv_path_SED+:} false; then :
14129  $as_echo_n "(cached) " >&6
14130else
14131            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14132     for ac_i in 1 2 3 4 5 6 7; do
14133       ac_script="$ac_script$as_nl$ac_script"
14134     done
14135     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14136     { ac_script=; unset ac_script;}
14137     if test -z "$SED"; then
14138  ac_path_SED_found=false
14139  # Loop through the user's path and test for each of PROGNAME-LIST
14140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14141for as_dir in $PATH
14142do
14143  IFS=$as_save_IFS
14144  test -z "$as_dir" && as_dir=.
14145    for ac_prog in sed gsed; do
14146    for ac_exec_ext in '' $ac_executable_extensions; do
14147      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14148      as_fn_executable_p "$ac_path_SED" || continue
14149# Check for GNU ac_path_SED and select it if it is found.
14150  # Check for GNU $ac_path_SED
14151case `"$ac_path_SED" --version 2>&1` in
14152*GNU*)
14153  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14154*)
14155  ac_count=0
14156  $as_echo_n 0123456789 >"conftest.in"
14157  while :
14158  do
14159    cat "conftest.in" "conftest.in" >"conftest.tmp"
14160    mv "conftest.tmp" "conftest.in"
14161    cp "conftest.in" "conftest.nl"
14162    $as_echo '' >> "conftest.nl"
14163    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14164    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14165    as_fn_arith $ac_count + 1 && ac_count=$as_val
14166    if test $ac_count -gt ${ac_path_SED_max-0}; then
14167      # Best one so far, save it but keep looking for a better one
14168      ac_cv_path_SED="$ac_path_SED"
14169      ac_path_SED_max=$ac_count
14170    fi
14171    # 10*(2^10) chars as input seems more than enough
14172    test $ac_count -gt 10 && break
14173  done
14174  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14175esac
14176
14177      $ac_path_SED_found && break 3
14178    done
14179  done
14180  done
14181IFS=$as_save_IFS
14182  if test -z "$ac_cv_path_SED"; then
14183    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14184  fi
14185else
14186  ac_cv_path_SED=$SED
14187fi
14188
14189fi
14190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14191$as_echo "$ac_cv_path_SED" >&6; }
14192 SED="$ac_cv_path_SED"
14193  rm -f conftest.sed
14194
14195    else
14196      # If it succeeded, then it was overridden by the user. We will use it
14197      # for the tool.
14198
14199      # First remove it from the list of overridden variables, so we can test
14200      # for unknown variables in the end.
14201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14202
14203      # Check if we try to supply an empty value
14204      if test "x$SED" = x; then
14205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14206$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14208$as_echo_n "checking for SED... " >&6; }
14209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14210$as_echo "disabled" >&6; }
14211      else
14212        # Check if the provided tool contains a complete path.
14213        tool_specified="$SED"
14214        tool_basename="${tool_specified##*/}"
14215        if test "x$tool_basename" = "x$tool_specified"; then
14216          # A command without a complete path is provided, search $PATH.
14217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14218$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14219          # Extract the first word of "$tool_basename", so it can be a program name with args.
14220set dummy $tool_basename; ac_word=$2
14221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14222$as_echo_n "checking for $ac_word... " >&6; }
14223if ${ac_cv_path_SED+:} false; then :
14224  $as_echo_n "(cached) " >&6
14225else
14226  case $SED in
14227  [\\/]* | ?:[\\/]*)
14228  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14229  ;;
14230  *)
14231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14232for as_dir in $PATH
14233do
14234  IFS=$as_save_IFS
14235  test -z "$as_dir" && as_dir=.
14236    for ac_exec_ext in '' $ac_executable_extensions; do
14237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14238    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14240    break 2
14241  fi
14242done
14243  done
14244IFS=$as_save_IFS
14245
14246  ;;
14247esac
14248fi
14249SED=$ac_cv_path_SED
14250if test -n "$SED"; then
14251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14252$as_echo "$SED" >&6; }
14253else
14254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14255$as_echo "no" >&6; }
14256fi
14257
14258
14259          if test "x$SED" = x; then
14260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14261          fi
14262        else
14263          # Otherwise we believe it is a complete path. Use it as it is.
14264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14265$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14267$as_echo_n "checking for SED... " >&6; }
14268          if test ! -x "$tool_specified"; then
14269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14270$as_echo "not found" >&6; }
14271            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14272          fi
14273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14274$as_echo "$tool_specified" >&6; }
14275        fi
14276      fi
14277    fi
14278
14279  fi
14280
14281
14282  if test "x$SED" = x; then
14283    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14284  fi
14285
14286
14287
14288  # Always force rm.
14289  RM="$RM -f"
14290
14291  # pwd behaves differently on various platforms and some don't support the -L flag.
14292  # Always use the bash builtin pwd to get uniform behavior.
14293  THEPWDCMD=pwd
14294
14295  # These are not required on all platforms
14296
14297
14298  # Publish this variable in the help.
14299
14300
14301  if [ -z "${CYGPATH+x}" ]; then
14302    # The variable is not set by user, try to locate tool using the code snippet
14303    for ac_prog in cygpath
14304do
14305  # Extract the first word of "$ac_prog", so it can be a program name with args.
14306set dummy $ac_prog; ac_word=$2
14307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14308$as_echo_n "checking for $ac_word... " >&6; }
14309if ${ac_cv_path_CYGPATH+:} false; then :
14310  $as_echo_n "(cached) " >&6
14311else
14312  case $CYGPATH in
14313  [\\/]* | ?:[\\/]*)
14314  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14315  ;;
14316  *)
14317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14318for as_dir in $PATH
14319do
14320  IFS=$as_save_IFS
14321  test -z "$as_dir" && as_dir=.
14322    for ac_exec_ext in '' $ac_executable_extensions; do
14323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14324    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14326    break 2
14327  fi
14328done
14329  done
14330IFS=$as_save_IFS
14331
14332  ;;
14333esac
14334fi
14335CYGPATH=$ac_cv_path_CYGPATH
14336if test -n "$CYGPATH"; then
14337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14338$as_echo "$CYGPATH" >&6; }
14339else
14340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14341$as_echo "no" >&6; }
14342fi
14343
14344
14345  test -n "$CYGPATH" && break
14346done
14347
14348  else
14349    # The variable is set, but is it from the command line or the environment?
14350
14351    # Try to remove the string !CYGPATH! from our list.
14352    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14353    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14354      # If it failed, the variable was not from the command line. Ignore it,
14355      # but warn the user (except for BASH, which is always set by the calling BASH).
14356      if test "xCYGPATH" != xBASH; then
14357        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14358$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14359      fi
14360      # Try to locate tool using the code snippet
14361      for ac_prog in cygpath
14362do
14363  # Extract the first word of "$ac_prog", so it can be a program name with args.
14364set dummy $ac_prog; ac_word=$2
14365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14366$as_echo_n "checking for $ac_word... " >&6; }
14367if ${ac_cv_path_CYGPATH+:} false; then :
14368  $as_echo_n "(cached) " >&6
14369else
14370  case $CYGPATH in
14371  [\\/]* | ?:[\\/]*)
14372  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14373  ;;
14374  *)
14375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14376for as_dir in $PATH
14377do
14378  IFS=$as_save_IFS
14379  test -z "$as_dir" && as_dir=.
14380    for ac_exec_ext in '' $ac_executable_extensions; do
14381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14382    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14384    break 2
14385  fi
14386done
14387  done
14388IFS=$as_save_IFS
14389
14390  ;;
14391esac
14392fi
14393CYGPATH=$ac_cv_path_CYGPATH
14394if test -n "$CYGPATH"; then
14395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14396$as_echo "$CYGPATH" >&6; }
14397else
14398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14399$as_echo "no" >&6; }
14400fi
14401
14402
14403  test -n "$CYGPATH" && break
14404done
14405
14406    else
14407      # If it succeeded, then it was overridden by the user. We will use it
14408      # for the tool.
14409
14410      # First remove it from the list of overridden variables, so we can test
14411      # for unknown variables in the end.
14412      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14413
14414      # Check if we try to supply an empty value
14415      if test "x$CYGPATH" = x; then
14416        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14417$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14419$as_echo_n "checking for CYGPATH... " >&6; }
14420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14421$as_echo "disabled" >&6; }
14422      else
14423        # Check if the provided tool contains a complete path.
14424        tool_specified="$CYGPATH"
14425        tool_basename="${tool_specified##*/}"
14426        if test "x$tool_basename" = "x$tool_specified"; then
14427          # A command without a complete path is provided, search $PATH.
14428          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14429$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14430          # Extract the first word of "$tool_basename", so it can be a program name with args.
14431set dummy $tool_basename; ac_word=$2
14432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14433$as_echo_n "checking for $ac_word... " >&6; }
14434if ${ac_cv_path_CYGPATH+:} false; then :
14435  $as_echo_n "(cached) " >&6
14436else
14437  case $CYGPATH in
14438  [\\/]* | ?:[\\/]*)
14439  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14440  ;;
14441  *)
14442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14443for as_dir in $PATH
14444do
14445  IFS=$as_save_IFS
14446  test -z "$as_dir" && as_dir=.
14447    for ac_exec_ext in '' $ac_executable_extensions; do
14448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14449    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14451    break 2
14452  fi
14453done
14454  done
14455IFS=$as_save_IFS
14456
14457  ;;
14458esac
14459fi
14460CYGPATH=$ac_cv_path_CYGPATH
14461if test -n "$CYGPATH"; then
14462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14463$as_echo "$CYGPATH" >&6; }
14464else
14465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14466$as_echo "no" >&6; }
14467fi
14468
14469
14470          if test "x$CYGPATH" = x; then
14471            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14472          fi
14473        else
14474          # Otherwise we believe it is a complete path. Use it as it is.
14475          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14476$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14477          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14478$as_echo_n "checking for CYGPATH... " >&6; }
14479          if test ! -x "$tool_specified"; then
14480            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14481$as_echo "not found" >&6; }
14482            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14483          fi
14484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14485$as_echo "$tool_specified" >&6; }
14486        fi
14487      fi
14488    fi
14489
14490  fi
14491
14492
14493
14494
14495  # Publish this variable in the help.
14496
14497
14498  if [ -z "${READLINK+x}" ]; then
14499    # The variable is not set by user, try to locate tool using the code snippet
14500    for ac_prog in greadlink readlink
14501do
14502  # Extract the first word of "$ac_prog", so it can be a program name with args.
14503set dummy $ac_prog; ac_word=$2
14504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14505$as_echo_n "checking for $ac_word... " >&6; }
14506if ${ac_cv_path_READLINK+:} false; then :
14507  $as_echo_n "(cached) " >&6
14508else
14509  case $READLINK in
14510  [\\/]* | ?:[\\/]*)
14511  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14512  ;;
14513  *)
14514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14515for as_dir in $PATH
14516do
14517  IFS=$as_save_IFS
14518  test -z "$as_dir" && as_dir=.
14519    for ac_exec_ext in '' $ac_executable_extensions; do
14520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14521    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14523    break 2
14524  fi
14525done
14526  done
14527IFS=$as_save_IFS
14528
14529  ;;
14530esac
14531fi
14532READLINK=$ac_cv_path_READLINK
14533if test -n "$READLINK"; then
14534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14535$as_echo "$READLINK" >&6; }
14536else
14537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14538$as_echo "no" >&6; }
14539fi
14540
14541
14542  test -n "$READLINK" && break
14543done
14544
14545  else
14546    # The variable is set, but is it from the command line or the environment?
14547
14548    # Try to remove the string !READLINK! from our list.
14549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14551      # If it failed, the variable was not from the command line. Ignore it,
14552      # but warn the user (except for BASH, which is always set by the calling BASH).
14553      if test "xREADLINK" != xBASH; then
14554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14555$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14556      fi
14557      # Try to locate tool using the code snippet
14558      for ac_prog in greadlink readlink
14559do
14560  # Extract the first word of "$ac_prog", so it can be a program name with args.
14561set dummy $ac_prog; ac_word=$2
14562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14563$as_echo_n "checking for $ac_word... " >&6; }
14564if ${ac_cv_path_READLINK+:} false; then :
14565  $as_echo_n "(cached) " >&6
14566else
14567  case $READLINK in
14568  [\\/]* | ?:[\\/]*)
14569  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14570  ;;
14571  *)
14572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14573for as_dir in $PATH
14574do
14575  IFS=$as_save_IFS
14576  test -z "$as_dir" && as_dir=.
14577    for ac_exec_ext in '' $ac_executable_extensions; do
14578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14579    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14581    break 2
14582  fi
14583done
14584  done
14585IFS=$as_save_IFS
14586
14587  ;;
14588esac
14589fi
14590READLINK=$ac_cv_path_READLINK
14591if test -n "$READLINK"; then
14592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14593$as_echo "$READLINK" >&6; }
14594else
14595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14596$as_echo "no" >&6; }
14597fi
14598
14599
14600  test -n "$READLINK" && break
14601done
14602
14603    else
14604      # If it succeeded, then it was overridden by the user. We will use it
14605      # for the tool.
14606
14607      # First remove it from the list of overridden variables, so we can test
14608      # for unknown variables in the end.
14609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14610
14611      # Check if we try to supply an empty value
14612      if test "x$READLINK" = x; then
14613        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14614$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14616$as_echo_n "checking for READLINK... " >&6; }
14617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14618$as_echo "disabled" >&6; }
14619      else
14620        # Check if the provided tool contains a complete path.
14621        tool_specified="$READLINK"
14622        tool_basename="${tool_specified##*/}"
14623        if test "x$tool_basename" = "x$tool_specified"; then
14624          # A command without a complete path is provided, search $PATH.
14625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14626$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14627          # Extract the first word of "$tool_basename", so it can be a program name with args.
14628set dummy $tool_basename; ac_word=$2
14629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14630$as_echo_n "checking for $ac_word... " >&6; }
14631if ${ac_cv_path_READLINK+:} false; then :
14632  $as_echo_n "(cached) " >&6
14633else
14634  case $READLINK in
14635  [\\/]* | ?:[\\/]*)
14636  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14637  ;;
14638  *)
14639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14640for as_dir in $PATH
14641do
14642  IFS=$as_save_IFS
14643  test -z "$as_dir" && as_dir=.
14644    for ac_exec_ext in '' $ac_executable_extensions; do
14645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14646    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14648    break 2
14649  fi
14650done
14651  done
14652IFS=$as_save_IFS
14653
14654  ;;
14655esac
14656fi
14657READLINK=$ac_cv_path_READLINK
14658if test -n "$READLINK"; then
14659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14660$as_echo "$READLINK" >&6; }
14661else
14662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14663$as_echo "no" >&6; }
14664fi
14665
14666
14667          if test "x$READLINK" = x; then
14668            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14669          fi
14670        else
14671          # Otherwise we believe it is a complete path. Use it as it is.
14672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14673$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14674          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14675$as_echo_n "checking for READLINK... " >&6; }
14676          if test ! -x "$tool_specified"; then
14677            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14678$as_echo "not found" >&6; }
14679            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14680          fi
14681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14682$as_echo "$tool_specified" >&6; }
14683        fi
14684      fi
14685    fi
14686
14687  fi
14688
14689
14690
14691
14692  # Publish this variable in the help.
14693
14694
14695  if [ -z "${DF+x}" ]; then
14696    # The variable is not set by user, try to locate tool using the code snippet
14697    for ac_prog in df
14698do
14699  # Extract the first word of "$ac_prog", so it can be a program name with args.
14700set dummy $ac_prog; ac_word=$2
14701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14702$as_echo_n "checking for $ac_word... " >&6; }
14703if ${ac_cv_path_DF+:} false; then :
14704  $as_echo_n "(cached) " >&6
14705else
14706  case $DF in
14707  [\\/]* | ?:[\\/]*)
14708  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14709  ;;
14710  *)
14711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14712for as_dir in $PATH
14713do
14714  IFS=$as_save_IFS
14715  test -z "$as_dir" && as_dir=.
14716    for ac_exec_ext in '' $ac_executable_extensions; do
14717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14718    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14720    break 2
14721  fi
14722done
14723  done
14724IFS=$as_save_IFS
14725
14726  ;;
14727esac
14728fi
14729DF=$ac_cv_path_DF
14730if test -n "$DF"; then
14731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14732$as_echo "$DF" >&6; }
14733else
14734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14735$as_echo "no" >&6; }
14736fi
14737
14738
14739  test -n "$DF" && break
14740done
14741
14742  else
14743    # The variable is set, but is it from the command line or the environment?
14744
14745    # Try to remove the string !DF! from our list.
14746    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14747    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14748      # If it failed, the variable was not from the command line. Ignore it,
14749      # but warn the user (except for BASH, which is always set by the calling BASH).
14750      if test "xDF" != xBASH; then
14751        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14752$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14753      fi
14754      # Try to locate tool using the code snippet
14755      for ac_prog in df
14756do
14757  # Extract the first word of "$ac_prog", so it can be a program name with args.
14758set dummy $ac_prog; ac_word=$2
14759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14760$as_echo_n "checking for $ac_word... " >&6; }
14761if ${ac_cv_path_DF+:} false; then :
14762  $as_echo_n "(cached) " >&6
14763else
14764  case $DF in
14765  [\\/]* | ?:[\\/]*)
14766  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14767  ;;
14768  *)
14769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14770for as_dir in $PATH
14771do
14772  IFS=$as_save_IFS
14773  test -z "$as_dir" && as_dir=.
14774    for ac_exec_ext in '' $ac_executable_extensions; do
14775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14776    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14778    break 2
14779  fi
14780done
14781  done
14782IFS=$as_save_IFS
14783
14784  ;;
14785esac
14786fi
14787DF=$ac_cv_path_DF
14788if test -n "$DF"; then
14789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14790$as_echo "$DF" >&6; }
14791else
14792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14793$as_echo "no" >&6; }
14794fi
14795
14796
14797  test -n "$DF" && break
14798done
14799
14800    else
14801      # If it succeeded, then it was overridden by the user. We will use it
14802      # for the tool.
14803
14804      # First remove it from the list of overridden variables, so we can test
14805      # for unknown variables in the end.
14806      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14807
14808      # Check if we try to supply an empty value
14809      if test "x$DF" = x; then
14810        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14811$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14813$as_echo_n "checking for DF... " >&6; }
14814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14815$as_echo "disabled" >&6; }
14816      else
14817        # Check if the provided tool contains a complete path.
14818        tool_specified="$DF"
14819        tool_basename="${tool_specified##*/}"
14820        if test "x$tool_basename" = "x$tool_specified"; then
14821          # A command without a complete path is provided, search $PATH.
14822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14823$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14824          # Extract the first word of "$tool_basename", so it can be a program name with args.
14825set dummy $tool_basename; ac_word=$2
14826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14827$as_echo_n "checking for $ac_word... " >&6; }
14828if ${ac_cv_path_DF+:} false; then :
14829  $as_echo_n "(cached) " >&6
14830else
14831  case $DF in
14832  [\\/]* | ?:[\\/]*)
14833  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14834  ;;
14835  *)
14836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14837for as_dir in $PATH
14838do
14839  IFS=$as_save_IFS
14840  test -z "$as_dir" && as_dir=.
14841    for ac_exec_ext in '' $ac_executable_extensions; do
14842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14843    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14845    break 2
14846  fi
14847done
14848  done
14849IFS=$as_save_IFS
14850
14851  ;;
14852esac
14853fi
14854DF=$ac_cv_path_DF
14855if test -n "$DF"; then
14856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14857$as_echo "$DF" >&6; }
14858else
14859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14860$as_echo "no" >&6; }
14861fi
14862
14863
14864          if test "x$DF" = x; then
14865            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14866          fi
14867        else
14868          # Otherwise we believe it is a complete path. Use it as it is.
14869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14870$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14871          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14872$as_echo_n "checking for DF... " >&6; }
14873          if test ! -x "$tool_specified"; then
14874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14875$as_echo "not found" >&6; }
14876            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14877          fi
14878          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14879$as_echo "$tool_specified" >&6; }
14880        fi
14881      fi
14882    fi
14883
14884  fi
14885
14886
14887
14888
14889  # Publish this variable in the help.
14890
14891
14892  if [ -z "${CPIO+x}" ]; then
14893    # The variable is not set by user, try to locate tool using the code snippet
14894    for ac_prog in cpio bsdcpio
14895do
14896  # Extract the first word of "$ac_prog", so it can be a program name with args.
14897set dummy $ac_prog; ac_word=$2
14898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14899$as_echo_n "checking for $ac_word... " >&6; }
14900if ${ac_cv_path_CPIO+:} false; then :
14901  $as_echo_n "(cached) " >&6
14902else
14903  case $CPIO in
14904  [\\/]* | ?:[\\/]*)
14905  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14906  ;;
14907  *)
14908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14909for as_dir in $PATH
14910do
14911  IFS=$as_save_IFS
14912  test -z "$as_dir" && as_dir=.
14913    for ac_exec_ext in '' $ac_executable_extensions; do
14914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14915    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14917    break 2
14918  fi
14919done
14920  done
14921IFS=$as_save_IFS
14922
14923  ;;
14924esac
14925fi
14926CPIO=$ac_cv_path_CPIO
14927if test -n "$CPIO"; then
14928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14929$as_echo "$CPIO" >&6; }
14930else
14931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14932$as_echo "no" >&6; }
14933fi
14934
14935
14936  test -n "$CPIO" && break
14937done
14938
14939  else
14940    # The variable is set, but is it from the command line or the environment?
14941
14942    # Try to remove the string !CPIO! from our list.
14943    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14944    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14945      # If it failed, the variable was not from the command line. Ignore it,
14946      # but warn the user (except for BASH, which is always set by the calling BASH).
14947      if test "xCPIO" != xBASH; then
14948        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14949$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14950      fi
14951      # Try to locate tool using the code snippet
14952      for ac_prog in cpio bsdcpio
14953do
14954  # Extract the first word of "$ac_prog", so it can be a program name with args.
14955set dummy $ac_prog; ac_word=$2
14956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14957$as_echo_n "checking for $ac_word... " >&6; }
14958if ${ac_cv_path_CPIO+:} false; then :
14959  $as_echo_n "(cached) " >&6
14960else
14961  case $CPIO in
14962  [\\/]* | ?:[\\/]*)
14963  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14964  ;;
14965  *)
14966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14967for as_dir in $PATH
14968do
14969  IFS=$as_save_IFS
14970  test -z "$as_dir" && as_dir=.
14971    for ac_exec_ext in '' $ac_executable_extensions; do
14972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14973    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14975    break 2
14976  fi
14977done
14978  done
14979IFS=$as_save_IFS
14980
14981  ;;
14982esac
14983fi
14984CPIO=$ac_cv_path_CPIO
14985if test -n "$CPIO"; then
14986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14987$as_echo "$CPIO" >&6; }
14988else
14989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14990$as_echo "no" >&6; }
14991fi
14992
14993
14994  test -n "$CPIO" && break
14995done
14996
14997    else
14998      # If it succeeded, then it was overridden by the user. We will use it
14999      # for the tool.
15000
15001      # First remove it from the list of overridden variables, so we can test
15002      # for unknown variables in the end.
15003      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15004
15005      # Check if we try to supply an empty value
15006      if test "x$CPIO" = x; then
15007        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15008$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15009        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15010$as_echo_n "checking for CPIO... " >&6; }
15011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15012$as_echo "disabled" >&6; }
15013      else
15014        # Check if the provided tool contains a complete path.
15015        tool_specified="$CPIO"
15016        tool_basename="${tool_specified##*/}"
15017        if test "x$tool_basename" = "x$tool_specified"; then
15018          # A command without a complete path is provided, search $PATH.
15019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15020$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15021          # Extract the first word of "$tool_basename", so it can be a program name with args.
15022set dummy $tool_basename; ac_word=$2
15023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15024$as_echo_n "checking for $ac_word... " >&6; }
15025if ${ac_cv_path_CPIO+:} false; then :
15026  $as_echo_n "(cached) " >&6
15027else
15028  case $CPIO in
15029  [\\/]* | ?:[\\/]*)
15030  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15031  ;;
15032  *)
15033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15034for as_dir in $PATH
15035do
15036  IFS=$as_save_IFS
15037  test -z "$as_dir" && as_dir=.
15038    for ac_exec_ext in '' $ac_executable_extensions; do
15039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15040    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15042    break 2
15043  fi
15044done
15045  done
15046IFS=$as_save_IFS
15047
15048  ;;
15049esac
15050fi
15051CPIO=$ac_cv_path_CPIO
15052if test -n "$CPIO"; then
15053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15054$as_echo "$CPIO" >&6; }
15055else
15056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15057$as_echo "no" >&6; }
15058fi
15059
15060
15061          if test "x$CPIO" = x; then
15062            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15063          fi
15064        else
15065          # Otherwise we believe it is a complete path. Use it as it is.
15066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15067$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15068          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15069$as_echo_n "checking for CPIO... " >&6; }
15070          if test ! -x "$tool_specified"; then
15071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15072$as_echo "not found" >&6; }
15073            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15074          fi
15075          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15076$as_echo "$tool_specified" >&6; }
15077        fi
15078      fi
15079    fi
15080
15081  fi
15082
15083
15084
15085
15086  # Publish this variable in the help.
15087
15088
15089  if [ -z "${NICE+x}" ]; then
15090    # The variable is not set by user, try to locate tool using the code snippet
15091    for ac_prog in nice
15092do
15093  # Extract the first word of "$ac_prog", so it can be a program name with args.
15094set dummy $ac_prog; ac_word=$2
15095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15096$as_echo_n "checking for $ac_word... " >&6; }
15097if ${ac_cv_path_NICE+:} false; then :
15098  $as_echo_n "(cached) " >&6
15099else
15100  case $NICE in
15101  [\\/]* | ?:[\\/]*)
15102  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15103  ;;
15104  *)
15105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15106for as_dir in $PATH
15107do
15108  IFS=$as_save_IFS
15109  test -z "$as_dir" && as_dir=.
15110    for ac_exec_ext in '' $ac_executable_extensions; do
15111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15112    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15114    break 2
15115  fi
15116done
15117  done
15118IFS=$as_save_IFS
15119
15120  ;;
15121esac
15122fi
15123NICE=$ac_cv_path_NICE
15124if test -n "$NICE"; then
15125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15126$as_echo "$NICE" >&6; }
15127else
15128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15129$as_echo "no" >&6; }
15130fi
15131
15132
15133  test -n "$NICE" && break
15134done
15135
15136  else
15137    # The variable is set, but is it from the command line or the environment?
15138
15139    # Try to remove the string !NICE! from our list.
15140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15142      # If it failed, the variable was not from the command line. Ignore it,
15143      # but warn the user (except for BASH, which is always set by the calling BASH).
15144      if test "xNICE" != xBASH; then
15145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15146$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15147      fi
15148      # Try to locate tool using the code snippet
15149      for ac_prog in nice
15150do
15151  # Extract the first word of "$ac_prog", so it can be a program name with args.
15152set dummy $ac_prog; ac_word=$2
15153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15154$as_echo_n "checking for $ac_word... " >&6; }
15155if ${ac_cv_path_NICE+:} false; then :
15156  $as_echo_n "(cached) " >&6
15157else
15158  case $NICE in
15159  [\\/]* | ?:[\\/]*)
15160  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15161  ;;
15162  *)
15163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15164for as_dir in $PATH
15165do
15166  IFS=$as_save_IFS
15167  test -z "$as_dir" && as_dir=.
15168    for ac_exec_ext in '' $ac_executable_extensions; do
15169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15170    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15172    break 2
15173  fi
15174done
15175  done
15176IFS=$as_save_IFS
15177
15178  ;;
15179esac
15180fi
15181NICE=$ac_cv_path_NICE
15182if test -n "$NICE"; then
15183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15184$as_echo "$NICE" >&6; }
15185else
15186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15187$as_echo "no" >&6; }
15188fi
15189
15190
15191  test -n "$NICE" && break
15192done
15193
15194    else
15195      # If it succeeded, then it was overridden by the user. We will use it
15196      # for the tool.
15197
15198      # First remove it from the list of overridden variables, so we can test
15199      # for unknown variables in the end.
15200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15201
15202      # Check if we try to supply an empty value
15203      if test "x$NICE" = x; then
15204        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15205$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15207$as_echo_n "checking for NICE... " >&6; }
15208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15209$as_echo "disabled" >&6; }
15210      else
15211        # Check if the provided tool contains a complete path.
15212        tool_specified="$NICE"
15213        tool_basename="${tool_specified##*/}"
15214        if test "x$tool_basename" = "x$tool_specified"; then
15215          # A command without a complete path is provided, search $PATH.
15216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15217$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15218          # Extract the first word of "$tool_basename", so it can be a program name with args.
15219set dummy $tool_basename; ac_word=$2
15220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15221$as_echo_n "checking for $ac_word... " >&6; }
15222if ${ac_cv_path_NICE+:} false; then :
15223  $as_echo_n "(cached) " >&6
15224else
15225  case $NICE in
15226  [\\/]* | ?:[\\/]*)
15227  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15228  ;;
15229  *)
15230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15231for as_dir in $PATH
15232do
15233  IFS=$as_save_IFS
15234  test -z "$as_dir" && as_dir=.
15235    for ac_exec_ext in '' $ac_executable_extensions; do
15236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15237    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15239    break 2
15240  fi
15241done
15242  done
15243IFS=$as_save_IFS
15244
15245  ;;
15246esac
15247fi
15248NICE=$ac_cv_path_NICE
15249if test -n "$NICE"; then
15250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15251$as_echo "$NICE" >&6; }
15252else
15253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15254$as_echo "no" >&6; }
15255fi
15256
15257
15258          if test "x$NICE" = x; then
15259            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15260          fi
15261        else
15262          # Otherwise we believe it is a complete path. Use it as it is.
15263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15264$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15265          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15266$as_echo_n "checking for NICE... " >&6; }
15267          if test ! -x "$tool_specified"; then
15268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15269$as_echo "not found" >&6; }
15270            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15271          fi
15272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15273$as_echo "$tool_specified" >&6; }
15274        fi
15275      fi
15276    fi
15277
15278  fi
15279
15280
15281
15282
15283# Now we can determine OpenJDK build and target platforms. This is required to
15284# have early on.
15285# Make sure we can run config.sub.
15286$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15287  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15288
15289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15290$as_echo_n "checking build system type... " >&6; }
15291if ${ac_cv_build+:} false; then :
15292  $as_echo_n "(cached) " >&6
15293else
15294  ac_build_alias=$build_alias
15295test "x$ac_build_alias" = x &&
15296  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15297test "x$ac_build_alias" = x &&
15298  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15299ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15300  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15301
15302fi
15303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15304$as_echo "$ac_cv_build" >&6; }
15305case $ac_cv_build in
15306*-*-*) ;;
15307*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15308esac
15309build=$ac_cv_build
15310ac_save_IFS=$IFS; IFS='-'
15311set x $ac_cv_build
15312shift
15313build_cpu=$1
15314build_vendor=$2
15315shift; shift
15316# Remember, the first character of IFS is used to create $*,
15317# except with old shells:
15318build_os=$*
15319IFS=$ac_save_IFS
15320case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15321
15322
15323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15324$as_echo_n "checking host system type... " >&6; }
15325if ${ac_cv_host+:} false; then :
15326  $as_echo_n "(cached) " >&6
15327else
15328  if test "x$host_alias" = x; then
15329  ac_cv_host=$ac_cv_build
15330else
15331  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15332    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15333fi
15334
15335fi
15336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15337$as_echo "$ac_cv_host" >&6; }
15338case $ac_cv_host in
15339*-*-*) ;;
15340*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15341esac
15342host=$ac_cv_host
15343ac_save_IFS=$IFS; IFS='-'
15344set x $ac_cv_host
15345shift
15346host_cpu=$1
15347host_vendor=$2
15348shift; shift
15349# Remember, the first character of IFS is used to create $*,
15350# except with old shells:
15351host_os=$*
15352IFS=$ac_save_IFS
15353case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15354
15355
15356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15357$as_echo_n "checking target system type... " >&6; }
15358if ${ac_cv_target+:} false; then :
15359  $as_echo_n "(cached) " >&6
15360else
15361  if test "x$target_alias" = x; then
15362  ac_cv_target=$ac_cv_host
15363else
15364  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15365    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15366fi
15367
15368fi
15369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15370$as_echo "$ac_cv_target" >&6; }
15371case $ac_cv_target in
15372*-*-*) ;;
15373*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15374esac
15375target=$ac_cv_target
15376ac_save_IFS=$IFS; IFS='-'
15377set x $ac_cv_target
15378shift
15379target_cpu=$1
15380target_vendor=$2
15381shift; shift
15382# Remember, the first character of IFS is used to create $*,
15383# except with old shells:
15384target_os=$*
15385IFS=$ac_save_IFS
15386case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15387
15388
15389# The aliases save the names the user supplied, while $host etc.
15390# will get canonicalized.
15391test -n "$target_alias" &&
15392  test "$program_prefix$program_suffix$program_transform_name" = \
15393    NONENONEs,x,x, &&
15394  program_prefix=${target_alias}-
15395
15396  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15397  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15398  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15399  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15400  # to use the configure naming style.
15401
15402
15403
15404
15405
15406  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15407  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15408  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15409  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15410  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15411  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15412
15413
15414
15415  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15416
15417  case "$build_os" in
15418    *linux*)
15419      VAR_OS=linux
15420      VAR_OS_TYPE=unix
15421      ;;
15422    *solaris*)
15423      VAR_OS=solaris
15424      VAR_OS_TYPE=unix
15425      ;;
15426    *darwin*)
15427      VAR_OS=macosx
15428      VAR_OS_TYPE=unix
15429      ;;
15430    *bsd*)
15431      VAR_OS=bsd
15432      VAR_OS_TYPE=unix
15433      ;;
15434    *cygwin*)
15435      VAR_OS=windows
15436      VAR_OS_ENV=windows.cygwin
15437      ;;
15438    *mingw*)
15439      VAR_OS=windows
15440      VAR_OS_ENV=windows.msys
15441      ;;
15442    *aix*)
15443      VAR_OS=aix
15444      VAR_OS_TYPE=unix
15445      ;;
15446    *)
15447      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15448      ;;
15449  esac
15450
15451
15452  # First argument is the cpu name from the trip/quad
15453  case "$build_cpu" in
15454    x86_64)
15455      VAR_CPU=x86_64
15456      VAR_CPU_ARCH=x86
15457      VAR_CPU_BITS=64
15458      VAR_CPU_ENDIAN=little
15459      ;;
15460    i?86)
15461      VAR_CPU=x86
15462      VAR_CPU_ARCH=x86
15463      VAR_CPU_BITS=32
15464      VAR_CPU_ENDIAN=little
15465      ;;
15466    arm*)
15467      VAR_CPU=arm
15468      VAR_CPU_ARCH=arm
15469      VAR_CPU_BITS=32
15470      VAR_CPU_ENDIAN=little
15471      ;;
15472    aarch64)
15473      VAR_CPU=aarch64
15474      VAR_CPU_ARCH=aarch64
15475      VAR_CPU_BITS=64
15476      VAR_CPU_ENDIAN=little
15477      ;;
15478    powerpc)
15479      VAR_CPU=ppc
15480      VAR_CPU_ARCH=ppc
15481      VAR_CPU_BITS=32
15482      VAR_CPU_ENDIAN=big
15483      ;;
15484    powerpc64)
15485      VAR_CPU=ppc64
15486      VAR_CPU_ARCH=ppc
15487      VAR_CPU_BITS=64
15488      VAR_CPU_ENDIAN=big
15489      ;;
15490    powerpc64le)
15491      VAR_CPU=ppc64le
15492      VAR_CPU_ARCH=ppc
15493      VAR_CPU_BITS=64
15494      VAR_CPU_ENDIAN=little
15495      ;;
15496    s390)
15497      VAR_CPU=s390
15498      VAR_CPU_ARCH=s390
15499      VAR_CPU_BITS=32
15500      VAR_CPU_ENDIAN=big
15501      ;;
15502    s390x)
15503      VAR_CPU=s390x
15504      VAR_CPU_ARCH=s390
15505      VAR_CPU_BITS=64
15506      VAR_CPU_ENDIAN=big
15507      ;;
15508    sparc)
15509      VAR_CPU=sparc
15510      VAR_CPU_ARCH=sparc
15511      VAR_CPU_BITS=32
15512      VAR_CPU_ENDIAN=big
15513      ;;
15514    sparcv9|sparc64)
15515      VAR_CPU=sparcv9
15516      VAR_CPU_ARCH=sparc
15517      VAR_CPU_BITS=64
15518      VAR_CPU_ENDIAN=big
15519      ;;
15520    *)
15521      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15522      ;;
15523  esac
15524
15525  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15526  OPENJDK_BUILD_OS="$VAR_OS"
15527  if test "x$VAR_OS_TYPE" != x; then
15528    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15529  else
15530    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15531  fi
15532  if test "x$VAR_OS_ENV" != x; then
15533    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15534  else
15535    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15536  fi
15537  OPENJDK_BUILD_CPU="$VAR_CPU"
15538  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15539  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15540  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15541
15542
15543
15544
15545
15546
15547
15548
15549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15550$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15552$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15553
15554  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15555
15556  case "$host_os" in
15557    *linux*)
15558      VAR_OS=linux
15559      VAR_OS_TYPE=unix
15560      ;;
15561    *solaris*)
15562      VAR_OS=solaris
15563      VAR_OS_TYPE=unix
15564      ;;
15565    *darwin*)
15566      VAR_OS=macosx
15567      VAR_OS_TYPE=unix
15568      ;;
15569    *bsd*)
15570      VAR_OS=bsd
15571      VAR_OS_TYPE=unix
15572      ;;
15573    *cygwin*)
15574      VAR_OS=windows
15575      VAR_OS_ENV=windows.cygwin
15576      ;;
15577    *mingw*)
15578      VAR_OS=windows
15579      VAR_OS_ENV=windows.msys
15580      ;;
15581    *aix*)
15582      VAR_OS=aix
15583      VAR_OS_TYPE=unix
15584      ;;
15585    *)
15586      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15587      ;;
15588  esac
15589
15590
15591  # First argument is the cpu name from the trip/quad
15592  case "$host_cpu" in
15593    x86_64)
15594      VAR_CPU=x86_64
15595      VAR_CPU_ARCH=x86
15596      VAR_CPU_BITS=64
15597      VAR_CPU_ENDIAN=little
15598      ;;
15599    i?86)
15600      VAR_CPU=x86
15601      VAR_CPU_ARCH=x86
15602      VAR_CPU_BITS=32
15603      VAR_CPU_ENDIAN=little
15604      ;;
15605    arm*)
15606      VAR_CPU=arm
15607      VAR_CPU_ARCH=arm
15608      VAR_CPU_BITS=32
15609      VAR_CPU_ENDIAN=little
15610      ;;
15611    aarch64)
15612      VAR_CPU=aarch64
15613      VAR_CPU_ARCH=aarch64
15614      VAR_CPU_BITS=64
15615      VAR_CPU_ENDIAN=little
15616      ;;
15617    powerpc)
15618      VAR_CPU=ppc
15619      VAR_CPU_ARCH=ppc
15620      VAR_CPU_BITS=32
15621      VAR_CPU_ENDIAN=big
15622      ;;
15623    powerpc64)
15624      VAR_CPU=ppc64
15625      VAR_CPU_ARCH=ppc
15626      VAR_CPU_BITS=64
15627      VAR_CPU_ENDIAN=big
15628      ;;
15629    powerpc64le)
15630      VAR_CPU=ppc64le
15631      VAR_CPU_ARCH=ppc
15632      VAR_CPU_BITS=64
15633      VAR_CPU_ENDIAN=little
15634      ;;
15635    s390)
15636      VAR_CPU=s390
15637      VAR_CPU_ARCH=s390
15638      VAR_CPU_BITS=32
15639      VAR_CPU_ENDIAN=big
15640      ;;
15641    s390x)
15642      VAR_CPU=s390x
15643      VAR_CPU_ARCH=s390
15644      VAR_CPU_BITS=64
15645      VAR_CPU_ENDIAN=big
15646      ;;
15647    sparc)
15648      VAR_CPU=sparc
15649      VAR_CPU_ARCH=sparc
15650      VAR_CPU_BITS=32
15651      VAR_CPU_ENDIAN=big
15652      ;;
15653    sparcv9|sparc64)
15654      VAR_CPU=sparcv9
15655      VAR_CPU_ARCH=sparc
15656      VAR_CPU_BITS=64
15657      VAR_CPU_ENDIAN=big
15658      ;;
15659    *)
15660      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15661      ;;
15662  esac
15663
15664  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15665  OPENJDK_TARGET_OS="$VAR_OS"
15666  if test "x$VAR_OS_TYPE" != x; then
15667    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15668  else
15669    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15670  fi
15671  if test "x$VAR_OS_ENV" != x; then
15672    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15673  else
15674    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15675  fi
15676  OPENJDK_TARGET_CPU="$VAR_CPU"
15677  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15678  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15679  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15680
15681
15682
15683
15684
15685
15686
15687
15688  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15689$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15691$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15692
15693
15694
15695# Check whether --with-target-bits was given.
15696if test "${with_target_bits+set}" = set; then :
15697  withval=$with_target_bits;
15698fi
15699
15700
15701  # We have three types of compiles:
15702  # native  == normal compilation, target system == build system
15703  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15704  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15705  #
15706  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15707    # We're doing a proper cross-compilation
15708    COMPILE_TYPE="cross"
15709  else
15710    COMPILE_TYPE="native"
15711  fi
15712
15713  if test "x$with_target_bits" != x; then
15714    if test "x$COMPILE_TYPE" = "xcross"; then
15715      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15716    fi
15717
15718    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15719      # A reduced build is requested
15720      COMPILE_TYPE="reduced"
15721      OPENJDK_TARGET_CPU_BITS=32
15722      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15723        OPENJDK_TARGET_CPU=x86
15724      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15725        OPENJDK_TARGET_CPU=sparc
15726      else
15727        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15728      fi
15729    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15730      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
15731    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15732      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15733$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15734    else
15735      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15736    fi
15737  fi
15738
15739
15740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15741$as_echo_n "checking compilation type... " >&6; }
15742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15743$as_echo "$COMPILE_TYPE" >&6; }
15744
15745
15746  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15747    REQUIRED_OS_NAME=SunOS
15748    REQUIRED_OS_VERSION=5.10
15749  fi
15750  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15751    REQUIRED_OS_NAME=Linux
15752    REQUIRED_OS_VERSION=2.6
15753  fi
15754  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15755    REQUIRED_OS_NAME=Windows
15756    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15757      REQUIRED_OS_VERSION=5.2
15758    else
15759      REQUIRED_OS_VERSION=5.1
15760    fi
15761  fi
15762  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15763    REQUIRED_OS_NAME=Darwin
15764    REQUIRED_OS_VERSION=11.2
15765  fi
15766  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15767    REQUIRED_OS_NAME=AIX
15768    REQUIRED_OS_VERSION=7.1
15769  fi
15770
15771
15772
15773
15774
15775
15776  # Also store the legacy naming of the cpu.
15777  # Ie i586 and amd64 instead of x86 and x86_64
15778  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15779  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15780    OPENJDK_TARGET_CPU_LEGACY="i586"
15781  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15782    # On all platforms except MacOSX replace x86_64 with amd64.
15783    OPENJDK_TARGET_CPU_LEGACY="amd64"
15784  fi
15785
15786
15787  # And the second legacy naming of the cpu.
15788  # Ie i386 and amd64 instead of x86 and x86_64.
15789  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15790  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15791    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15792  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15793    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15794  fi
15795
15796
15797  # This is the name of the cpu (but using i386 and amd64 instead of
15798  # x86 and x86_64, respectively), preceeded by a /, to be used when
15799  # locating libraries. On macosx, it's empty, though.
15800  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15801  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15802    OPENJDK_TARGET_CPU_LIBDIR=""
15803  fi
15804
15805
15806  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15807  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15808  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15809  OPENJDK_TARGET_CPU_ISADIR=""
15810  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15811    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15812      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15813    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15814      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15815    fi
15816  fi
15817
15818
15819  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15820  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15821  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15822    # On linux only, we replace x86 with i386.
15823    OPENJDK_TARGET_CPU_OSARCH="i386"
15824  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15825    # On all platforms except macosx, we replace x86_64 with amd64.
15826    OPENJDK_TARGET_CPU_OSARCH="amd64"
15827  fi
15828
15829
15830  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15831  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15832    OPENJDK_TARGET_CPU_JLI="i386"
15833  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15834    # On all platforms except macosx, we replace x86_64 with amd64.
15835    OPENJDK_TARGET_CPU_JLI="amd64"
15836  fi
15837  # Now setup the -D flags for building libjli.
15838  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15839  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15840    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15841      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15842    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15843      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15844    fi
15845  fi
15846
15847
15848  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15849      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15850  else
15851      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15852  fi
15853
15854
15855  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15856  # Macosx is osx and x86_64 is x64
15857  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15858    OPENJDK_TARGET_OS_BUNDLE="osx"
15859  else
15860    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15861  fi
15862  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15863    OPENJDK_TARGET_CPU_BUNDLE="x64"
15864  else
15865    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15866  fi
15867  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15868
15869
15870
15871
15872  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15873    A_LP64="LP64:="
15874    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15875    # unpack200.exe
15876    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15877      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15878    fi
15879  fi
15880  LP64=$A_LP64
15881
15882
15883  if test "x$COMPILE_TYPE" = "xcross"; then
15884    # FIXME: ... or should this include reduced builds..?
15885    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15886  else
15887    DEFINE_CROSS_COMPILE_ARCH=""
15888  fi
15889
15890
15891  # Convert openjdk platform names to hotspot names
15892
15893  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15894  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15895    HOTSPOT_TARGET_OS=bsd
15896  fi
15897
15898
15899  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15900  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15901    HOTSPOT_TARGET_OS_TYPE=posix
15902  fi
15903
15904
15905  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15906  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15907    HOTSPOT_TARGET_CPU=x86_32
15908  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15909    HOTSPOT_TARGET_CPU=sparc
15910  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15911    HOTSPOT_TARGET_CPU=ppc_64
15912  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15913    HOTSPOT_TARGET_CPU=ppc_64
15914  fi
15915
15916
15917  # This is identical with OPENJDK_*, but define anyway for consistency.
15918  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15919
15920
15921  # Setup HOTSPOT_TARGET_CPU_DEFINE
15922  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15923    HOTSPOT_TARGET_CPU_DEFINE=IA32
15924  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15925    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15926  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15927    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15928  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15929    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15930  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15931    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15932  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15933    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15934
15935  # The cpu defines below are for zero, we don't support them directly.
15936  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15937    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15938  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15939    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15940  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15941    HOTSPOT_TARGET_CPU_DEFINE=S390
15942  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15943    HOTSPOT_TARGET_CPU_DEFINE=S390
15944  fi
15945
15946
15947
15948
15949  # Also store the legacy naming of the cpu.
15950  # Ie i586 and amd64 instead of x86 and x86_64
15951  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15952  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15953    OPENJDK_BUILD_CPU_LEGACY="i586"
15954  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15955    # On all platforms except MacOSX replace x86_64 with amd64.
15956    OPENJDK_BUILD_CPU_LEGACY="amd64"
15957  fi
15958
15959
15960  # And the second legacy naming of the cpu.
15961  # Ie i386 and amd64 instead of x86 and x86_64.
15962  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15963  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15964    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15965  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15966    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15967  fi
15968
15969
15970  # This is the name of the cpu (but using i386 and amd64 instead of
15971  # x86 and x86_64, respectively), preceeded by a /, to be used when
15972  # locating libraries. On macosx, it's empty, though.
15973  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15974  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15975    OPENJDK_BUILD_CPU_LIBDIR=""
15976  fi
15977
15978
15979  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15980  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15981  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15982  OPENJDK_BUILD_CPU_ISADIR=""
15983  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15984    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15985      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15986    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15987      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15988    fi
15989  fi
15990
15991
15992  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15993  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15994  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15995    # On linux only, we replace x86 with i386.
15996    OPENJDK_BUILD_CPU_OSARCH="i386"
15997  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15998    # On all platforms except macosx, we replace x86_64 with amd64.
15999    OPENJDK_BUILD_CPU_OSARCH="amd64"
16000  fi
16001
16002
16003  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16004  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16005    OPENJDK_BUILD_CPU_JLI="i386"
16006  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16007    # On all platforms except macosx, we replace x86_64 with amd64.
16008    OPENJDK_BUILD_CPU_JLI="amd64"
16009  fi
16010  # Now setup the -D flags for building libjli.
16011  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16012  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16013    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16014      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16015    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16016      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16017    fi
16018  fi
16019
16020
16021  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16022      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16023  else
16024      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16025  fi
16026
16027
16028  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16029  # Macosx is osx and x86_64 is x64
16030  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16031    OPENJDK_BUILD_OS_BUNDLE="osx"
16032  else
16033    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16034  fi
16035  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16036    OPENJDK_BUILD_CPU_BUNDLE="x64"
16037  else
16038    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16039  fi
16040  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16041
16042
16043
16044
16045  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16046    A_LP64="LP64:="
16047    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16048    # unpack200.exe
16049    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16050      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16051    fi
16052  fi
16053  LP64=$A_LP64
16054
16055
16056  if test "x$COMPILE_TYPE" = "xcross"; then
16057    # FIXME: ... or should this include reduced builds..?
16058    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16059  else
16060    DEFINE_CROSS_COMPILE_ARCH=""
16061  fi
16062
16063
16064  # Convert openjdk platform names to hotspot names
16065
16066  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16067  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16068    HOTSPOT_BUILD_OS=bsd
16069  fi
16070
16071
16072  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16073  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16074    HOTSPOT_BUILD_OS_TYPE=posix
16075  fi
16076
16077
16078  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16079  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16080    HOTSPOT_BUILD_CPU=x86_32
16081  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16082    HOTSPOT_BUILD_CPU=sparc
16083  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16084    HOTSPOT_BUILD_CPU=ppc_64
16085  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16086    HOTSPOT_BUILD_CPU=ppc_64
16087  fi
16088
16089
16090  # This is identical with OPENJDK_*, but define anyway for consistency.
16091  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16092
16093
16094  # Setup HOTSPOT_BUILD_CPU_DEFINE
16095  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16096    HOTSPOT_BUILD_CPU_DEFINE=IA32
16097  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16098    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16099  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16100    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16101  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16102    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16103  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16104    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16105  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16106    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16107
16108  # The cpu defines below are for zero, we don't support them directly.
16109  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16110    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16111  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16112    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16113  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16114    HOTSPOT_BUILD_CPU_DEFINE=S390
16115  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16116    HOTSPOT_BUILD_CPU_DEFINE=S390
16117  fi
16118
16119
16120
16121
16122  # ZERO_ARCHDEF is used to enable architecture-specific code.
16123  # This is used in legacy hotspot build.
16124  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16125
16126
16127
16128
16129
16130# Continue setting up basic stuff. Most remaining code require fundamental tools.
16131
16132  # Save the current directory this script was started from
16133  CURDIR="$PWD"
16134
16135  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16136  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16137  # was not available at that time.
16138  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16139  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16140    ORIGINAL_PATH="$REWRITTEN_PATH"
16141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16142$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16143  fi
16144
16145  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16146    PATH_SEP=";"
16147
16148  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16149  if test $SRC_ROOT_LENGTH -gt 100; then
16150    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16151  fi
16152
16153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16155$as_echo_n "checking cygwin release... " >&6; }
16156    CYGWIN_VERSION=`$UNAME -r`
16157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16158$as_echo "$CYGWIN_VERSION" >&6; }
16159    WINDOWS_ENV_VENDOR='cygwin'
16160    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16161
16162    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16163    if test "x$CYGWIN_VERSION_OLD" != x; then
16164      { $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
16165$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;}
16166      as_fn_error $? "Cannot continue" "$LINENO" 5
16167    fi
16168    if test "x$CYGPATH" = x; then
16169      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16170    fi
16171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16172$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16173    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16174    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
16175    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16176    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16178$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16179    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16180    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16181    if test "x$test_cygdrive_prefix" = x; then
16182      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16183    fi
16184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16185    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16186$as_echo_n "checking msys release... " >&6; }
16187    MSYS_VERSION=`$UNAME -r`
16188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16189$as_echo "$MSYS_VERSION" >&6; }
16190
16191    WINDOWS_ENV_VENDOR='msys'
16192    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16193
16194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16195$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16196    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16197    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
16198
16199  windows_path="$MSYS_ROOT_PATH"
16200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16201    unix_path=`$CYGPATH -u "$windows_path"`
16202    MSYS_ROOT_PATH="$unix_path"
16203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16205    MSYS_ROOT_PATH="$unix_path"
16206  fi
16207
16208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16209$as_echo "$MSYS_ROOT_PATH" >&6; }
16210    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16211  else
16212    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16213  fi
16214
16215  # Test if windows or unix (cygwin/msys) find is first in path.
16216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16217$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16218  FIND_BINARY_OUTPUT=`find --version 2>&1`
16219  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16221$as_echo "unix style" >&6; }
16222  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16224$as_echo "Windows" >&6; }
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16226$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16227    { $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
16228$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16229    as_fn_error $? "Cannot continue" "$LINENO" 5
16230  else
16231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16232$as_echo "unknown" >&6; }
16233    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16234$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16235  fi
16236
16237  else
16238    PATH_SEP=":"
16239  fi
16240
16241
16242  # We get the top-level directory from the supporting wrappers.
16243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16244$as_echo_n "checking for top-level directory... " >&6; }
16245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16246$as_echo "$TOPDIR" >&6; }
16247
16248
16249  # Save the original version of TOPDIR for string comparisons
16250  ORIGINAL_TOPDIR="$TOPDIR"
16251
16252
16253  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16254
16255  # Only process if variable expands to non-empty
16256
16257  if test "x$CURDIR" != x; then
16258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16259
16260  # Input might be given as Windows format, start by converting to
16261  # unix format.
16262  path="$CURDIR"
16263  new_path=`$CYGPATH -u "$path"`
16264
16265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16268  # "foo.exe" is OK but "foo" is an error.
16269  #
16270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16271  # It is also a way to make sure we got the proper file name for the real test later on.
16272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16273  if test "x$test_shortpath" = x; then
16274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16275$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16276    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16277  fi
16278
16279  # Call helper function which possibly converts this using DOS-style short mode.
16280  # If so, the updated path is stored in $new_path.
16281
16282  input_path="$new_path"
16283  # Check if we need to convert this using DOS-style short mode. If the path
16284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16285  # take no chances and rewrite it.
16286  # Note: m4 eats our [], so we need to use [ and ] instead.
16287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16288  if test "x$has_forbidden_chars" != x; then
16289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16293      # Going to short mode and back again did indeed matter. Since short mode is
16294      # case insensitive, let's make it lowercase to improve readability.
16295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16296      # Now convert it back to Unix-style (cygpath)
16297      input_path=`$CYGPATH -u "$shortmode_path"`
16298      new_path="$input_path"
16299    fi
16300  fi
16301
16302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16303  if test "x$test_cygdrive_prefix" = x; then
16304    # As a simple fix, exclude /usr/bin since it's not a real path.
16305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16307      # a path prefixed by /cygdrive for fixpath to work.
16308      new_path="$CYGWIN_ROOT_PATH$input_path"
16309    fi
16310  fi
16311
16312
16313  if test "x$path" != "x$new_path"; then
16314    CURDIR="$new_path"
16315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16316$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16317  fi
16318
16319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16320
16321  path="$CURDIR"
16322  has_colon=`$ECHO $path | $GREP ^.:`
16323  new_path="$path"
16324  if test "x$has_colon" = x; then
16325    # Not in mixed or Windows style, start by that.
16326    new_path=`cmd //c echo $path`
16327  fi
16328
16329
16330  input_path="$new_path"
16331  # Check if we need to convert this using DOS-style short mode. If the path
16332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16333  # take no chances and rewrite it.
16334  # Note: m4 eats our [], so we need to use [ and ] instead.
16335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16336  if test "x$has_forbidden_chars" != x; then
16337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16339  fi
16340
16341
16342  windows_path="$new_path"
16343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16344    unix_path=`$CYGPATH -u "$windows_path"`
16345    new_path="$unix_path"
16346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16348    new_path="$unix_path"
16349  fi
16350
16351  if test "x$path" != "x$new_path"; then
16352    CURDIR="$new_path"
16353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16354$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16355  fi
16356
16357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16359
16360    else
16361      # We're on a unix platform. Hooray! :)
16362      path="$CURDIR"
16363      has_space=`$ECHO "$path" | $GREP " "`
16364      if test "x$has_space" != x; then
16365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16366$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16367        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16368      fi
16369
16370      # Use eval to expand a potential ~
16371      eval path="$path"
16372      if test ! -f "$path" && test ! -d "$path"; then
16373        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16374      fi
16375
16376      if test -d "$path"; then
16377        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16378      else
16379        dir="`$DIRNAME "$path"`"
16380        base="`$BASENAME "$path"`"
16381        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16382      fi
16383    fi
16384  fi
16385
16386
16387  # Only process if variable expands to non-empty
16388
16389  if test "x$TOPDIR" != x; then
16390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16391
16392  # Input might be given as Windows format, start by converting to
16393  # unix format.
16394  path="$TOPDIR"
16395  new_path=`$CYGPATH -u "$path"`
16396
16397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16400  # "foo.exe" is OK but "foo" is an error.
16401  #
16402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16403  # It is also a way to make sure we got the proper file name for the real test later on.
16404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16405  if test "x$test_shortpath" = x; then
16406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16407$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16408    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16409  fi
16410
16411  # Call helper function which possibly converts this using DOS-style short mode.
16412  # If so, the updated path is stored in $new_path.
16413
16414  input_path="$new_path"
16415  # Check if we need to convert this using DOS-style short mode. If the path
16416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16417  # take no chances and rewrite it.
16418  # Note: m4 eats our [], so we need to use [ and ] instead.
16419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16420  if test "x$has_forbidden_chars" != x; then
16421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16425      # Going to short mode and back again did indeed matter. Since short mode is
16426      # case insensitive, let's make it lowercase to improve readability.
16427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16428      # Now convert it back to Unix-style (cygpath)
16429      input_path=`$CYGPATH -u "$shortmode_path"`
16430      new_path="$input_path"
16431    fi
16432  fi
16433
16434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16435  if test "x$test_cygdrive_prefix" = x; then
16436    # As a simple fix, exclude /usr/bin since it's not a real path.
16437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16439      # a path prefixed by /cygdrive for fixpath to work.
16440      new_path="$CYGWIN_ROOT_PATH$input_path"
16441    fi
16442  fi
16443
16444
16445  if test "x$path" != "x$new_path"; then
16446    TOPDIR="$new_path"
16447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16448$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16449  fi
16450
16451    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16452
16453  path="$TOPDIR"
16454  has_colon=`$ECHO $path | $GREP ^.:`
16455  new_path="$path"
16456  if test "x$has_colon" = x; then
16457    # Not in mixed or Windows style, start by that.
16458    new_path=`cmd //c echo $path`
16459  fi
16460
16461
16462  input_path="$new_path"
16463  # Check if we need to convert this using DOS-style short mode. If the path
16464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16465  # take no chances and rewrite it.
16466  # Note: m4 eats our [], so we need to use [ and ] instead.
16467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16468  if test "x$has_forbidden_chars" != x; then
16469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16471  fi
16472
16473
16474  windows_path="$new_path"
16475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16476    unix_path=`$CYGPATH -u "$windows_path"`
16477    new_path="$unix_path"
16478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16480    new_path="$unix_path"
16481  fi
16482
16483  if test "x$path" != "x$new_path"; then
16484    TOPDIR="$new_path"
16485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16486$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16487  fi
16488
16489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16491
16492    else
16493      # We're on a unix platform. Hooray! :)
16494      path="$TOPDIR"
16495      has_space=`$ECHO "$path" | $GREP " "`
16496      if test "x$has_space" != x; then
16497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16498$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16499        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16500      fi
16501
16502      # Use eval to expand a potential ~
16503      eval path="$path"
16504      if test ! -f "$path" && test ! -d "$path"; then
16505        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16506      fi
16507
16508      if test -d "$path"; then
16509        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16510      else
16511        dir="`$DIRNAME "$path"`"
16512        base="`$BASENAME "$path"`"
16513        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16514      fi
16515    fi
16516  fi
16517
16518  # SRC_ROOT is a traditional alias for TOPDIR.
16519  SRC_ROOT=$TOPDIR
16520
16521  # Calculate a canonical version of TOPDIR for string comparisons
16522  CANONICAL_TOPDIR=$TOPDIR
16523
16524  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16525    # Follow a chain of symbolic links. Use readlink
16526    # where it exists, else fall back to horribly
16527    # complicated shell code.
16528    if test "x$READLINK_TESTED" != yes; then
16529      # On MacOSX there is a readlink tool with a different
16530      # purpose than the GNU readlink tool. Check the found readlink.
16531      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16532      if test "x$ISGNU" = x; then
16533        # A readlink that we do not know how to use.
16534        # Are there other non-GNU readlinks out there?
16535        READLINK_TESTED=yes
16536        READLINK=
16537      fi
16538    fi
16539
16540    if test "x$READLINK" != x; then
16541      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16542    else
16543      # Save the current directory for restoring afterwards
16544      STARTDIR=$PWD
16545      COUNTER=0
16546      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16547      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16548      cd $sym_link_dir
16549      # Use -P flag to resolve symlinks in directories.
16550      cd `$THEPWDCMD -P`
16551      sym_link_dir=`$THEPWDCMD -P`
16552      # Resolve file symlinks
16553      while test $COUNTER -lt 20; do
16554        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16555        if test "x$ISLINK" == x; then
16556          # This is not a symbolic link! We are done!
16557          break
16558        fi
16559        # Again resolve directory symlinks since the target of the just found
16560        # link could be in a different directory
16561        cd `$DIRNAME $ISLINK`
16562        sym_link_dir=`$THEPWDCMD -P`
16563        sym_link_file=`$BASENAME $ISLINK`
16564        let COUNTER=COUNTER+1
16565      done
16566      cd $STARTDIR
16567      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16568    fi
16569  fi
16570
16571
16572
16573  # Locate the directory of this script.
16574  AUTOCONF_DIR=$TOPDIR/common/autoconf
16575
16576  # Setup username (for use in adhoc version strings etc)
16577  # Outer [ ] to quote m4.
16578   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16579
16580
16581
16582# Check if it's a pure open build or if custom sources are to be used.
16583
16584  # Check whether --enable-openjdk-only was given.
16585if test "${enable_openjdk_only+set}" = set; then :
16586  enableval=$enable_openjdk_only;
16587else
16588  enable_openjdk_only="no"
16589fi
16590
16591
16592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16593$as_echo_n "checking for presence of closed sources... " >&6; }
16594  if test -d "$SRC_ROOT/jdk/src/closed"; then
16595    CLOSED_SOURCE_PRESENT=yes
16596  else
16597    CLOSED_SOURCE_PRESENT=no
16598  fi
16599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16600$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16601
16602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16603$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16604  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16606$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16607
16608  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16609    OPENJDK=true
16610    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16611      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16612$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16613    fi
16614  else
16615    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16616      OPENJDK=true
16617    else
16618      OPENJDK=false
16619    fi
16620  fi
16621
16622  if test "x$OPENJDK" = "xtrue"; then
16623    SET_OPENJDK="OPENJDK=true"
16624  fi
16625
16626
16627
16628  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16629  # the IncludeCustomExtension macro.
16630
16631
16632# Check whether --with-custom-make-dir was given.
16633if test "${with_custom_make_dir+set}" = set; then :
16634  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
16635$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16636fi
16637
16638
16639
16640
16641# These are needed to be able to create a configuration name (and thus the output directory)
16642
16643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16644$as_echo_n "checking which variant of the JDK to build... " >&6; }
16645
16646# Check whether --with-jdk-variant was given.
16647if test "${with_jdk_variant+set}" = set; then :
16648  withval=$with_jdk_variant;
16649fi
16650
16651
16652  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16653    JDK_VARIANT="normal"
16654  else
16655    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16656  fi
16657
16658
16659
16660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16661$as_echo "$JDK_VARIANT" >&6; }
16662
16663
16664  DEBUG_LEVEL="release"
16665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16666$as_echo_n "checking which debug level to use... " >&6; }
16667  # Check whether --enable-debug was given.
16668if test "${enable_debug+set}" = set; then :
16669  enableval=$enable_debug;
16670        ENABLE_DEBUG="${enableval}"
16671        DEBUG_LEVEL="fastdebug"
16672
16673else
16674  ENABLE_DEBUG="no"
16675fi
16676
16677
16678
16679# Check whether --with-debug-level was given.
16680if test "${with_debug_level+set}" = set; then :
16681  withval=$with_debug_level;
16682        DEBUG_LEVEL="${withval}"
16683        if test "x$ENABLE_DEBUG" = xyes; then
16684          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16685        fi
16686
16687fi
16688
16689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16690$as_echo "$DEBUG_LEVEL" >&6; }
16691
16692  if test "x$DEBUG_LEVEL" != xrelease && \
16693      test "x$DEBUG_LEVEL" != xoptimized && \
16694      test "x$DEBUG_LEVEL" != xfastdebug && \
16695      test "x$DEBUG_LEVEL" != xslowdebug; then
16696    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16697  fi
16698
16699  # Translate DEBUG_LEVEL to debug level used by Hotspot
16700  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16701  if test "x$DEBUG_LEVEL" = xrelease; then
16702    HOTSPOT_DEBUG_LEVEL="product"
16703  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16704    HOTSPOT_DEBUG_LEVEL="debug"
16705  fi
16706
16707  if test "x$DEBUG_LEVEL" = xoptimized; then
16708    # The debug level 'optimized' is a little special because it is currently only
16709    # applicable to the HotSpot build where it means to build a completely
16710    # optimized version of the VM without any debugging code (like for the
16711    # 'release' debug level which is called 'product' in the HotSpot build) but
16712    # with the exception that it can contain additional code which is otherwise
16713    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16714    # test new and/or experimental features which are not intended for customer
16715    # shipment. Because these new features need to be tested and benchmarked in
16716    # real world scenarios, we want to build the containing JDK at the 'release'
16717    # debug level.
16718    DEBUG_LEVEL="release"
16719  fi
16720
16721
16722
16723
16724
16725
16726# Check whether --with-jvm-variants was given.
16727if test "${with_jvm_variants+set}" = set; then :
16728  withval=$with_jvm_variants;
16729fi
16730
16731
16732  if test "x$with_jvm_variants" = x; then
16733    with_jvm_variants="server"
16734  fi
16735  JVM_VARIANTS_OPT="$with_jvm_variants"
16736
16737  # Has the user listed more than one variant?
16738  # Additional [] needed to keep m4 from mangling shell constructs.
16739  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16740    BUILDING_MULTIPLE_JVM_VARIANTS=true
16741  else
16742    BUILDING_MULTIPLE_JVM_VARIANTS=false
16743  fi
16744  # Replace the commas with AND for use in the build directory name.
16745  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16746
16747  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16748$as_echo_n "checking which variants of the JVM to build... " >&6; }
16749  # JVM_VARIANTS is a space-separated list.
16750  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16751  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16753$as_echo "$JVM_VARIANTS" >&6; }
16754
16755  # Check that the selected variants are valid
16756
16757  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16758  # Notice that the original variant failes on SLES 10 and 11
16759  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16760  STACK=${JVM_VARIANTS// /$'\n'}
16761  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16762  if test "x$INVALID_VARIANTS" != x; then
16763    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16764$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16765    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16766  fi
16767
16768  # All "special" variants share the same output directory ("server")
16769  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16770  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16771  STACK=${JVM_VARIANTS// /$'\n'}
16772  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16773  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16774    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16775  fi
16776
16777
16778
16779
16780  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16781    # zero behaves as a platform and rewrites these values. This is really weird. :(
16782    # We are guaranteed that we do not build any other variants when building zero.
16783    HOTSPOT_TARGET_CPU=zero
16784    HOTSPOT_TARGET_CPU_ARCH=zero
16785  fi
16786
16787
16788# With basic setup done, call the custom early hook.
16789
16790
16791# Check if we have devkits, extra paths or sysroot set.
16792
16793
16794# Check whether --with-devkit was given.
16795if test "${with_devkit+set}" = set; then :
16796  withval=$with_devkit;
16797
16798  # Only process if variable expands to non-empty
16799
16800  if test "x$with_devkit" != x; then
16801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16802
16803  # Input might be given as Windows format, start by converting to
16804  # unix format.
16805  path="$with_devkit"
16806  new_path=`$CYGPATH -u "$path"`
16807
16808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16811  # "foo.exe" is OK but "foo" is an error.
16812  #
16813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16814  # It is also a way to make sure we got the proper file name for the real test later on.
16815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16816  if test "x$test_shortpath" = x; then
16817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16818$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16819    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16820  fi
16821
16822  # Call helper function which possibly converts this using DOS-style short mode.
16823  # If so, the updated path is stored in $new_path.
16824
16825  input_path="$new_path"
16826  # Check if we need to convert this using DOS-style short mode. If the path
16827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16828  # take no chances and rewrite it.
16829  # Note: m4 eats our [], so we need to use [ and ] instead.
16830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16831  if test "x$has_forbidden_chars" != x; then
16832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16836      # Going to short mode and back again did indeed matter. Since short mode is
16837      # case insensitive, let's make it lowercase to improve readability.
16838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16839      # Now convert it back to Unix-style (cygpath)
16840      input_path=`$CYGPATH -u "$shortmode_path"`
16841      new_path="$input_path"
16842    fi
16843  fi
16844
16845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16846  if test "x$test_cygdrive_prefix" = x; then
16847    # As a simple fix, exclude /usr/bin since it's not a real path.
16848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16850      # a path prefixed by /cygdrive for fixpath to work.
16851      new_path="$CYGWIN_ROOT_PATH$input_path"
16852    fi
16853  fi
16854
16855
16856  if test "x$path" != "x$new_path"; then
16857    with_devkit="$new_path"
16858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16859$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16860  fi
16861
16862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16863
16864  path="$with_devkit"
16865  has_colon=`$ECHO $path | $GREP ^.:`
16866  new_path="$path"
16867  if test "x$has_colon" = x; then
16868    # Not in mixed or Windows style, start by that.
16869    new_path=`cmd //c echo $path`
16870  fi
16871
16872
16873  input_path="$new_path"
16874  # Check if we need to convert this using DOS-style short mode. If the path
16875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16876  # take no chances and rewrite it.
16877  # Note: m4 eats our [], so we need to use [ and ] instead.
16878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16879  if test "x$has_forbidden_chars" != x; then
16880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16882  fi
16883
16884
16885  windows_path="$new_path"
16886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16887    unix_path=`$CYGPATH -u "$windows_path"`
16888    new_path="$unix_path"
16889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16891    new_path="$unix_path"
16892  fi
16893
16894  if test "x$path" != "x$new_path"; then
16895    with_devkit="$new_path"
16896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16897$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16898  fi
16899
16900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16902
16903    else
16904      # We're on a unix platform. Hooray! :)
16905      path="$with_devkit"
16906      has_space=`$ECHO "$path" | $GREP " "`
16907      if test "x$has_space" != x; then
16908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16909$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16910        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16911      fi
16912
16913      # Use eval to expand a potential ~
16914      eval path="$path"
16915      if test ! -f "$path" && test ! -d "$path"; then
16916        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16917      fi
16918
16919      if test -d "$path"; then
16920        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16921      else
16922        dir="`$DIRNAME "$path"`"
16923        base="`$BASENAME "$path"`"
16924        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16925      fi
16926    fi
16927  fi
16928
16929        DEVKIT_ROOT="$with_devkit"
16930        # Check for a meta data info file in the root of the devkit
16931        if test -f "$DEVKIT_ROOT/devkit.info"; then
16932          . $DEVKIT_ROOT/devkit.info
16933          # This potentially sets the following:
16934          # A descriptive name of the devkit
16935
16936  if test "x$DEVKIT_NAME" = x; then
16937    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16938  fi
16939
16940          # Corresponds to --with-extra-path
16941
16942  if test "x$DEVKIT_EXTRA_PATH" = x; then
16943    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16944  fi
16945
16946          # Corresponds to --with-toolchain-path
16947
16948  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16949    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16950  fi
16951
16952          # Corresponds to --with-sysroot
16953
16954  if test "x$DEVKIT_SYSROOT" = x; then
16955    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16956  fi
16957
16958
16959          # Identifies the Visual Studio version in the devkit
16960
16961  if test "x$DEVKIT_VS_VERSION" = x; then
16962    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16963  fi
16964
16965          # The Visual Studio include environment variable
16966
16967  if test "x$DEVKIT_VS_INCLUDE" = x; then
16968    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16969  fi
16970
16971          # The Visual Studio lib environment variable
16972
16973  if test "x$DEVKIT_VS_LIB" = x; then
16974    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16975  fi
16976
16977          # Corresponds to --with-msvcr-dll
16978
16979  if test "x$DEVKIT_MSVCR_DLL" = x; then
16980    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16981  fi
16982
16983          # Corresponds to --with-msvcp-dll
16984
16985  if test "x$DEVKIT_MSVCP_DLL" = x; then
16986    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16987  fi
16988
16989        fi
16990
16991        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16992$as_echo_n "checking for devkit... " >&6; }
16993        if test "x$DEVKIT_NAME" != x; then
16994          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16995$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16996        else
16997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16998$as_echo "$DEVKIT_ROOT" >&6; }
16999        fi
17000
17001
17002  if test "x$DEVKIT_EXTRA_PATH" != x; then
17003    if test "x$EXTRA_PATH" = x; then
17004      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17005    else
17006      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17007    fi
17008  fi
17009
17010
17011        # Fallback default of just /bin if DEVKIT_PATH is not defined
17012        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17013          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17014        fi
17015
17016  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17017    if test "x$TOOLCHAIN_PATH" = x; then
17018      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17019    else
17020      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17021    fi
17022  fi
17023
17024
17025        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17026        # places for backwards compatiblity.
17027        if test "x$DEVKIT_SYSROOT" != x; then
17028          SYSROOT="$DEVKIT_SYSROOT"
17029        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17030          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17031        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17032          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17033        fi
17034
17035
17036fi
17037
17038
17039  # You can force the sysroot if the sysroot encoded into the compiler tools
17040  # is not correct.
17041
17042# Check whether --with-sys-root was given.
17043if test "${with_sys_root+set}" = set; then :
17044  withval=$with_sys_root; SYSROOT=$with_sys_root
17045
17046fi
17047
17048
17049
17050# Check whether --with-sysroot was given.
17051if test "${with_sysroot+set}" = set; then :
17052  withval=$with_sysroot; SYSROOT=$with_sysroot
17053
17054fi
17055
17056
17057
17058# Check whether --with-tools-dir was given.
17059if test "${with_tools_dir+set}" = set; then :
17060  withval=$with_tools_dir;
17061  if test "x$with_tools_dir" != x; then
17062    if test "x$TOOLCHAIN_PATH" = x; then
17063      TOOLCHAIN_PATH="$with_tools_dir"
17064    else
17065      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17066    fi
17067  fi
17068
17069
17070fi
17071
17072
17073
17074# Check whether --with-toolchain-path was given.
17075if test "${with_toolchain_path+set}" = set; then :
17076  withval=$with_toolchain_path;
17077  if test "x$with_toolchain_path" != x; then
17078    if test "x$TOOLCHAIN_PATH" = x; then
17079      TOOLCHAIN_PATH="$with_toolchain_path"
17080    else
17081      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17082    fi
17083  fi
17084
17085
17086fi
17087
17088
17089
17090# Check whether --with-extra-path was given.
17091if test "${with_extra_path+set}" = set; then :
17092  withval=$with_extra_path;
17093  if test "x$with_extra_path" != x; then
17094    if test "x$EXTRA_PATH" = x; then
17095      EXTRA_PATH="$with_extra_path"
17096    else
17097      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17098    fi
17099  fi
17100
17101
17102fi
17103
17104
17105  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17106    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17107    # If not, detect if Xcode is installed by running xcodebuild -version
17108    # if no Xcode installed, xcodebuild exits with 1
17109    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17110    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17111      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17112      # fall back on the stub binary in /usr/bin/xcodebuild
17113      # Extract the first word of "xcodebuild", so it can be a program name with args.
17114set dummy xcodebuild; ac_word=$2
17115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17116$as_echo_n "checking for $ac_word... " >&6; }
17117if ${ac_cv_path_XCODEBUILD+:} false; then :
17118  $as_echo_n "(cached) " >&6
17119else
17120  case $XCODEBUILD in
17121  [\\/]* | ?:[\\/]*)
17122  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17123  ;;
17124  *)
17125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17126for as_dir in $TOOLCHAIN_PATH
17127do
17128  IFS=$as_save_IFS
17129  test -z "$as_dir" && as_dir=.
17130    for ac_exec_ext in '' $ac_executable_extensions; do
17131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17132    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17134    break 2
17135  fi
17136done
17137  done
17138IFS=$as_save_IFS
17139
17140  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17141  ;;
17142esac
17143fi
17144XCODEBUILD=$ac_cv_path_XCODEBUILD
17145if test -n "$XCODEBUILD"; then
17146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17147$as_echo "$XCODEBUILD" >&6; }
17148else
17149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17150$as_echo "no" >&6; }
17151fi
17152
17153
17154    else
17155      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17156      # when only the command line tools are installed there are no SDKs, so headers
17157      # are copied into the system frameworks
17158      XCODEBUILD=
17159
17160    fi
17161
17162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17163$as_echo_n "checking for sdk name... " >&6; }
17164
17165# Check whether --with-sdk-name was given.
17166if test "${with_sdk_name+set}" = set; then :
17167  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17168
17169fi
17170
17171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17172$as_echo "$SDKNAME" >&6; }
17173
17174    # if toolchain path is specified then don't rely on system headers, they may not compile
17175    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17176    test -z "$TOOLCHAIN_PATH" && \
17177      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17178
17179    if test -z "$SYSROOT"; then
17180      if test -n "$XCODEBUILD"; then
17181        # if we don't have system headers, use default SDK name (last resort)
17182        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17183          SDKNAME=${SDKNAME:-macosx}
17184        fi
17185
17186        if test -n "$SDKNAME"; then
17187          # Call xcodebuild to determine SYSROOT
17188          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
17189        fi
17190      else
17191        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17192          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
17193        fi
17194      fi
17195    else
17196      # warn user if --with-sdk-name was also set
17197      if test -n "$with_sdk_name"; then
17198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17199$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17200      fi
17201    fi
17202
17203    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17204      # If no system framework headers, then SYSROOT must be set, or we won't build
17205      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
17206    fi
17207
17208    # Perform a basic sanity test
17209    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17210      if test -z "$SYSROOT"; then
17211        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
17212      else
17213        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17214      fi
17215    fi
17216
17217    # set SDKROOT too, Xcode tools will pick it up
17218    SDKROOT=$SYSROOT
17219
17220  fi
17221
17222  # Prepend the extra path to the global path
17223
17224  if test "x$EXTRA_PATH" != x; then
17225    if test "x$PATH" = x; then
17226      PATH="$EXTRA_PATH"
17227    else
17228      PATH="$EXTRA_PATH:$PATH"
17229    fi
17230  fi
17231
17232
17233  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
17234    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
17235    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
17236  fi
17237
17238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17239$as_echo_n "checking for sysroot... " >&6; }
17240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17241$as_echo "$SYSROOT" >&6; }
17242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17243$as_echo_n "checking for toolchain path... " >&6; }
17244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17245$as_echo "$TOOLCHAIN_PATH" >&6; }
17246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17247$as_echo_n "checking for extra path... " >&6; }
17248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17249$as_echo "$EXTRA_PATH" >&6; }
17250
17251
17252# To properly create a configuration name, we need to have the OpenJDK target
17253# and options (variants and debug level) parsed.
17254
17255
17256
17257# Check whether --with-conf-name was given.
17258if test "${with_conf_name+set}" = set; then :
17259  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17260fi
17261
17262
17263  # Test from where we are running configure, in or outside of src root.
17264  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17265$as_echo_n "checking where to store configuration... " >&6; }
17266  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17267      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17268      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17269    # We are running configure from the src root.
17270    # Create a default ./build/target-variant-debuglevel output root.
17271    if test "x${CONF_NAME}" = x; then
17272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17273$as_echo "in default location" >&6; }
17274      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17275    else
17276      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17277$as_echo "in build directory with custom name" >&6; }
17278    fi
17279    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17280    $MKDIR -p "$OUTPUT_ROOT"
17281    if test ! -d "$OUTPUT_ROOT"; then
17282      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17283    fi
17284  else
17285    # We are running configure from outside of the src dir.
17286    # Then use the current directory as output dir!
17287    # If configuration is situated in normal build directory, just use the build
17288    # directory name as configuration name, otherwise use the complete path.
17289    if test "x${CONF_NAME}" = x; then
17290      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17291    fi
17292    OUTPUT_ROOT="$CURDIR"
17293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17294$as_echo "in current directory" >&6; }
17295
17296    # WARNING: This might be a bad thing to do. You need to be sure you want to
17297    # have a configuration in this directory. Do some sanity checks!
17298
17299    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17300      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17301      # other files
17302      files_present=`$LS $OUTPUT_ROOT`
17303      # Configure has already touched config.log and confdefs.h in the current dir when this check
17304      # is performed.
17305      filtered_files=`$ECHO "$files_present" \
17306          | $SED -e 's/config.log//g' \
17307              -e 's/configure.log//g' \
17308              -e 's/confdefs.h//g' \
17309              -e 's/ //g' \
17310          | $TR -d '\n'`
17311      if test "x$filtered_files" != x; then
17312        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17313$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17314        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17315$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17316        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17317$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17318        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17319$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17320        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17321$as_echo "$as_me: seriously mess up just about everything." >&6;}
17322        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17323$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17324        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17325$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17326        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17327      fi
17328    fi
17329  fi
17330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17331$as_echo_n "checking what configuration name to use... " >&6; }
17332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17333$as_echo "$CONF_NAME" >&6; }
17334
17335
17336  # Only process if variable expands to non-empty
17337
17338  if test "x$OUTPUT_ROOT" != x; then
17339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17340
17341  # Input might be given as Windows format, start by converting to
17342  # unix format.
17343  path="$OUTPUT_ROOT"
17344  new_path=`$CYGPATH -u "$path"`
17345
17346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17349  # "foo.exe" is OK but "foo" is an error.
17350  #
17351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17352  # It is also a way to make sure we got the proper file name for the real test later on.
17353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17354  if test "x$test_shortpath" = x; then
17355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17356$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17357    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17358  fi
17359
17360  # Call helper function which possibly converts this using DOS-style short mode.
17361  # If so, the updated path is stored in $new_path.
17362
17363  input_path="$new_path"
17364  # Check if we need to convert this using DOS-style short mode. If the path
17365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17366  # take no chances and rewrite it.
17367  # Note: m4 eats our [], so we need to use [ and ] instead.
17368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17369  if test "x$has_forbidden_chars" != x; then
17370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17374      # Going to short mode and back again did indeed matter. Since short mode is
17375      # case insensitive, let's make it lowercase to improve readability.
17376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17377      # Now convert it back to Unix-style (cygpath)
17378      input_path=`$CYGPATH -u "$shortmode_path"`
17379      new_path="$input_path"
17380    fi
17381  fi
17382
17383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17384  if test "x$test_cygdrive_prefix" = x; then
17385    # As a simple fix, exclude /usr/bin since it's not a real path.
17386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17388      # a path prefixed by /cygdrive for fixpath to work.
17389      new_path="$CYGWIN_ROOT_PATH$input_path"
17390    fi
17391  fi
17392
17393
17394  if test "x$path" != "x$new_path"; then
17395    OUTPUT_ROOT="$new_path"
17396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17397$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17398  fi
17399
17400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17401
17402  path="$OUTPUT_ROOT"
17403  has_colon=`$ECHO $path | $GREP ^.:`
17404  new_path="$path"
17405  if test "x$has_colon" = x; then
17406    # Not in mixed or Windows style, start by that.
17407    new_path=`cmd //c echo $path`
17408  fi
17409
17410
17411  input_path="$new_path"
17412  # Check if we need to convert this using DOS-style short mode. If the path
17413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17414  # take no chances and rewrite it.
17415  # Note: m4 eats our [], so we need to use [ and ] instead.
17416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17417  if test "x$has_forbidden_chars" != x; then
17418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17420  fi
17421
17422
17423  windows_path="$new_path"
17424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17425    unix_path=`$CYGPATH -u "$windows_path"`
17426    new_path="$unix_path"
17427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17429    new_path="$unix_path"
17430  fi
17431
17432  if test "x$path" != "x$new_path"; then
17433    OUTPUT_ROOT="$new_path"
17434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17435$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17436  fi
17437
17438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17440
17441    else
17442      # We're on a unix platform. Hooray! :)
17443      path="$OUTPUT_ROOT"
17444      has_space=`$ECHO "$path" | $GREP " "`
17445      if test "x$has_space" != x; then
17446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17447$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17449      fi
17450
17451      # Use eval to expand a potential ~
17452      eval path="$path"
17453      if test ! -f "$path" && test ! -d "$path"; then
17454        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17455      fi
17456
17457      if test -d "$path"; then
17458        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17459      else
17460        dir="`$DIRNAME "$path"`"
17461        base="`$BASENAME "$path"`"
17462        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17463      fi
17464    fi
17465  fi
17466
17467
17468  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17469  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17470
17471  SPEC=$OUTPUT_ROOT/spec.gmk
17472
17473  CONF_NAME=$CONF_NAME
17474
17475  OUTPUT_ROOT=$OUTPUT_ROOT
17476
17477
17478
17479  # The spec.gmk file contains all variables for the make system.
17480  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17481
17482  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17483  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17484
17485  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17486  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17487
17488  # The compare.sh is used to compare the build output to other builds.
17489  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17490
17491  # The generated Makefile knows where the spec.gmk is and where the source is.
17492  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17493  # which will look for generated configurations
17494  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17495
17496
17497
17498# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17499
17500  for ac_prog in apt-get yum port pkgutil pkgadd
17501do
17502  # Extract the first word of "$ac_prog", so it can be a program name with args.
17503set dummy $ac_prog; ac_word=$2
17504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17505$as_echo_n "checking for $ac_word... " >&6; }
17506if ${ac_cv_prog_PKGHANDLER+:} false; then :
17507  $as_echo_n "(cached) " >&6
17508else
17509  if test -n "$PKGHANDLER"; then
17510  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17511else
17512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17513for as_dir in $PATH
17514do
17515  IFS=$as_save_IFS
17516  test -z "$as_dir" && as_dir=.
17517    for ac_exec_ext in '' $ac_executable_extensions; do
17518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17519    ac_cv_prog_PKGHANDLER="$ac_prog"
17520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17521    break 2
17522  fi
17523done
17524  done
17525IFS=$as_save_IFS
17526
17527fi
17528fi
17529PKGHANDLER=$ac_cv_prog_PKGHANDLER
17530if test -n "$PKGHANDLER"; then
17531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17532$as_echo "$PKGHANDLER" >&6; }
17533else
17534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17535$as_echo "no" >&6; }
17536fi
17537
17538
17539  test -n "$PKGHANDLER" && break
17540done
17541
17542
17543
17544# Setup tools that requires more complex handling, or that is not needed by the configure script.
17545
17546
17547
17548  # Publish this variable in the help.
17549
17550
17551  if [ -z "${MAKE+x}" ]; then
17552    # The variable is not set by user, try to locate tool using the code snippet
17553
17554    # Try our hardest to locate a correct version of GNU make
17555    for ac_prog in gmake
17556do
17557  # Extract the first word of "$ac_prog", so it can be a program name with args.
17558set dummy $ac_prog; ac_word=$2
17559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17560$as_echo_n "checking for $ac_word... " >&6; }
17561if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17562  $as_echo_n "(cached) " >&6
17563else
17564  case $CHECK_GMAKE in
17565  [\\/]* | ?:[\\/]*)
17566  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17567  ;;
17568  *)
17569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17570for as_dir in $PATH
17571do
17572  IFS=$as_save_IFS
17573  test -z "$as_dir" && as_dir=.
17574    for ac_exec_ext in '' $ac_executable_extensions; do
17575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17576    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17578    break 2
17579  fi
17580done
17581  done
17582IFS=$as_save_IFS
17583
17584  ;;
17585esac
17586fi
17587CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17588if test -n "$CHECK_GMAKE"; then
17589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17590$as_echo "$CHECK_GMAKE" >&6; }
17591else
17592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17593$as_echo "no" >&6; }
17594fi
17595
17596
17597  test -n "$CHECK_GMAKE" && break
17598done
17599
17600
17601  MAKE_CANDIDATE=""$CHECK_GMAKE""
17602  DESCRIPTION="gmake in PATH"
17603
17604  # On Cygwin, we require a newer version of make than on other platforms
17605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17606    MAKE_VERSION_EXPR="-e 4\."
17607    MAKE_REQUIRED_VERSION="4.0"
17608   else
17609    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17610    MAKE_REQUIRED_VERSION="3.81"
17611  fi
17612
17613  if test "x$MAKE_CANDIDATE" != x; then
17614    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17615$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17616    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17617    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17618    if test "x$IS_GNU_MAKE" = x; then
17619      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17620$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17621    else
17622      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17623      if test "x$IS_MODERN_MAKE" = x; then
17624        { $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
17625$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;}
17626      else
17627        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17628          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17629            MAKE_EXPECTED_ENV='cygwin'
17630          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17631            MAKE_EXPECTED_ENV='msys'
17632          else
17633            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17634          fi
17635          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17636          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17637        else
17638          # Not relevant for non-Windows
17639          IS_MAKE_CORRECT_ENV=true
17640        fi
17641        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17642          { $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
17643$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;}
17644        else
17645          FOUND_MAKE=$MAKE_CANDIDATE
17646
17647  # Only process if variable expands to non-empty
17648
17649  if test "x$FOUND_MAKE" != x; then
17650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17651
17652  # First separate the path from the arguments. This will split at the first
17653  # space.
17654  complete="$FOUND_MAKE"
17655  path="${complete%% *}"
17656  tmp="$complete EOL"
17657  arguments="${tmp#* }"
17658
17659  # Input might be given as Windows format, start by converting to
17660  # unix format.
17661  new_path=`$CYGPATH -u "$path"`
17662
17663  # Now try to locate executable using which
17664  new_path=`$WHICH "$new_path" 2> /dev/null`
17665  # bat and cmd files are not always considered executable in cygwin causing which
17666  # to not find them
17667  if test "x$new_path" = x \
17668      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17669      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17670    new_path=`$CYGPATH -u "$path"`
17671  fi
17672  if test "x$new_path" = x; then
17673    # Oops. Which didn't find the executable.
17674    # The splitting of arguments from the executable at a space might have been incorrect,
17675    # since paths with space are more likely in Windows. Give it another try with the whole
17676    # argument.
17677    path="$complete"
17678    arguments="EOL"
17679    new_path=`$CYGPATH -u "$path"`
17680    new_path=`$WHICH "$new_path" 2> /dev/null`
17681    # bat and cmd files are not always considered executable in cygwin causing which
17682    # to not find them
17683    if test "x$new_path" = x \
17684        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17685        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17686      new_path=`$CYGPATH -u "$path"`
17687    fi
17688    if test "x$new_path" = x; then
17689      # It's still not found. Now this is an unrecoverable error.
17690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17691$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17692      has_space=`$ECHO "$complete" | $GREP " "`
17693      if test "x$has_space" != x; then
17694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17696      fi
17697      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17698    fi
17699  fi
17700
17701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17704  # "foo.exe" is OK but "foo" is an error.
17705  #
17706  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17707  # It is also a way to make sure we got the proper file name for the real test later on.
17708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17709  if test "x$test_shortpath" = x; then
17710    # Short path failed, file does not exist as specified.
17711    # Try adding .exe or .cmd
17712    if test -f "${new_path}.exe"; then
17713      input_to_shortpath="${new_path}.exe"
17714    elif test -f "${new_path}.cmd"; then
17715      input_to_shortpath="${new_path}.cmd"
17716    else
17717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17718$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17719      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17720$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17721      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17722    fi
17723  else
17724    input_to_shortpath="$new_path"
17725  fi
17726
17727  # Call helper function which possibly converts this using DOS-style short mode.
17728  # If so, the updated path is stored in $new_path.
17729  new_path="$input_to_shortpath"
17730
17731  input_path="$input_to_shortpath"
17732  # Check if we need to convert this using DOS-style short mode. If the path
17733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17734  # take no chances and rewrite it.
17735  # Note: m4 eats our [], so we need to use [ and ] instead.
17736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17737  if test "x$has_forbidden_chars" != x; then
17738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17742      # Going to short mode and back again did indeed matter. Since short mode is
17743      # case insensitive, let's make it lowercase to improve readability.
17744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17745      # Now convert it back to Unix-style (cygpath)
17746      input_path=`$CYGPATH -u "$shortmode_path"`
17747      new_path="$input_path"
17748    fi
17749  fi
17750
17751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17752  if test "x$test_cygdrive_prefix" = x; then
17753    # As a simple fix, exclude /usr/bin since it's not a real path.
17754    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17756      # a path prefixed by /cygdrive for fixpath to work.
17757      new_path="$CYGWIN_ROOT_PATH$input_path"
17758    fi
17759  fi
17760
17761  # remove trailing .exe if any
17762  new_path="${new_path/%.exe/}"
17763
17764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17765
17766  # First separate the path from the arguments. This will split at the first
17767  # space.
17768  complete="$FOUND_MAKE"
17769  path="${complete%% *}"
17770  tmp="$complete EOL"
17771  arguments="${tmp#* }"
17772
17773  # Input might be given as Windows format, start by converting to
17774  # unix format.
17775  new_path="$path"
17776
17777  windows_path="$new_path"
17778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17779    unix_path=`$CYGPATH -u "$windows_path"`
17780    new_path="$unix_path"
17781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17783    new_path="$unix_path"
17784  fi
17785
17786
17787  # Now try to locate executable using which
17788  new_path=`$WHICH "$new_path" 2> /dev/null`
17789
17790  if test "x$new_path" = x; then
17791    # Oops. Which didn't find the executable.
17792    # The splitting of arguments from the executable at a space might have been incorrect,
17793    # since paths with space are more likely in Windows. Give it another try with the whole
17794    # argument.
17795    path="$complete"
17796    arguments="EOL"
17797    new_path="$path"
17798
17799  windows_path="$new_path"
17800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17801    unix_path=`$CYGPATH -u "$windows_path"`
17802    new_path="$unix_path"
17803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17805    new_path="$unix_path"
17806  fi
17807
17808
17809    new_path=`$WHICH "$new_path" 2> /dev/null`
17810    # bat and cmd files are not always considered executable in MSYS causing which
17811    # to not find them
17812    if test "x$new_path" = x \
17813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17815      new_path="$path"
17816
17817  windows_path="$new_path"
17818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17819    unix_path=`$CYGPATH -u "$windows_path"`
17820    new_path="$unix_path"
17821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17823    new_path="$unix_path"
17824  fi
17825
17826    fi
17827
17828    if test "x$new_path" = x; then
17829      # It's still not found. Now this is an unrecoverable error.
17830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17831$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17832      has_space=`$ECHO "$complete" | $GREP " "`
17833      if test "x$has_space" != x; then
17834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17836      fi
17837      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17838    fi
17839  fi
17840
17841  # Now new_path has a complete unix path to the binary
17842  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17843    # Keep paths in /bin as-is, but remove trailing .exe if any
17844    new_path="${new_path/%.exe/}"
17845    # Do not save /bin paths to all_fixpath_prefixes!
17846  else
17847    # Not in mixed or Windows style, start by that.
17848    new_path=`cmd //c echo $new_path`
17849
17850  input_path="$new_path"
17851  # Check if we need to convert this using DOS-style short mode. If the path
17852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17853  # take no chances and rewrite it.
17854  # Note: m4 eats our [], so we need to use [ and ] instead.
17855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17856  if test "x$has_forbidden_chars" != x; then
17857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17859  fi
17860
17861    # Output is in $new_path
17862
17863  windows_path="$new_path"
17864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17865    unix_path=`$CYGPATH -u "$windows_path"`
17866    new_path="$unix_path"
17867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17869    new_path="$unix_path"
17870  fi
17871
17872    # remove trailing .exe if any
17873    new_path="${new_path/%.exe/}"
17874
17875    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17876    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17877  fi
17878
17879    else
17880      # We're on a unix platform. Hooray! :)
17881      # First separate the path from the arguments. This will split at the first
17882      # space.
17883      complete="$FOUND_MAKE"
17884      path="${complete%% *}"
17885      tmp="$complete EOL"
17886      arguments="${tmp#* }"
17887
17888      # Cannot rely on the command "which" here since it doesn't always work.
17889      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17890      if test -z "$is_absolute_path"; then
17891        # Path to executable is not absolute. Find it.
17892        IFS_save="$IFS"
17893        IFS=:
17894        for p in $PATH; do
17895          if test -f "$p/$path" && test -x "$p/$path"; then
17896            new_path="$p/$path"
17897            break
17898          fi
17899        done
17900        IFS="$IFS_save"
17901      else
17902        # This is an absolute path, we can use it without further modifications.
17903        new_path="$path"
17904      fi
17905
17906      if test "x$new_path" = x; then
17907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17908$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17909        has_space=`$ECHO "$complete" | $GREP " "`
17910        if test "x$has_space" != x; then
17911          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17912$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17913        fi
17914        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17915      fi
17916    fi
17917
17918    # Now join together the path and the arguments once again
17919    if test "x$arguments" != xEOL; then
17920      new_complete="$new_path ${arguments% *}"
17921    else
17922      new_complete="$new_path"
17923    fi
17924
17925    if test "x$complete" != "x$new_complete"; then
17926      FOUND_MAKE="$new_complete"
17927      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17928$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17929    fi
17930  fi
17931
17932        fi
17933      fi
17934    fi
17935  fi
17936
17937
17938    if test "x$FOUND_MAKE" = x; then
17939      for ac_prog in make
17940do
17941  # Extract the first word of "$ac_prog", so it can be a program name with args.
17942set dummy $ac_prog; ac_word=$2
17943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17944$as_echo_n "checking for $ac_word... " >&6; }
17945if ${ac_cv_path_CHECK_MAKE+:} false; then :
17946  $as_echo_n "(cached) " >&6
17947else
17948  case $CHECK_MAKE in
17949  [\\/]* | ?:[\\/]*)
17950  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17951  ;;
17952  *)
17953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17954for as_dir in $PATH
17955do
17956  IFS=$as_save_IFS
17957  test -z "$as_dir" && as_dir=.
17958    for ac_exec_ext in '' $ac_executable_extensions; do
17959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17960    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17962    break 2
17963  fi
17964done
17965  done
17966IFS=$as_save_IFS
17967
17968  ;;
17969esac
17970fi
17971CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17972if test -n "$CHECK_MAKE"; then
17973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17974$as_echo "$CHECK_MAKE" >&6; }
17975else
17976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17977$as_echo "no" >&6; }
17978fi
17979
17980
17981  test -n "$CHECK_MAKE" && break
17982done
17983
17984
17985  MAKE_CANDIDATE=""$CHECK_MAKE""
17986  DESCRIPTION="make in PATH"
17987
17988  # On Cygwin, we require a newer version of make than on other platforms
17989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17990    MAKE_VERSION_EXPR="-e 4\."
17991    MAKE_REQUIRED_VERSION="4.0"
17992   else
17993    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17994    MAKE_REQUIRED_VERSION="3.81"
17995  fi
17996
17997  if test "x$MAKE_CANDIDATE" != x; then
17998    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17999$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18000    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18001    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18002    if test "x$IS_GNU_MAKE" = x; then
18003      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18004$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18005    else
18006      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18007      if test "x$IS_MODERN_MAKE" = x; then
18008        { $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
18009$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;}
18010      else
18011        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18012          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18013            MAKE_EXPECTED_ENV='cygwin'
18014          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18015            MAKE_EXPECTED_ENV='msys'
18016          else
18017            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18018          fi
18019          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18020          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18021        else
18022          # Not relevant for non-Windows
18023          IS_MAKE_CORRECT_ENV=true
18024        fi
18025        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18026          { $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
18027$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;}
18028        else
18029          FOUND_MAKE=$MAKE_CANDIDATE
18030
18031  # Only process if variable expands to non-empty
18032
18033  if test "x$FOUND_MAKE" != x; then
18034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18035
18036  # First separate the path from the arguments. This will split at the first
18037  # space.
18038  complete="$FOUND_MAKE"
18039  path="${complete%% *}"
18040  tmp="$complete EOL"
18041  arguments="${tmp#* }"
18042
18043  # Input might be given as Windows format, start by converting to
18044  # unix format.
18045  new_path=`$CYGPATH -u "$path"`
18046
18047  # Now try to locate executable using which
18048  new_path=`$WHICH "$new_path" 2> /dev/null`
18049  # bat and cmd files are not always considered executable in cygwin causing which
18050  # to not find them
18051  if test "x$new_path" = x \
18052      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18053      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18054    new_path=`$CYGPATH -u "$path"`
18055  fi
18056  if test "x$new_path" = x; then
18057    # Oops. Which didn't find the executable.
18058    # The splitting of arguments from the executable at a space might have been incorrect,
18059    # since paths with space are more likely in Windows. Give it another try with the whole
18060    # argument.
18061    path="$complete"
18062    arguments="EOL"
18063    new_path=`$CYGPATH -u "$path"`
18064    new_path=`$WHICH "$new_path" 2> /dev/null`
18065    # bat and cmd files are not always considered executable in cygwin causing which
18066    # to not find them
18067    if test "x$new_path" = x \
18068        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18069        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18070      new_path=`$CYGPATH -u "$path"`
18071    fi
18072    if test "x$new_path" = x; then
18073      # It's still not found. Now this is an unrecoverable error.
18074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18075$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18076      has_space=`$ECHO "$complete" | $GREP " "`
18077      if test "x$has_space" != x; then
18078        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18079$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18080      fi
18081      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18082    fi
18083  fi
18084
18085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18088  # "foo.exe" is OK but "foo" is an error.
18089  #
18090  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18091  # It is also a way to make sure we got the proper file name for the real test later on.
18092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18093  if test "x$test_shortpath" = x; then
18094    # Short path failed, file does not exist as specified.
18095    # Try adding .exe or .cmd
18096    if test -f "${new_path}.exe"; then
18097      input_to_shortpath="${new_path}.exe"
18098    elif test -f "${new_path}.cmd"; then
18099      input_to_shortpath="${new_path}.cmd"
18100    else
18101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18102$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18103      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18104$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18105      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18106    fi
18107  else
18108    input_to_shortpath="$new_path"
18109  fi
18110
18111  # Call helper function which possibly converts this using DOS-style short mode.
18112  # If so, the updated path is stored in $new_path.
18113  new_path="$input_to_shortpath"
18114
18115  input_path="$input_to_shortpath"
18116  # Check if we need to convert this using DOS-style short mode. If the path
18117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18118  # take no chances and rewrite it.
18119  # Note: m4 eats our [], so we need to use [ and ] instead.
18120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18121  if test "x$has_forbidden_chars" != x; then
18122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18126      # Going to short mode and back again did indeed matter. Since short mode is
18127      # case insensitive, let's make it lowercase to improve readability.
18128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18129      # Now convert it back to Unix-style (cygpath)
18130      input_path=`$CYGPATH -u "$shortmode_path"`
18131      new_path="$input_path"
18132    fi
18133  fi
18134
18135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18136  if test "x$test_cygdrive_prefix" = x; then
18137    # As a simple fix, exclude /usr/bin since it's not a real path.
18138    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18140      # a path prefixed by /cygdrive for fixpath to work.
18141      new_path="$CYGWIN_ROOT_PATH$input_path"
18142    fi
18143  fi
18144
18145  # remove trailing .exe if any
18146  new_path="${new_path/%.exe/}"
18147
18148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18149
18150  # First separate the path from the arguments. This will split at the first
18151  # space.
18152  complete="$FOUND_MAKE"
18153  path="${complete%% *}"
18154  tmp="$complete EOL"
18155  arguments="${tmp#* }"
18156
18157  # Input might be given as Windows format, start by converting to
18158  # unix format.
18159  new_path="$path"
18160
18161  windows_path="$new_path"
18162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18163    unix_path=`$CYGPATH -u "$windows_path"`
18164    new_path="$unix_path"
18165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18167    new_path="$unix_path"
18168  fi
18169
18170
18171  # Now try to locate executable using which
18172  new_path=`$WHICH "$new_path" 2> /dev/null`
18173
18174  if test "x$new_path" = x; then
18175    # Oops. Which didn't find the executable.
18176    # The splitting of arguments from the executable at a space might have been incorrect,
18177    # since paths with space are more likely in Windows. Give it another try with the whole
18178    # argument.
18179    path="$complete"
18180    arguments="EOL"
18181    new_path="$path"
18182
18183  windows_path="$new_path"
18184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18185    unix_path=`$CYGPATH -u "$windows_path"`
18186    new_path="$unix_path"
18187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18189    new_path="$unix_path"
18190  fi
18191
18192
18193    new_path=`$WHICH "$new_path" 2> /dev/null`
18194    # bat and cmd files are not always considered executable in MSYS causing which
18195    # to not find them
18196    if test "x$new_path" = x \
18197        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18198        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18199      new_path="$path"
18200
18201  windows_path="$new_path"
18202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18203    unix_path=`$CYGPATH -u "$windows_path"`
18204    new_path="$unix_path"
18205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18207    new_path="$unix_path"
18208  fi
18209
18210    fi
18211
18212    if test "x$new_path" = x; then
18213      # It's still not found. Now this is an unrecoverable error.
18214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18215$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18216      has_space=`$ECHO "$complete" | $GREP " "`
18217      if test "x$has_space" != x; then
18218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18220      fi
18221      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18222    fi
18223  fi
18224
18225  # Now new_path has a complete unix path to the binary
18226  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18227    # Keep paths in /bin as-is, but remove trailing .exe if any
18228    new_path="${new_path/%.exe/}"
18229    # Do not save /bin paths to all_fixpath_prefixes!
18230  else
18231    # Not in mixed or Windows style, start by that.
18232    new_path=`cmd //c echo $new_path`
18233
18234  input_path="$new_path"
18235  # Check if we need to convert this using DOS-style short mode. If the path
18236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18237  # take no chances and rewrite it.
18238  # Note: m4 eats our [], so we need to use [ and ] instead.
18239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18240  if test "x$has_forbidden_chars" != x; then
18241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18243  fi
18244
18245    # Output is in $new_path
18246
18247  windows_path="$new_path"
18248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18249    unix_path=`$CYGPATH -u "$windows_path"`
18250    new_path="$unix_path"
18251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18253    new_path="$unix_path"
18254  fi
18255
18256    # remove trailing .exe if any
18257    new_path="${new_path/%.exe/}"
18258
18259    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18260    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18261  fi
18262
18263    else
18264      # We're on a unix platform. Hooray! :)
18265      # First separate the path from the arguments. This will split at the first
18266      # space.
18267      complete="$FOUND_MAKE"
18268      path="${complete%% *}"
18269      tmp="$complete EOL"
18270      arguments="${tmp#* }"
18271
18272      # Cannot rely on the command "which" here since it doesn't always work.
18273      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18274      if test -z "$is_absolute_path"; then
18275        # Path to executable is not absolute. Find it.
18276        IFS_save="$IFS"
18277        IFS=:
18278        for p in $PATH; do
18279          if test -f "$p/$path" && test -x "$p/$path"; then
18280            new_path="$p/$path"
18281            break
18282          fi
18283        done
18284        IFS="$IFS_save"
18285      else
18286        # This is an absolute path, we can use it without further modifications.
18287        new_path="$path"
18288      fi
18289
18290      if test "x$new_path" = x; then
18291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18292$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18293        has_space=`$ECHO "$complete" | $GREP " "`
18294        if test "x$has_space" != x; then
18295          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18296$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18297        fi
18298        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18299      fi
18300    fi
18301
18302    # Now join together the path and the arguments once again
18303    if test "x$arguments" != xEOL; then
18304      new_complete="$new_path ${arguments% *}"
18305    else
18306      new_complete="$new_path"
18307    fi
18308
18309    if test "x$complete" != "x$new_complete"; then
18310      FOUND_MAKE="$new_complete"
18311      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18312$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18313    fi
18314  fi
18315
18316        fi
18317      fi
18318    fi
18319  fi
18320
18321    fi
18322
18323    if test "x$FOUND_MAKE" = x; then
18324      if test "x$TOOLCHAIN_PATH" != x; then
18325        # We have a toolchain path, check that as well before giving up.
18326        OLD_PATH=$PATH
18327        PATH=$TOOLCHAIN_PATH:$PATH
18328        for ac_prog in gmake
18329do
18330  # Extract the first word of "$ac_prog", so it can be a program name with args.
18331set dummy $ac_prog; ac_word=$2
18332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18333$as_echo_n "checking for $ac_word... " >&6; }
18334if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18335  $as_echo_n "(cached) " >&6
18336else
18337  case $CHECK_TOOLSDIR_GMAKE in
18338  [\\/]* | ?:[\\/]*)
18339  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18340  ;;
18341  *)
18342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18343for as_dir in $PATH
18344do
18345  IFS=$as_save_IFS
18346  test -z "$as_dir" && as_dir=.
18347    for ac_exec_ext in '' $ac_executable_extensions; do
18348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18349    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18351    break 2
18352  fi
18353done
18354  done
18355IFS=$as_save_IFS
18356
18357  ;;
18358esac
18359fi
18360CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18361if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18363$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18364else
18365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18366$as_echo "no" >&6; }
18367fi
18368
18369
18370  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18371done
18372
18373
18374  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18375  DESCRIPTION="gmake in tools-dir"
18376
18377  # On Cygwin, we require a newer version of make than on other platforms
18378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18379    MAKE_VERSION_EXPR="-e 4\."
18380    MAKE_REQUIRED_VERSION="4.0"
18381   else
18382    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18383    MAKE_REQUIRED_VERSION="3.81"
18384  fi
18385
18386  if test "x$MAKE_CANDIDATE" != x; then
18387    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18388$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18389    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18390    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18391    if test "x$IS_GNU_MAKE" = x; then
18392      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18393$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18394    else
18395      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18396      if test "x$IS_MODERN_MAKE" = x; then
18397        { $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
18398$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;}
18399      else
18400        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18401          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18402            MAKE_EXPECTED_ENV='cygwin'
18403          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18404            MAKE_EXPECTED_ENV='msys'
18405          else
18406            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18407          fi
18408          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18409          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18410        else
18411          # Not relevant for non-Windows
18412          IS_MAKE_CORRECT_ENV=true
18413        fi
18414        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18415          { $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
18416$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;}
18417        else
18418          FOUND_MAKE=$MAKE_CANDIDATE
18419
18420  # Only process if variable expands to non-empty
18421
18422  if test "x$FOUND_MAKE" != x; then
18423    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18424
18425  # First separate the path from the arguments. This will split at the first
18426  # space.
18427  complete="$FOUND_MAKE"
18428  path="${complete%% *}"
18429  tmp="$complete EOL"
18430  arguments="${tmp#* }"
18431
18432  # Input might be given as Windows format, start by converting to
18433  # unix format.
18434  new_path=`$CYGPATH -u "$path"`
18435
18436  # Now try to locate executable using which
18437  new_path=`$WHICH "$new_path" 2> /dev/null`
18438  # bat and cmd files are not always considered executable in cygwin causing which
18439  # to not find them
18440  if test "x$new_path" = x \
18441      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18442      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18443    new_path=`$CYGPATH -u "$path"`
18444  fi
18445  if test "x$new_path" = x; then
18446    # Oops. Which didn't find the executable.
18447    # The splitting of arguments from the executable at a space might have been incorrect,
18448    # since paths with space are more likely in Windows. Give it another try with the whole
18449    # argument.
18450    path="$complete"
18451    arguments="EOL"
18452    new_path=`$CYGPATH -u "$path"`
18453    new_path=`$WHICH "$new_path" 2> /dev/null`
18454    # bat and cmd files are not always considered executable in cygwin causing which
18455    # to not find them
18456    if test "x$new_path" = x \
18457        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18458        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18459      new_path=`$CYGPATH -u "$path"`
18460    fi
18461    if test "x$new_path" = x; then
18462      # It's still not found. Now this is an unrecoverable error.
18463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18464$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18465      has_space=`$ECHO "$complete" | $GREP " "`
18466      if test "x$has_space" != x; then
18467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18469      fi
18470      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18471    fi
18472  fi
18473
18474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18477  # "foo.exe" is OK but "foo" is an error.
18478  #
18479  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18480  # It is also a way to make sure we got the proper file name for the real test later on.
18481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18482  if test "x$test_shortpath" = x; then
18483    # Short path failed, file does not exist as specified.
18484    # Try adding .exe or .cmd
18485    if test -f "${new_path}.exe"; then
18486      input_to_shortpath="${new_path}.exe"
18487    elif test -f "${new_path}.cmd"; then
18488      input_to_shortpath="${new_path}.cmd"
18489    else
18490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18491$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18492      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18493$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18494      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18495    fi
18496  else
18497    input_to_shortpath="$new_path"
18498  fi
18499
18500  # Call helper function which possibly converts this using DOS-style short mode.
18501  # If so, the updated path is stored in $new_path.
18502  new_path="$input_to_shortpath"
18503
18504  input_path="$input_to_shortpath"
18505  # Check if we need to convert this using DOS-style short mode. If the path
18506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18507  # take no chances and rewrite it.
18508  # Note: m4 eats our [], so we need to use [ and ] instead.
18509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18510  if test "x$has_forbidden_chars" != x; then
18511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18515      # Going to short mode and back again did indeed matter. Since short mode is
18516      # case insensitive, let's make it lowercase to improve readability.
18517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18518      # Now convert it back to Unix-style (cygpath)
18519      input_path=`$CYGPATH -u "$shortmode_path"`
18520      new_path="$input_path"
18521    fi
18522  fi
18523
18524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18525  if test "x$test_cygdrive_prefix" = x; then
18526    # As a simple fix, exclude /usr/bin since it's not a real path.
18527    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18529      # a path prefixed by /cygdrive for fixpath to work.
18530      new_path="$CYGWIN_ROOT_PATH$input_path"
18531    fi
18532  fi
18533
18534  # remove trailing .exe if any
18535  new_path="${new_path/%.exe/}"
18536
18537    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18538
18539  # First separate the path from the arguments. This will split at the first
18540  # space.
18541  complete="$FOUND_MAKE"
18542  path="${complete%% *}"
18543  tmp="$complete EOL"
18544  arguments="${tmp#* }"
18545
18546  # Input might be given as Windows format, start by converting to
18547  # unix format.
18548  new_path="$path"
18549
18550  windows_path="$new_path"
18551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18552    unix_path=`$CYGPATH -u "$windows_path"`
18553    new_path="$unix_path"
18554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18556    new_path="$unix_path"
18557  fi
18558
18559
18560  # Now try to locate executable using which
18561  new_path=`$WHICH "$new_path" 2> /dev/null`
18562
18563  if test "x$new_path" = x; then
18564    # Oops. Which didn't find the executable.
18565    # The splitting of arguments from the executable at a space might have been incorrect,
18566    # since paths with space are more likely in Windows. Give it another try with the whole
18567    # argument.
18568    path="$complete"
18569    arguments="EOL"
18570    new_path="$path"
18571
18572  windows_path="$new_path"
18573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18574    unix_path=`$CYGPATH -u "$windows_path"`
18575    new_path="$unix_path"
18576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18578    new_path="$unix_path"
18579  fi
18580
18581
18582    new_path=`$WHICH "$new_path" 2> /dev/null`
18583    # bat and cmd files are not always considered executable in MSYS causing which
18584    # to not find them
18585    if test "x$new_path" = x \
18586        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18587        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18588      new_path="$path"
18589
18590  windows_path="$new_path"
18591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18592    unix_path=`$CYGPATH -u "$windows_path"`
18593    new_path="$unix_path"
18594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18596    new_path="$unix_path"
18597  fi
18598
18599    fi
18600
18601    if test "x$new_path" = x; then
18602      # It's still not found. Now this is an unrecoverable error.
18603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18604$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18605      has_space=`$ECHO "$complete" | $GREP " "`
18606      if test "x$has_space" != x; then
18607        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18608$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18609      fi
18610      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18611    fi
18612  fi
18613
18614  # Now new_path has a complete unix path to the binary
18615  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18616    # Keep paths in /bin as-is, but remove trailing .exe if any
18617    new_path="${new_path/%.exe/}"
18618    # Do not save /bin paths to all_fixpath_prefixes!
18619  else
18620    # Not in mixed or Windows style, start by that.
18621    new_path=`cmd //c echo $new_path`
18622
18623  input_path="$new_path"
18624  # Check if we need to convert this using DOS-style short mode. If the path
18625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18626  # take no chances and rewrite it.
18627  # Note: m4 eats our [], so we need to use [ and ] instead.
18628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18629  if test "x$has_forbidden_chars" != x; then
18630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18632  fi
18633
18634    # Output is in $new_path
18635
18636  windows_path="$new_path"
18637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18638    unix_path=`$CYGPATH -u "$windows_path"`
18639    new_path="$unix_path"
18640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18642    new_path="$unix_path"
18643  fi
18644
18645    # remove trailing .exe if any
18646    new_path="${new_path/%.exe/}"
18647
18648    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18649    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18650  fi
18651
18652    else
18653      # We're on a unix platform. Hooray! :)
18654      # First separate the path from the arguments. This will split at the first
18655      # space.
18656      complete="$FOUND_MAKE"
18657      path="${complete%% *}"
18658      tmp="$complete EOL"
18659      arguments="${tmp#* }"
18660
18661      # Cannot rely on the command "which" here since it doesn't always work.
18662      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18663      if test -z "$is_absolute_path"; then
18664        # Path to executable is not absolute. Find it.
18665        IFS_save="$IFS"
18666        IFS=:
18667        for p in $PATH; do
18668          if test -f "$p/$path" && test -x "$p/$path"; then
18669            new_path="$p/$path"
18670            break
18671          fi
18672        done
18673        IFS="$IFS_save"
18674      else
18675        # This is an absolute path, we can use it without further modifications.
18676        new_path="$path"
18677      fi
18678
18679      if test "x$new_path" = x; then
18680        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18681$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18682        has_space=`$ECHO "$complete" | $GREP " "`
18683        if test "x$has_space" != x; then
18684          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18685$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18686        fi
18687        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18688      fi
18689    fi
18690
18691    # Now join together the path and the arguments once again
18692    if test "x$arguments" != xEOL; then
18693      new_complete="$new_path ${arguments% *}"
18694    else
18695      new_complete="$new_path"
18696    fi
18697
18698    if test "x$complete" != "x$new_complete"; then
18699      FOUND_MAKE="$new_complete"
18700      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18701$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18702    fi
18703  fi
18704
18705        fi
18706      fi
18707    fi
18708  fi
18709
18710        if test "x$FOUND_MAKE" = x; then
18711          for ac_prog in make
18712do
18713  # Extract the first word of "$ac_prog", so it can be a program name with args.
18714set dummy $ac_prog; ac_word=$2
18715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18716$as_echo_n "checking for $ac_word... " >&6; }
18717if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18718  $as_echo_n "(cached) " >&6
18719else
18720  case $CHECK_TOOLSDIR_MAKE in
18721  [\\/]* | ?:[\\/]*)
18722  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18723  ;;
18724  *)
18725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18726for as_dir in $PATH
18727do
18728  IFS=$as_save_IFS
18729  test -z "$as_dir" && as_dir=.
18730    for ac_exec_ext in '' $ac_executable_extensions; do
18731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18732    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18734    break 2
18735  fi
18736done
18737  done
18738IFS=$as_save_IFS
18739
18740  ;;
18741esac
18742fi
18743CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18744if test -n "$CHECK_TOOLSDIR_MAKE"; then
18745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18746$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18747else
18748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18749$as_echo "no" >&6; }
18750fi
18751
18752
18753  test -n "$CHECK_TOOLSDIR_MAKE" && break
18754done
18755
18756
18757  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18758  DESCRIPTION="make in tools-dir"
18759
18760  # On Cygwin, we require a newer version of make than on other platforms
18761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18762    MAKE_VERSION_EXPR="-e 4\."
18763    MAKE_REQUIRED_VERSION="4.0"
18764   else
18765    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18766    MAKE_REQUIRED_VERSION="3.81"
18767  fi
18768
18769  if test "x$MAKE_CANDIDATE" != x; then
18770    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18771$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18772    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18773    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18774    if test "x$IS_GNU_MAKE" = x; then
18775      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18776$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18777    else
18778      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18779      if test "x$IS_MODERN_MAKE" = x; then
18780        { $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
18781$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;}
18782      else
18783        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18784          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18785            MAKE_EXPECTED_ENV='cygwin'
18786          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18787            MAKE_EXPECTED_ENV='msys'
18788          else
18789            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18790          fi
18791          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18792          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18793        else
18794          # Not relevant for non-Windows
18795          IS_MAKE_CORRECT_ENV=true
18796        fi
18797        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18798          { $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
18799$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;}
18800        else
18801          FOUND_MAKE=$MAKE_CANDIDATE
18802
18803  # Only process if variable expands to non-empty
18804
18805  if test "x$FOUND_MAKE" != x; then
18806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18807
18808  # First separate the path from the arguments. This will split at the first
18809  # space.
18810  complete="$FOUND_MAKE"
18811  path="${complete%% *}"
18812  tmp="$complete EOL"
18813  arguments="${tmp#* }"
18814
18815  # Input might be given as Windows format, start by converting to
18816  # unix format.
18817  new_path=`$CYGPATH -u "$path"`
18818
18819  # Now try to locate executable using which
18820  new_path=`$WHICH "$new_path" 2> /dev/null`
18821  # bat and cmd files are not always considered executable in cygwin causing which
18822  # to not find them
18823  if test "x$new_path" = x \
18824      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18825      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18826    new_path=`$CYGPATH -u "$path"`
18827  fi
18828  if test "x$new_path" = x; then
18829    # Oops. Which didn't find the executable.
18830    # The splitting of arguments from the executable at a space might have been incorrect,
18831    # since paths with space are more likely in Windows. Give it another try with the whole
18832    # argument.
18833    path="$complete"
18834    arguments="EOL"
18835    new_path=`$CYGPATH -u "$path"`
18836    new_path=`$WHICH "$new_path" 2> /dev/null`
18837    # bat and cmd files are not always considered executable in cygwin causing which
18838    # to not find them
18839    if test "x$new_path" = x \
18840        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18841        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18842      new_path=`$CYGPATH -u "$path"`
18843    fi
18844    if test "x$new_path" = x; then
18845      # It's still not found. Now this is an unrecoverable error.
18846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18847$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18848      has_space=`$ECHO "$complete" | $GREP " "`
18849      if test "x$has_space" != x; then
18850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18852      fi
18853      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18854    fi
18855  fi
18856
18857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18860  # "foo.exe" is OK but "foo" is an error.
18861  #
18862  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18863  # It is also a way to make sure we got the proper file name for the real test later on.
18864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18865  if test "x$test_shortpath" = x; then
18866    # Short path failed, file does not exist as specified.
18867    # Try adding .exe or .cmd
18868    if test -f "${new_path}.exe"; then
18869      input_to_shortpath="${new_path}.exe"
18870    elif test -f "${new_path}.cmd"; then
18871      input_to_shortpath="${new_path}.cmd"
18872    else
18873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18874$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18875      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18876$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18877      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18878    fi
18879  else
18880    input_to_shortpath="$new_path"
18881  fi
18882
18883  # Call helper function which possibly converts this using DOS-style short mode.
18884  # If so, the updated path is stored in $new_path.
18885  new_path="$input_to_shortpath"
18886
18887  input_path="$input_to_shortpath"
18888  # Check if we need to convert this using DOS-style short mode. If the path
18889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18890  # take no chances and rewrite it.
18891  # Note: m4 eats our [], so we need to use [ and ] instead.
18892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18893  if test "x$has_forbidden_chars" != x; then
18894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18898      # Going to short mode and back again did indeed matter. Since short mode is
18899      # case insensitive, let's make it lowercase to improve readability.
18900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18901      # Now convert it back to Unix-style (cygpath)
18902      input_path=`$CYGPATH -u "$shortmode_path"`
18903      new_path="$input_path"
18904    fi
18905  fi
18906
18907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18908  if test "x$test_cygdrive_prefix" = x; then
18909    # As a simple fix, exclude /usr/bin since it's not a real path.
18910    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18912      # a path prefixed by /cygdrive for fixpath to work.
18913      new_path="$CYGWIN_ROOT_PATH$input_path"
18914    fi
18915  fi
18916
18917  # remove trailing .exe if any
18918  new_path="${new_path/%.exe/}"
18919
18920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18921
18922  # First separate the path from the arguments. This will split at the first
18923  # space.
18924  complete="$FOUND_MAKE"
18925  path="${complete%% *}"
18926  tmp="$complete EOL"
18927  arguments="${tmp#* }"
18928
18929  # Input might be given as Windows format, start by converting to
18930  # unix format.
18931  new_path="$path"
18932
18933  windows_path="$new_path"
18934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18935    unix_path=`$CYGPATH -u "$windows_path"`
18936    new_path="$unix_path"
18937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18939    new_path="$unix_path"
18940  fi
18941
18942
18943  # Now try to locate executable using which
18944  new_path=`$WHICH "$new_path" 2> /dev/null`
18945
18946  if test "x$new_path" = x; then
18947    # Oops. Which didn't find the executable.
18948    # The splitting of arguments from the executable at a space might have been incorrect,
18949    # since paths with space are more likely in Windows. Give it another try with the whole
18950    # argument.
18951    path="$complete"
18952    arguments="EOL"
18953    new_path="$path"
18954
18955  windows_path="$new_path"
18956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18957    unix_path=`$CYGPATH -u "$windows_path"`
18958    new_path="$unix_path"
18959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18961    new_path="$unix_path"
18962  fi
18963
18964
18965    new_path=`$WHICH "$new_path" 2> /dev/null`
18966    # bat and cmd files are not always considered executable in MSYS causing which
18967    # to not find them
18968    if test "x$new_path" = x \
18969        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18970        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18971      new_path="$path"
18972
18973  windows_path="$new_path"
18974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18975    unix_path=`$CYGPATH -u "$windows_path"`
18976    new_path="$unix_path"
18977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18979    new_path="$unix_path"
18980  fi
18981
18982    fi
18983
18984    if test "x$new_path" = x; then
18985      # It's still not found. Now this is an unrecoverable error.
18986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18987$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18988      has_space=`$ECHO "$complete" | $GREP " "`
18989      if test "x$has_space" != x; then
18990        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18991$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18992      fi
18993      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18994    fi
18995  fi
18996
18997  # Now new_path has a complete unix path to the binary
18998  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18999    # Keep paths in /bin as-is, but remove trailing .exe if any
19000    new_path="${new_path/%.exe/}"
19001    # Do not save /bin paths to all_fixpath_prefixes!
19002  else
19003    # Not in mixed or Windows style, start by that.
19004    new_path=`cmd //c echo $new_path`
19005
19006  input_path="$new_path"
19007  # Check if we need to convert this using DOS-style short mode. If the path
19008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19009  # take no chances and rewrite it.
19010  # Note: m4 eats our [], so we need to use [ and ] instead.
19011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19012  if test "x$has_forbidden_chars" != x; then
19013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19015  fi
19016
19017    # Output is in $new_path
19018
19019  windows_path="$new_path"
19020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19021    unix_path=`$CYGPATH -u "$windows_path"`
19022    new_path="$unix_path"
19023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19025    new_path="$unix_path"
19026  fi
19027
19028    # remove trailing .exe if any
19029    new_path="${new_path/%.exe/}"
19030
19031    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19032    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19033  fi
19034
19035    else
19036      # We're on a unix platform. Hooray! :)
19037      # First separate the path from the arguments. This will split at the first
19038      # space.
19039      complete="$FOUND_MAKE"
19040      path="${complete%% *}"
19041      tmp="$complete EOL"
19042      arguments="${tmp#* }"
19043
19044      # Cannot rely on the command "which" here since it doesn't always work.
19045      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19046      if test -z "$is_absolute_path"; then
19047        # Path to executable is not absolute. Find it.
19048        IFS_save="$IFS"
19049        IFS=:
19050        for p in $PATH; do
19051          if test -f "$p/$path" && test -x "$p/$path"; then
19052            new_path="$p/$path"
19053            break
19054          fi
19055        done
19056        IFS="$IFS_save"
19057      else
19058        # This is an absolute path, we can use it without further modifications.
19059        new_path="$path"
19060      fi
19061
19062      if test "x$new_path" = x; then
19063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19064$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19065        has_space=`$ECHO "$complete" | $GREP " "`
19066        if test "x$has_space" != x; then
19067          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19068$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19069        fi
19070        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19071      fi
19072    fi
19073
19074    # Now join together the path and the arguments once again
19075    if test "x$arguments" != xEOL; then
19076      new_complete="$new_path ${arguments% *}"
19077    else
19078      new_complete="$new_path"
19079    fi
19080
19081    if test "x$complete" != "x$new_complete"; then
19082      FOUND_MAKE="$new_complete"
19083      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19084$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19085    fi
19086  fi
19087
19088        fi
19089      fi
19090    fi
19091  fi
19092
19093        fi
19094        PATH=$OLD_PATH
19095      fi
19096    fi
19097
19098    if test "x$FOUND_MAKE" = x; then
19099      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
19100    fi
19101
19102  else
19103    # The variable is set, but is it from the command line or the environment?
19104
19105    # Try to remove the string !MAKE! from our list.
19106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19108      # If it failed, the variable was not from the command line. Ignore it,
19109      # but warn the user (except for BASH, which is always set by the calling BASH).
19110      if test "xMAKE" != xBASH; then
19111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19112$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19113      fi
19114      # Try to locate tool using the code snippet
19115
19116    # Try our hardest to locate a correct version of GNU make
19117    for ac_prog in gmake
19118do
19119  # Extract the first word of "$ac_prog", so it can be a program name with args.
19120set dummy $ac_prog; ac_word=$2
19121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19122$as_echo_n "checking for $ac_word... " >&6; }
19123if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19124  $as_echo_n "(cached) " >&6
19125else
19126  case $CHECK_GMAKE in
19127  [\\/]* | ?:[\\/]*)
19128  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19129  ;;
19130  *)
19131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19132for as_dir in $PATH
19133do
19134  IFS=$as_save_IFS
19135  test -z "$as_dir" && as_dir=.
19136    for ac_exec_ext in '' $ac_executable_extensions; do
19137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19138    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19140    break 2
19141  fi
19142done
19143  done
19144IFS=$as_save_IFS
19145
19146  ;;
19147esac
19148fi
19149CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19150if test -n "$CHECK_GMAKE"; then
19151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19152$as_echo "$CHECK_GMAKE" >&6; }
19153else
19154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19155$as_echo "no" >&6; }
19156fi
19157
19158
19159  test -n "$CHECK_GMAKE" && break
19160done
19161
19162
19163  MAKE_CANDIDATE=""$CHECK_GMAKE""
19164  DESCRIPTION="gmake in PATH"
19165
19166  # On Cygwin, we require a newer version of make than on other platforms
19167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19168    MAKE_VERSION_EXPR="-e 4\."
19169    MAKE_REQUIRED_VERSION="4.0"
19170   else
19171    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19172    MAKE_REQUIRED_VERSION="3.81"
19173  fi
19174
19175  if test "x$MAKE_CANDIDATE" != x; then
19176    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19177$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19178    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19179    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19180    if test "x$IS_GNU_MAKE" = x; then
19181      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19182$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19183    else
19184      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19185      if test "x$IS_MODERN_MAKE" = x; then
19186        { $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
19187$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;}
19188      else
19189        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19190          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19191            MAKE_EXPECTED_ENV='cygwin'
19192          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19193            MAKE_EXPECTED_ENV='msys'
19194          else
19195            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19196          fi
19197          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19198          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19199        else
19200          # Not relevant for non-Windows
19201          IS_MAKE_CORRECT_ENV=true
19202        fi
19203        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19204          { $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
19205$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;}
19206        else
19207          FOUND_MAKE=$MAKE_CANDIDATE
19208
19209  # Only process if variable expands to non-empty
19210
19211  if test "x$FOUND_MAKE" != x; then
19212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19213
19214  # First separate the path from the arguments. This will split at the first
19215  # space.
19216  complete="$FOUND_MAKE"
19217  path="${complete%% *}"
19218  tmp="$complete EOL"
19219  arguments="${tmp#* }"
19220
19221  # Input might be given as Windows format, start by converting to
19222  # unix format.
19223  new_path=`$CYGPATH -u "$path"`
19224
19225  # Now try to locate executable using which
19226  new_path=`$WHICH "$new_path" 2> /dev/null`
19227  # bat and cmd files are not always considered executable in cygwin causing which
19228  # to not find them
19229  if test "x$new_path" = x \
19230      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19231      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19232    new_path=`$CYGPATH -u "$path"`
19233  fi
19234  if test "x$new_path" = x; then
19235    # Oops. Which didn't find the executable.
19236    # The splitting of arguments from the executable at a space might have been incorrect,
19237    # since paths with space are more likely in Windows. Give it another try with the whole
19238    # argument.
19239    path="$complete"
19240    arguments="EOL"
19241    new_path=`$CYGPATH -u "$path"`
19242    new_path=`$WHICH "$new_path" 2> /dev/null`
19243    # bat and cmd files are not always considered executable in cygwin causing which
19244    # to not find them
19245    if test "x$new_path" = x \
19246        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19247        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19248      new_path=`$CYGPATH -u "$path"`
19249    fi
19250    if test "x$new_path" = x; then
19251      # It's still not found. Now this is an unrecoverable error.
19252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19253$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19254      has_space=`$ECHO "$complete" | $GREP " "`
19255      if test "x$has_space" != x; then
19256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19258      fi
19259      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19260    fi
19261  fi
19262
19263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19266  # "foo.exe" is OK but "foo" is an error.
19267  #
19268  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19269  # It is also a way to make sure we got the proper file name for the real test later on.
19270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19271  if test "x$test_shortpath" = x; then
19272    # Short path failed, file does not exist as specified.
19273    # Try adding .exe or .cmd
19274    if test -f "${new_path}.exe"; then
19275      input_to_shortpath="${new_path}.exe"
19276    elif test -f "${new_path}.cmd"; then
19277      input_to_shortpath="${new_path}.cmd"
19278    else
19279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19280$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19281      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19282$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19283      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19284    fi
19285  else
19286    input_to_shortpath="$new_path"
19287  fi
19288
19289  # Call helper function which possibly converts this using DOS-style short mode.
19290  # If so, the updated path is stored in $new_path.
19291  new_path="$input_to_shortpath"
19292
19293  input_path="$input_to_shortpath"
19294  # Check if we need to convert this using DOS-style short mode. If the path
19295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19296  # take no chances and rewrite it.
19297  # Note: m4 eats our [], so we need to use [ and ] instead.
19298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19299  if test "x$has_forbidden_chars" != x; then
19300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19304      # Going to short mode and back again did indeed matter. Since short mode is
19305      # case insensitive, let's make it lowercase to improve readability.
19306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19307      # Now convert it back to Unix-style (cygpath)
19308      input_path=`$CYGPATH -u "$shortmode_path"`
19309      new_path="$input_path"
19310    fi
19311  fi
19312
19313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19314  if test "x$test_cygdrive_prefix" = x; then
19315    # As a simple fix, exclude /usr/bin since it's not a real path.
19316    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19318      # a path prefixed by /cygdrive for fixpath to work.
19319      new_path="$CYGWIN_ROOT_PATH$input_path"
19320    fi
19321  fi
19322
19323  # remove trailing .exe if any
19324  new_path="${new_path/%.exe/}"
19325
19326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19327
19328  # First separate the path from the arguments. This will split at the first
19329  # space.
19330  complete="$FOUND_MAKE"
19331  path="${complete%% *}"
19332  tmp="$complete EOL"
19333  arguments="${tmp#* }"
19334
19335  # Input might be given as Windows format, start by converting to
19336  # unix format.
19337  new_path="$path"
19338
19339  windows_path="$new_path"
19340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19341    unix_path=`$CYGPATH -u "$windows_path"`
19342    new_path="$unix_path"
19343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19345    new_path="$unix_path"
19346  fi
19347
19348
19349  # Now try to locate executable using which
19350  new_path=`$WHICH "$new_path" 2> /dev/null`
19351
19352  if test "x$new_path" = x; then
19353    # Oops. Which didn't find the executable.
19354    # The splitting of arguments from the executable at a space might have been incorrect,
19355    # since paths with space are more likely in Windows. Give it another try with the whole
19356    # argument.
19357    path="$complete"
19358    arguments="EOL"
19359    new_path="$path"
19360
19361  windows_path="$new_path"
19362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19363    unix_path=`$CYGPATH -u "$windows_path"`
19364    new_path="$unix_path"
19365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19367    new_path="$unix_path"
19368  fi
19369
19370
19371    new_path=`$WHICH "$new_path" 2> /dev/null`
19372    # bat and cmd files are not always considered executable in MSYS causing which
19373    # to not find them
19374    if test "x$new_path" = x \
19375        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19376        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19377      new_path="$path"
19378
19379  windows_path="$new_path"
19380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19381    unix_path=`$CYGPATH -u "$windows_path"`
19382    new_path="$unix_path"
19383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19385    new_path="$unix_path"
19386  fi
19387
19388    fi
19389
19390    if test "x$new_path" = x; then
19391      # It's still not found. Now this is an unrecoverable error.
19392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19393$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19394      has_space=`$ECHO "$complete" | $GREP " "`
19395      if test "x$has_space" != x; then
19396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19398      fi
19399      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19400    fi
19401  fi
19402
19403  # Now new_path has a complete unix path to the binary
19404  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19405    # Keep paths in /bin as-is, but remove trailing .exe if any
19406    new_path="${new_path/%.exe/}"
19407    # Do not save /bin paths to all_fixpath_prefixes!
19408  else
19409    # Not in mixed or Windows style, start by that.
19410    new_path=`cmd //c echo $new_path`
19411
19412  input_path="$new_path"
19413  # Check if we need to convert this using DOS-style short mode. If the path
19414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19415  # take no chances and rewrite it.
19416  # Note: m4 eats our [], so we need to use [ and ] instead.
19417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19418  if test "x$has_forbidden_chars" != x; then
19419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19421  fi
19422
19423    # Output is in $new_path
19424
19425  windows_path="$new_path"
19426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19427    unix_path=`$CYGPATH -u "$windows_path"`
19428    new_path="$unix_path"
19429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19431    new_path="$unix_path"
19432  fi
19433
19434    # remove trailing .exe if any
19435    new_path="${new_path/%.exe/}"
19436
19437    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19438    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19439  fi
19440
19441    else
19442      # We're on a unix platform. Hooray! :)
19443      # First separate the path from the arguments. This will split at the first
19444      # space.
19445      complete="$FOUND_MAKE"
19446      path="${complete%% *}"
19447      tmp="$complete EOL"
19448      arguments="${tmp#* }"
19449
19450      # Cannot rely on the command "which" here since it doesn't always work.
19451      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19452      if test -z "$is_absolute_path"; then
19453        # Path to executable is not absolute. Find it.
19454        IFS_save="$IFS"
19455        IFS=:
19456        for p in $PATH; do
19457          if test -f "$p/$path" && test -x "$p/$path"; then
19458            new_path="$p/$path"
19459            break
19460          fi
19461        done
19462        IFS="$IFS_save"
19463      else
19464        # This is an absolute path, we can use it without further modifications.
19465        new_path="$path"
19466      fi
19467
19468      if test "x$new_path" = x; then
19469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19470$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19471        has_space=`$ECHO "$complete" | $GREP " "`
19472        if test "x$has_space" != x; then
19473          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19474$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19475        fi
19476        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19477      fi
19478    fi
19479
19480    # Now join together the path and the arguments once again
19481    if test "x$arguments" != xEOL; then
19482      new_complete="$new_path ${arguments% *}"
19483    else
19484      new_complete="$new_path"
19485    fi
19486
19487    if test "x$complete" != "x$new_complete"; then
19488      FOUND_MAKE="$new_complete"
19489      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19490$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19491    fi
19492  fi
19493
19494        fi
19495      fi
19496    fi
19497  fi
19498
19499
19500    if test "x$FOUND_MAKE" = x; then
19501      for ac_prog in make
19502do
19503  # Extract the first word of "$ac_prog", so it can be a program name with args.
19504set dummy $ac_prog; ac_word=$2
19505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19506$as_echo_n "checking for $ac_word... " >&6; }
19507if ${ac_cv_path_CHECK_MAKE+:} false; then :
19508  $as_echo_n "(cached) " >&6
19509else
19510  case $CHECK_MAKE in
19511  [\\/]* | ?:[\\/]*)
19512  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19513  ;;
19514  *)
19515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19516for as_dir in $PATH
19517do
19518  IFS=$as_save_IFS
19519  test -z "$as_dir" && as_dir=.
19520    for ac_exec_ext in '' $ac_executable_extensions; do
19521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19522    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19524    break 2
19525  fi
19526done
19527  done
19528IFS=$as_save_IFS
19529
19530  ;;
19531esac
19532fi
19533CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19534if test -n "$CHECK_MAKE"; then
19535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19536$as_echo "$CHECK_MAKE" >&6; }
19537else
19538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19539$as_echo "no" >&6; }
19540fi
19541
19542
19543  test -n "$CHECK_MAKE" && break
19544done
19545
19546
19547  MAKE_CANDIDATE=""$CHECK_MAKE""
19548  DESCRIPTION="make in PATH"
19549
19550  # On Cygwin, we require a newer version of make than on other platforms
19551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19552    MAKE_VERSION_EXPR="-e 4\."
19553    MAKE_REQUIRED_VERSION="4.0"
19554   else
19555    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19556    MAKE_REQUIRED_VERSION="3.81"
19557  fi
19558
19559  if test "x$MAKE_CANDIDATE" != x; then
19560    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19561$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19562    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19563    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19564    if test "x$IS_GNU_MAKE" = x; then
19565      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19566$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19567    else
19568      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19569      if test "x$IS_MODERN_MAKE" = x; then
19570        { $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
19571$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;}
19572      else
19573        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19574          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19575            MAKE_EXPECTED_ENV='cygwin'
19576          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19577            MAKE_EXPECTED_ENV='msys'
19578          else
19579            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19580          fi
19581          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19582          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19583        else
19584          # Not relevant for non-Windows
19585          IS_MAKE_CORRECT_ENV=true
19586        fi
19587        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19588          { $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
19589$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;}
19590        else
19591          FOUND_MAKE=$MAKE_CANDIDATE
19592
19593  # Only process if variable expands to non-empty
19594
19595  if test "x$FOUND_MAKE" != x; then
19596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19597
19598  # First separate the path from the arguments. This will split at the first
19599  # space.
19600  complete="$FOUND_MAKE"
19601  path="${complete%% *}"
19602  tmp="$complete EOL"
19603  arguments="${tmp#* }"
19604
19605  # Input might be given as Windows format, start by converting to
19606  # unix format.
19607  new_path=`$CYGPATH -u "$path"`
19608
19609  # Now try to locate executable using which
19610  new_path=`$WHICH "$new_path" 2> /dev/null`
19611  # bat and cmd files are not always considered executable in cygwin causing which
19612  # to not find them
19613  if test "x$new_path" = x \
19614      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19615      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19616    new_path=`$CYGPATH -u "$path"`
19617  fi
19618  if test "x$new_path" = x; then
19619    # Oops. Which didn't find the executable.
19620    # The splitting of arguments from the executable at a space might have been incorrect,
19621    # since paths with space are more likely in Windows. Give it another try with the whole
19622    # argument.
19623    path="$complete"
19624    arguments="EOL"
19625    new_path=`$CYGPATH -u "$path"`
19626    new_path=`$WHICH "$new_path" 2> /dev/null`
19627    # bat and cmd files are not always considered executable in cygwin causing which
19628    # to not find them
19629    if test "x$new_path" = x \
19630        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19631        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19632      new_path=`$CYGPATH -u "$path"`
19633    fi
19634    if test "x$new_path" = x; then
19635      # It's still not found. Now this is an unrecoverable error.
19636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19637$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19638      has_space=`$ECHO "$complete" | $GREP " "`
19639      if test "x$has_space" != x; then
19640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19642      fi
19643      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19644    fi
19645  fi
19646
19647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19650  # "foo.exe" is OK but "foo" is an error.
19651  #
19652  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19653  # It is also a way to make sure we got the proper file name for the real test later on.
19654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19655  if test "x$test_shortpath" = x; then
19656    # Short path failed, file does not exist as specified.
19657    # Try adding .exe or .cmd
19658    if test -f "${new_path}.exe"; then
19659      input_to_shortpath="${new_path}.exe"
19660    elif test -f "${new_path}.cmd"; then
19661      input_to_shortpath="${new_path}.cmd"
19662    else
19663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19664$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19665      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19666$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19667      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19668    fi
19669  else
19670    input_to_shortpath="$new_path"
19671  fi
19672
19673  # Call helper function which possibly converts this using DOS-style short mode.
19674  # If so, the updated path is stored in $new_path.
19675  new_path="$input_to_shortpath"
19676
19677  input_path="$input_to_shortpath"
19678  # Check if we need to convert this using DOS-style short mode. If the path
19679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19680  # take no chances and rewrite it.
19681  # Note: m4 eats our [], so we need to use [ and ] instead.
19682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19683  if test "x$has_forbidden_chars" != x; then
19684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19688      # Going to short mode and back again did indeed matter. Since short mode is
19689      # case insensitive, let's make it lowercase to improve readability.
19690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19691      # Now convert it back to Unix-style (cygpath)
19692      input_path=`$CYGPATH -u "$shortmode_path"`
19693      new_path="$input_path"
19694    fi
19695  fi
19696
19697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19698  if test "x$test_cygdrive_prefix" = x; then
19699    # As a simple fix, exclude /usr/bin since it's not a real path.
19700    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19702      # a path prefixed by /cygdrive for fixpath to work.
19703      new_path="$CYGWIN_ROOT_PATH$input_path"
19704    fi
19705  fi
19706
19707  # remove trailing .exe if any
19708  new_path="${new_path/%.exe/}"
19709
19710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19711
19712  # First separate the path from the arguments. This will split at the first
19713  # space.
19714  complete="$FOUND_MAKE"
19715  path="${complete%% *}"
19716  tmp="$complete EOL"
19717  arguments="${tmp#* }"
19718
19719  # Input might be given as Windows format, start by converting to
19720  # unix format.
19721  new_path="$path"
19722
19723  windows_path="$new_path"
19724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19725    unix_path=`$CYGPATH -u "$windows_path"`
19726    new_path="$unix_path"
19727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19729    new_path="$unix_path"
19730  fi
19731
19732
19733  # Now try to locate executable using which
19734  new_path=`$WHICH "$new_path" 2> /dev/null`
19735
19736  if test "x$new_path" = x; then
19737    # Oops. Which didn't find the executable.
19738    # The splitting of arguments from the executable at a space might have been incorrect,
19739    # since paths with space are more likely in Windows. Give it another try with the whole
19740    # argument.
19741    path="$complete"
19742    arguments="EOL"
19743    new_path="$path"
19744
19745  windows_path="$new_path"
19746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19747    unix_path=`$CYGPATH -u "$windows_path"`
19748    new_path="$unix_path"
19749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19751    new_path="$unix_path"
19752  fi
19753
19754
19755    new_path=`$WHICH "$new_path" 2> /dev/null`
19756    # bat and cmd files are not always considered executable in MSYS causing which
19757    # to not find them
19758    if test "x$new_path" = x \
19759        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19760        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19761      new_path="$path"
19762
19763  windows_path="$new_path"
19764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19765    unix_path=`$CYGPATH -u "$windows_path"`
19766    new_path="$unix_path"
19767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19769    new_path="$unix_path"
19770  fi
19771
19772    fi
19773
19774    if test "x$new_path" = x; then
19775      # It's still not found. Now this is an unrecoverable error.
19776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19777$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19778      has_space=`$ECHO "$complete" | $GREP " "`
19779      if test "x$has_space" != x; then
19780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19782      fi
19783      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19784    fi
19785  fi
19786
19787  # Now new_path has a complete unix path to the binary
19788  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19789    # Keep paths in /bin as-is, but remove trailing .exe if any
19790    new_path="${new_path/%.exe/}"
19791    # Do not save /bin paths to all_fixpath_prefixes!
19792  else
19793    # Not in mixed or Windows style, start by that.
19794    new_path=`cmd //c echo $new_path`
19795
19796  input_path="$new_path"
19797  # Check if we need to convert this using DOS-style short mode. If the path
19798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19799  # take no chances and rewrite it.
19800  # Note: m4 eats our [], so we need to use [ and ] instead.
19801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19802  if test "x$has_forbidden_chars" != x; then
19803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19805  fi
19806
19807    # Output is in $new_path
19808
19809  windows_path="$new_path"
19810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19811    unix_path=`$CYGPATH -u "$windows_path"`
19812    new_path="$unix_path"
19813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19815    new_path="$unix_path"
19816  fi
19817
19818    # remove trailing .exe if any
19819    new_path="${new_path/%.exe/}"
19820
19821    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19822    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19823  fi
19824
19825    else
19826      # We're on a unix platform. Hooray! :)
19827      # First separate the path from the arguments. This will split at the first
19828      # space.
19829      complete="$FOUND_MAKE"
19830      path="${complete%% *}"
19831      tmp="$complete EOL"
19832      arguments="${tmp#* }"
19833
19834      # Cannot rely on the command "which" here since it doesn't always work.
19835      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19836      if test -z "$is_absolute_path"; then
19837        # Path to executable is not absolute. Find it.
19838        IFS_save="$IFS"
19839        IFS=:
19840        for p in $PATH; do
19841          if test -f "$p/$path" && test -x "$p/$path"; then
19842            new_path="$p/$path"
19843            break
19844          fi
19845        done
19846        IFS="$IFS_save"
19847      else
19848        # This is an absolute path, we can use it without further modifications.
19849        new_path="$path"
19850      fi
19851
19852      if test "x$new_path" = x; then
19853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19854$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19855        has_space=`$ECHO "$complete" | $GREP " "`
19856        if test "x$has_space" != x; then
19857          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19858$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19859        fi
19860        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19861      fi
19862    fi
19863
19864    # Now join together the path and the arguments once again
19865    if test "x$arguments" != xEOL; then
19866      new_complete="$new_path ${arguments% *}"
19867    else
19868      new_complete="$new_path"
19869    fi
19870
19871    if test "x$complete" != "x$new_complete"; then
19872      FOUND_MAKE="$new_complete"
19873      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19874$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19875    fi
19876  fi
19877
19878        fi
19879      fi
19880    fi
19881  fi
19882
19883    fi
19884
19885    if test "x$FOUND_MAKE" = x; then
19886      if test "x$TOOLCHAIN_PATH" != x; then
19887        # We have a toolchain path, check that as well before giving up.
19888        OLD_PATH=$PATH
19889        PATH=$TOOLCHAIN_PATH:$PATH
19890        for ac_prog in gmake
19891do
19892  # Extract the first word of "$ac_prog", so it can be a program name with args.
19893set dummy $ac_prog; ac_word=$2
19894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19895$as_echo_n "checking for $ac_word... " >&6; }
19896if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19897  $as_echo_n "(cached) " >&6
19898else
19899  case $CHECK_TOOLSDIR_GMAKE in
19900  [\\/]* | ?:[\\/]*)
19901  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19902  ;;
19903  *)
19904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19905for as_dir in $PATH
19906do
19907  IFS=$as_save_IFS
19908  test -z "$as_dir" && as_dir=.
19909    for ac_exec_ext in '' $ac_executable_extensions; do
19910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19911    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19913    break 2
19914  fi
19915done
19916  done
19917IFS=$as_save_IFS
19918
19919  ;;
19920esac
19921fi
19922CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19923if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19925$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19926else
19927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19928$as_echo "no" >&6; }
19929fi
19930
19931
19932  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19933done
19934
19935
19936  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19937  DESCRIPTION="gmake in tools-dir"
19938
19939  # On Cygwin, we require a newer version of make than on other platforms
19940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19941    MAKE_VERSION_EXPR="-e 4\."
19942    MAKE_REQUIRED_VERSION="4.0"
19943   else
19944    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19945    MAKE_REQUIRED_VERSION="3.81"
19946  fi
19947
19948  if test "x$MAKE_CANDIDATE" != x; then
19949    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19950$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19951    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19952    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19953    if test "x$IS_GNU_MAKE" = x; then
19954      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19955$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19956    else
19957      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19958      if test "x$IS_MODERN_MAKE" = x; then
19959        { $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
19960$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;}
19961      else
19962        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19963          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19964            MAKE_EXPECTED_ENV='cygwin'
19965          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19966            MAKE_EXPECTED_ENV='msys'
19967          else
19968            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19969          fi
19970          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19971          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19972        else
19973          # Not relevant for non-Windows
19974          IS_MAKE_CORRECT_ENV=true
19975        fi
19976        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19977          { $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
19978$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;}
19979        else
19980          FOUND_MAKE=$MAKE_CANDIDATE
19981
19982  # Only process if variable expands to non-empty
19983
19984  if test "x$FOUND_MAKE" != x; then
19985    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19986
19987  # First separate the path from the arguments. This will split at the first
19988  # space.
19989  complete="$FOUND_MAKE"
19990  path="${complete%% *}"
19991  tmp="$complete EOL"
19992  arguments="${tmp#* }"
19993
19994  # Input might be given as Windows format, start by converting to
19995  # unix format.
19996  new_path=`$CYGPATH -u "$path"`
19997
19998  # Now try to locate executable using which
19999  new_path=`$WHICH "$new_path" 2> /dev/null`
20000  # bat and cmd files are not always considered executable in cygwin causing which
20001  # to not find them
20002  if test "x$new_path" = x \
20003      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20004      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20005    new_path=`$CYGPATH -u "$path"`
20006  fi
20007  if test "x$new_path" = x; then
20008    # Oops. Which didn't find the executable.
20009    # The splitting of arguments from the executable at a space might have been incorrect,
20010    # since paths with space are more likely in Windows. Give it another try with the whole
20011    # argument.
20012    path="$complete"
20013    arguments="EOL"
20014    new_path=`$CYGPATH -u "$path"`
20015    new_path=`$WHICH "$new_path" 2> /dev/null`
20016    # bat and cmd files are not always considered executable in cygwin causing which
20017    # to not find them
20018    if test "x$new_path" = x \
20019        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20020        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20021      new_path=`$CYGPATH -u "$path"`
20022    fi
20023    if test "x$new_path" = x; then
20024      # It's still not found. Now this is an unrecoverable error.
20025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20026$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20027      has_space=`$ECHO "$complete" | $GREP " "`
20028      if test "x$has_space" != x; then
20029        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20030$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20031      fi
20032      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20033    fi
20034  fi
20035
20036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20039  # "foo.exe" is OK but "foo" is an error.
20040  #
20041  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20042  # It is also a way to make sure we got the proper file name for the real test later on.
20043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20044  if test "x$test_shortpath" = x; then
20045    # Short path failed, file does not exist as specified.
20046    # Try adding .exe or .cmd
20047    if test -f "${new_path}.exe"; then
20048      input_to_shortpath="${new_path}.exe"
20049    elif test -f "${new_path}.cmd"; then
20050      input_to_shortpath="${new_path}.cmd"
20051    else
20052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20053$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20054      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20055$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20056      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20057    fi
20058  else
20059    input_to_shortpath="$new_path"
20060  fi
20061
20062  # Call helper function which possibly converts this using DOS-style short mode.
20063  # If so, the updated path is stored in $new_path.
20064  new_path="$input_to_shortpath"
20065
20066  input_path="$input_to_shortpath"
20067  # Check if we need to convert this using DOS-style short mode. If the path
20068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20069  # take no chances and rewrite it.
20070  # Note: m4 eats our [], so we need to use [ and ] instead.
20071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20072  if test "x$has_forbidden_chars" != x; then
20073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20077      # Going to short mode and back again did indeed matter. Since short mode is
20078      # case insensitive, let's make it lowercase to improve readability.
20079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20080      # Now convert it back to Unix-style (cygpath)
20081      input_path=`$CYGPATH -u "$shortmode_path"`
20082      new_path="$input_path"
20083    fi
20084  fi
20085
20086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20087  if test "x$test_cygdrive_prefix" = x; then
20088    # As a simple fix, exclude /usr/bin since it's not a real path.
20089    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20091      # a path prefixed by /cygdrive for fixpath to work.
20092      new_path="$CYGWIN_ROOT_PATH$input_path"
20093    fi
20094  fi
20095
20096  # remove trailing .exe if any
20097  new_path="${new_path/%.exe/}"
20098
20099    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20100
20101  # First separate the path from the arguments. This will split at the first
20102  # space.
20103  complete="$FOUND_MAKE"
20104  path="${complete%% *}"
20105  tmp="$complete EOL"
20106  arguments="${tmp#* }"
20107
20108  # Input might be given as Windows format, start by converting to
20109  # unix format.
20110  new_path="$path"
20111
20112  windows_path="$new_path"
20113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20114    unix_path=`$CYGPATH -u "$windows_path"`
20115    new_path="$unix_path"
20116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20118    new_path="$unix_path"
20119  fi
20120
20121
20122  # Now try to locate executable using which
20123  new_path=`$WHICH "$new_path" 2> /dev/null`
20124
20125  if test "x$new_path" = x; then
20126    # Oops. Which didn't find the executable.
20127    # The splitting of arguments from the executable at a space might have been incorrect,
20128    # since paths with space are more likely in Windows. Give it another try with the whole
20129    # argument.
20130    path="$complete"
20131    arguments="EOL"
20132    new_path="$path"
20133
20134  windows_path="$new_path"
20135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20136    unix_path=`$CYGPATH -u "$windows_path"`
20137    new_path="$unix_path"
20138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20140    new_path="$unix_path"
20141  fi
20142
20143
20144    new_path=`$WHICH "$new_path" 2> /dev/null`
20145    # bat and cmd files are not always considered executable in MSYS causing which
20146    # to not find them
20147    if test "x$new_path" = x \
20148        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20149        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20150      new_path="$path"
20151
20152  windows_path="$new_path"
20153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20154    unix_path=`$CYGPATH -u "$windows_path"`
20155    new_path="$unix_path"
20156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20158    new_path="$unix_path"
20159  fi
20160
20161    fi
20162
20163    if test "x$new_path" = x; then
20164      # It's still not found. Now this is an unrecoverable error.
20165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20166$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20167      has_space=`$ECHO "$complete" | $GREP " "`
20168      if test "x$has_space" != x; then
20169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20171      fi
20172      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20173    fi
20174  fi
20175
20176  # Now new_path has a complete unix path to the binary
20177  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20178    # Keep paths in /bin as-is, but remove trailing .exe if any
20179    new_path="${new_path/%.exe/}"
20180    # Do not save /bin paths to all_fixpath_prefixes!
20181  else
20182    # Not in mixed or Windows style, start by that.
20183    new_path=`cmd //c echo $new_path`
20184
20185  input_path="$new_path"
20186  # Check if we need to convert this using DOS-style short mode. If the path
20187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20188  # take no chances and rewrite it.
20189  # Note: m4 eats our [], so we need to use [ and ] instead.
20190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20191  if test "x$has_forbidden_chars" != x; then
20192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20194  fi
20195
20196    # Output is in $new_path
20197
20198  windows_path="$new_path"
20199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20200    unix_path=`$CYGPATH -u "$windows_path"`
20201    new_path="$unix_path"
20202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20204    new_path="$unix_path"
20205  fi
20206
20207    # remove trailing .exe if any
20208    new_path="${new_path/%.exe/}"
20209
20210    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20211    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20212  fi
20213
20214    else
20215      # We're on a unix platform. Hooray! :)
20216      # First separate the path from the arguments. This will split at the first
20217      # space.
20218      complete="$FOUND_MAKE"
20219      path="${complete%% *}"
20220      tmp="$complete EOL"
20221      arguments="${tmp#* }"
20222
20223      # Cannot rely on the command "which" here since it doesn't always work.
20224      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20225      if test -z "$is_absolute_path"; then
20226        # Path to executable is not absolute. Find it.
20227        IFS_save="$IFS"
20228        IFS=:
20229        for p in $PATH; do
20230          if test -f "$p/$path" && test -x "$p/$path"; then
20231            new_path="$p/$path"
20232            break
20233          fi
20234        done
20235        IFS="$IFS_save"
20236      else
20237        # This is an absolute path, we can use it without further modifications.
20238        new_path="$path"
20239      fi
20240
20241      if test "x$new_path" = x; then
20242        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20243$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20244        has_space=`$ECHO "$complete" | $GREP " "`
20245        if test "x$has_space" != x; then
20246          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20247$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20248        fi
20249        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20250      fi
20251    fi
20252
20253    # Now join together the path and the arguments once again
20254    if test "x$arguments" != xEOL; then
20255      new_complete="$new_path ${arguments% *}"
20256    else
20257      new_complete="$new_path"
20258    fi
20259
20260    if test "x$complete" != "x$new_complete"; then
20261      FOUND_MAKE="$new_complete"
20262      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20263$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20264    fi
20265  fi
20266
20267        fi
20268      fi
20269    fi
20270  fi
20271
20272        if test "x$FOUND_MAKE" = x; then
20273          for ac_prog in make
20274do
20275  # Extract the first word of "$ac_prog", so it can be a program name with args.
20276set dummy $ac_prog; ac_word=$2
20277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20278$as_echo_n "checking for $ac_word... " >&6; }
20279if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20280  $as_echo_n "(cached) " >&6
20281else
20282  case $CHECK_TOOLSDIR_MAKE in
20283  [\\/]* | ?:[\\/]*)
20284  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20285  ;;
20286  *)
20287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20288for as_dir in $PATH
20289do
20290  IFS=$as_save_IFS
20291  test -z "$as_dir" && as_dir=.
20292    for ac_exec_ext in '' $ac_executable_extensions; do
20293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20294    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20296    break 2
20297  fi
20298done
20299  done
20300IFS=$as_save_IFS
20301
20302  ;;
20303esac
20304fi
20305CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20306if test -n "$CHECK_TOOLSDIR_MAKE"; then
20307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20308$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20309else
20310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20311$as_echo "no" >&6; }
20312fi
20313
20314
20315  test -n "$CHECK_TOOLSDIR_MAKE" && break
20316done
20317
20318
20319  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20320  DESCRIPTION="make in tools-dir"
20321
20322  # On Cygwin, we require a newer version of make than on other platforms
20323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20324    MAKE_VERSION_EXPR="-e 4\."
20325    MAKE_REQUIRED_VERSION="4.0"
20326   else
20327    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20328    MAKE_REQUIRED_VERSION="3.81"
20329  fi
20330
20331  if test "x$MAKE_CANDIDATE" != x; then
20332    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20333$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20334    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20335    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20336    if test "x$IS_GNU_MAKE" = x; then
20337      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20338$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20339    else
20340      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20341      if test "x$IS_MODERN_MAKE" = x; then
20342        { $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
20343$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;}
20344      else
20345        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20346          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20347            MAKE_EXPECTED_ENV='cygwin'
20348          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20349            MAKE_EXPECTED_ENV='msys'
20350          else
20351            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20352          fi
20353          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20354          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20355        else
20356          # Not relevant for non-Windows
20357          IS_MAKE_CORRECT_ENV=true
20358        fi
20359        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20360          { $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
20361$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;}
20362        else
20363          FOUND_MAKE=$MAKE_CANDIDATE
20364
20365  # Only process if variable expands to non-empty
20366
20367  if test "x$FOUND_MAKE" != x; then
20368    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20369
20370  # First separate the path from the arguments. This will split at the first
20371  # space.
20372  complete="$FOUND_MAKE"
20373  path="${complete%% *}"
20374  tmp="$complete EOL"
20375  arguments="${tmp#* }"
20376
20377  # Input might be given as Windows format, start by converting to
20378  # unix format.
20379  new_path=`$CYGPATH -u "$path"`
20380
20381  # Now try to locate executable using which
20382  new_path=`$WHICH "$new_path" 2> /dev/null`
20383  # bat and cmd files are not always considered executable in cygwin causing which
20384  # to not find them
20385  if test "x$new_path" = x \
20386      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20387      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20388    new_path=`$CYGPATH -u "$path"`
20389  fi
20390  if test "x$new_path" = x; then
20391    # Oops. Which didn't find the executable.
20392    # The splitting of arguments from the executable at a space might have been incorrect,
20393    # since paths with space are more likely in Windows. Give it another try with the whole
20394    # argument.
20395    path="$complete"
20396    arguments="EOL"
20397    new_path=`$CYGPATH -u "$path"`
20398    new_path=`$WHICH "$new_path" 2> /dev/null`
20399    # bat and cmd files are not always considered executable in cygwin causing which
20400    # to not find them
20401    if test "x$new_path" = x \
20402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20404      new_path=`$CYGPATH -u "$path"`
20405    fi
20406    if test "x$new_path" = x; then
20407      # It's still not found. Now this is an unrecoverable error.
20408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20409$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20410      has_space=`$ECHO "$complete" | $GREP " "`
20411      if test "x$has_space" != x; then
20412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20414      fi
20415      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20416    fi
20417  fi
20418
20419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20422  # "foo.exe" is OK but "foo" is an error.
20423  #
20424  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20425  # It is also a way to make sure we got the proper file name for the real test later on.
20426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20427  if test "x$test_shortpath" = x; then
20428    # Short path failed, file does not exist as specified.
20429    # Try adding .exe or .cmd
20430    if test -f "${new_path}.exe"; then
20431      input_to_shortpath="${new_path}.exe"
20432    elif test -f "${new_path}.cmd"; then
20433      input_to_shortpath="${new_path}.cmd"
20434    else
20435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20436$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20437      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20438$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20439      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20440    fi
20441  else
20442    input_to_shortpath="$new_path"
20443  fi
20444
20445  # Call helper function which possibly converts this using DOS-style short mode.
20446  # If so, the updated path is stored in $new_path.
20447  new_path="$input_to_shortpath"
20448
20449  input_path="$input_to_shortpath"
20450  # Check if we need to convert this using DOS-style short mode. If the path
20451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20452  # take no chances and rewrite it.
20453  # Note: m4 eats our [], so we need to use [ and ] instead.
20454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20455  if test "x$has_forbidden_chars" != x; then
20456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20460      # Going to short mode and back again did indeed matter. Since short mode is
20461      # case insensitive, let's make it lowercase to improve readability.
20462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20463      # Now convert it back to Unix-style (cygpath)
20464      input_path=`$CYGPATH -u "$shortmode_path"`
20465      new_path="$input_path"
20466    fi
20467  fi
20468
20469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20470  if test "x$test_cygdrive_prefix" = x; then
20471    # As a simple fix, exclude /usr/bin since it's not a real path.
20472    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20474      # a path prefixed by /cygdrive for fixpath to work.
20475      new_path="$CYGWIN_ROOT_PATH$input_path"
20476    fi
20477  fi
20478
20479  # remove trailing .exe if any
20480  new_path="${new_path/%.exe/}"
20481
20482    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20483
20484  # First separate the path from the arguments. This will split at the first
20485  # space.
20486  complete="$FOUND_MAKE"
20487  path="${complete%% *}"
20488  tmp="$complete EOL"
20489  arguments="${tmp#* }"
20490
20491  # Input might be given as Windows format, start by converting to
20492  # unix format.
20493  new_path="$path"
20494
20495  windows_path="$new_path"
20496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20497    unix_path=`$CYGPATH -u "$windows_path"`
20498    new_path="$unix_path"
20499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20501    new_path="$unix_path"
20502  fi
20503
20504
20505  # Now try to locate executable using which
20506  new_path=`$WHICH "$new_path" 2> /dev/null`
20507
20508  if test "x$new_path" = x; then
20509    # Oops. Which didn't find the executable.
20510    # The splitting of arguments from the executable at a space might have been incorrect,
20511    # since paths with space are more likely in Windows. Give it another try with the whole
20512    # argument.
20513    path="$complete"
20514    arguments="EOL"
20515    new_path="$path"
20516
20517  windows_path="$new_path"
20518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20519    unix_path=`$CYGPATH -u "$windows_path"`
20520    new_path="$unix_path"
20521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20523    new_path="$unix_path"
20524  fi
20525
20526
20527    new_path=`$WHICH "$new_path" 2> /dev/null`
20528    # bat and cmd files are not always considered executable in MSYS causing which
20529    # to not find them
20530    if test "x$new_path" = x \
20531        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20532        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20533      new_path="$path"
20534
20535  windows_path="$new_path"
20536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20537    unix_path=`$CYGPATH -u "$windows_path"`
20538    new_path="$unix_path"
20539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20541    new_path="$unix_path"
20542  fi
20543
20544    fi
20545
20546    if test "x$new_path" = x; then
20547      # It's still not found. Now this is an unrecoverable error.
20548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20549$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20550      has_space=`$ECHO "$complete" | $GREP " "`
20551      if test "x$has_space" != x; then
20552        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20553$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20554      fi
20555      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20556    fi
20557  fi
20558
20559  # Now new_path has a complete unix path to the binary
20560  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20561    # Keep paths in /bin as-is, but remove trailing .exe if any
20562    new_path="${new_path/%.exe/}"
20563    # Do not save /bin paths to all_fixpath_prefixes!
20564  else
20565    # Not in mixed or Windows style, start by that.
20566    new_path=`cmd //c echo $new_path`
20567
20568  input_path="$new_path"
20569  # Check if we need to convert this using DOS-style short mode. If the path
20570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20571  # take no chances and rewrite it.
20572  # Note: m4 eats our [], so we need to use [ and ] instead.
20573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20574  if test "x$has_forbidden_chars" != x; then
20575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20576    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20577  fi
20578
20579    # Output is in $new_path
20580
20581  windows_path="$new_path"
20582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20583    unix_path=`$CYGPATH -u "$windows_path"`
20584    new_path="$unix_path"
20585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20587    new_path="$unix_path"
20588  fi
20589
20590    # remove trailing .exe if any
20591    new_path="${new_path/%.exe/}"
20592
20593    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20594    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20595  fi
20596
20597    else
20598      # We're on a unix platform. Hooray! :)
20599      # First separate the path from the arguments. This will split at the first
20600      # space.
20601      complete="$FOUND_MAKE"
20602      path="${complete%% *}"
20603      tmp="$complete EOL"
20604      arguments="${tmp#* }"
20605
20606      # Cannot rely on the command "which" here since it doesn't always work.
20607      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20608      if test -z "$is_absolute_path"; then
20609        # Path to executable is not absolute. Find it.
20610        IFS_save="$IFS"
20611        IFS=:
20612        for p in $PATH; do
20613          if test -f "$p/$path" && test -x "$p/$path"; then
20614            new_path="$p/$path"
20615            break
20616          fi
20617        done
20618        IFS="$IFS_save"
20619      else
20620        # This is an absolute path, we can use it without further modifications.
20621        new_path="$path"
20622      fi
20623
20624      if test "x$new_path" = x; then
20625        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20626$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20627        has_space=`$ECHO "$complete" | $GREP " "`
20628        if test "x$has_space" != x; then
20629          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20630$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20631        fi
20632        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20633      fi
20634    fi
20635
20636    # Now join together the path and the arguments once again
20637    if test "x$arguments" != xEOL; then
20638      new_complete="$new_path ${arguments% *}"
20639    else
20640      new_complete="$new_path"
20641    fi
20642
20643    if test "x$complete" != "x$new_complete"; then
20644      FOUND_MAKE="$new_complete"
20645      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20646$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20647    fi
20648  fi
20649
20650        fi
20651      fi
20652    fi
20653  fi
20654
20655        fi
20656        PATH=$OLD_PATH
20657      fi
20658    fi
20659
20660    if test "x$FOUND_MAKE" = x; then
20661      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
20662    fi
20663
20664    else
20665      # If it succeeded, then it was overridden by the user. We will use it
20666      # for the tool.
20667
20668      # First remove it from the list of overridden variables, so we can test
20669      # for unknown variables in the end.
20670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20671
20672      # Check if we try to supply an empty value
20673      if test "x$MAKE" = x; then
20674        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20675$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20677$as_echo_n "checking for MAKE... " >&6; }
20678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20679$as_echo "disabled" >&6; }
20680      else
20681        # Check if the provided tool contains a complete path.
20682        tool_specified="$MAKE"
20683        tool_basename="${tool_specified##*/}"
20684        if test "x$tool_basename" = "x$tool_specified"; then
20685          # A command without a complete path is provided, search $PATH.
20686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20687$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20688          # Extract the first word of "$tool_basename", so it can be a program name with args.
20689set dummy $tool_basename; ac_word=$2
20690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20691$as_echo_n "checking for $ac_word... " >&6; }
20692if ${ac_cv_path_MAKE+:} false; then :
20693  $as_echo_n "(cached) " >&6
20694else
20695  case $MAKE in
20696  [\\/]* | ?:[\\/]*)
20697  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20698  ;;
20699  *)
20700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20701for as_dir in $PATH
20702do
20703  IFS=$as_save_IFS
20704  test -z "$as_dir" && as_dir=.
20705    for ac_exec_ext in '' $ac_executable_extensions; do
20706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20707    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20709    break 2
20710  fi
20711done
20712  done
20713IFS=$as_save_IFS
20714
20715  ;;
20716esac
20717fi
20718MAKE=$ac_cv_path_MAKE
20719if test -n "$MAKE"; then
20720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20721$as_echo "$MAKE" >&6; }
20722else
20723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20724$as_echo "no" >&6; }
20725fi
20726
20727
20728          if test "x$MAKE" = x; then
20729            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20730          fi
20731        else
20732          # Otherwise we believe it is a complete path. Use it as it is.
20733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20734$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20735          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20736$as_echo_n "checking for MAKE... " >&6; }
20737          if test ! -x "$tool_specified"; then
20738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20739$as_echo "not found" >&6; }
20740            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20741          fi
20742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20743$as_echo "$tool_specified" >&6; }
20744        fi
20745      fi
20746    fi
20747
20748    # If MAKE was set by user, verify the version
20749
20750  MAKE_CANDIDATE=""$MAKE""
20751  DESCRIPTION="user supplied MAKE=$MAKE"
20752
20753  # On Cygwin, we require a newer version of make than on other platforms
20754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20755    MAKE_VERSION_EXPR="-e 4\."
20756    MAKE_REQUIRED_VERSION="4.0"
20757   else
20758    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20759    MAKE_REQUIRED_VERSION="3.81"
20760  fi
20761
20762  if test "x$MAKE_CANDIDATE" != x; then
20763    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20764$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20765    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20766    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20767    if test "x$IS_GNU_MAKE" = x; then
20768      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20769$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20770    else
20771      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20772      if test "x$IS_MODERN_MAKE" = x; then
20773        { $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
20774$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;}
20775      else
20776        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20777          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20778            MAKE_EXPECTED_ENV='cygwin'
20779          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20780            MAKE_EXPECTED_ENV='msys'
20781          else
20782            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20783          fi
20784          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20785          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20786        else
20787          # Not relevant for non-Windows
20788          IS_MAKE_CORRECT_ENV=true
20789        fi
20790        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20791          { $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
20792$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;}
20793        else
20794          FOUND_MAKE=$MAKE_CANDIDATE
20795
20796  # Only process if variable expands to non-empty
20797
20798  if test "x$FOUND_MAKE" != x; then
20799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20800
20801  # First separate the path from the arguments. This will split at the first
20802  # space.
20803  complete="$FOUND_MAKE"
20804  path="${complete%% *}"
20805  tmp="$complete EOL"
20806  arguments="${tmp#* }"
20807
20808  # Input might be given as Windows format, start by converting to
20809  # unix format.
20810  new_path=`$CYGPATH -u "$path"`
20811
20812  # Now try to locate executable using which
20813  new_path=`$WHICH "$new_path" 2> /dev/null`
20814  # bat and cmd files are not always considered executable in cygwin causing which
20815  # to not find them
20816  if test "x$new_path" = x \
20817      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20818      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20819    new_path=`$CYGPATH -u "$path"`
20820  fi
20821  if test "x$new_path" = x; then
20822    # Oops. Which didn't find the executable.
20823    # The splitting of arguments from the executable at a space might have been incorrect,
20824    # since paths with space are more likely in Windows. Give it another try with the whole
20825    # argument.
20826    path="$complete"
20827    arguments="EOL"
20828    new_path=`$CYGPATH -u "$path"`
20829    new_path=`$WHICH "$new_path" 2> /dev/null`
20830    # bat and cmd files are not always considered executable in cygwin causing which
20831    # to not find them
20832    if test "x$new_path" = x \
20833        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20834        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20835      new_path=`$CYGPATH -u "$path"`
20836    fi
20837    if test "x$new_path" = x; then
20838      # It's still not found. Now this is an unrecoverable error.
20839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20840$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20841      has_space=`$ECHO "$complete" | $GREP " "`
20842      if test "x$has_space" != x; then
20843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20845      fi
20846      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20847    fi
20848  fi
20849
20850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20853  # "foo.exe" is OK but "foo" is an error.
20854  #
20855  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20856  # It is also a way to make sure we got the proper file name for the real test later on.
20857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20858  if test "x$test_shortpath" = x; then
20859    # Short path failed, file does not exist as specified.
20860    # Try adding .exe or .cmd
20861    if test -f "${new_path}.exe"; then
20862      input_to_shortpath="${new_path}.exe"
20863    elif test -f "${new_path}.cmd"; then
20864      input_to_shortpath="${new_path}.cmd"
20865    else
20866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20867$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20868      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20869$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20870      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20871    fi
20872  else
20873    input_to_shortpath="$new_path"
20874  fi
20875
20876  # Call helper function which possibly converts this using DOS-style short mode.
20877  # If so, the updated path is stored in $new_path.
20878  new_path="$input_to_shortpath"
20879
20880  input_path="$input_to_shortpath"
20881  # Check if we need to convert this using DOS-style short mode. If the path
20882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20883  # take no chances and rewrite it.
20884  # Note: m4 eats our [], so we need to use [ and ] instead.
20885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20886  if test "x$has_forbidden_chars" != x; then
20887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20891      # Going to short mode and back again did indeed matter. Since short mode is
20892      # case insensitive, let's make it lowercase to improve readability.
20893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20894      # Now convert it back to Unix-style (cygpath)
20895      input_path=`$CYGPATH -u "$shortmode_path"`
20896      new_path="$input_path"
20897    fi
20898  fi
20899
20900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20901  if test "x$test_cygdrive_prefix" = x; then
20902    # As a simple fix, exclude /usr/bin since it's not a real path.
20903    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20905      # a path prefixed by /cygdrive for fixpath to work.
20906      new_path="$CYGWIN_ROOT_PATH$input_path"
20907    fi
20908  fi
20909
20910  # remove trailing .exe if any
20911  new_path="${new_path/%.exe/}"
20912
20913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20914
20915  # First separate the path from the arguments. This will split at the first
20916  # space.
20917  complete="$FOUND_MAKE"
20918  path="${complete%% *}"
20919  tmp="$complete EOL"
20920  arguments="${tmp#* }"
20921
20922  # Input might be given as Windows format, start by converting to
20923  # unix format.
20924  new_path="$path"
20925
20926  windows_path="$new_path"
20927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20928    unix_path=`$CYGPATH -u "$windows_path"`
20929    new_path="$unix_path"
20930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20932    new_path="$unix_path"
20933  fi
20934
20935
20936  # Now try to locate executable using which
20937  new_path=`$WHICH "$new_path" 2> /dev/null`
20938
20939  if test "x$new_path" = x; then
20940    # Oops. Which didn't find the executable.
20941    # The splitting of arguments from the executable at a space might have been incorrect,
20942    # since paths with space are more likely in Windows. Give it another try with the whole
20943    # argument.
20944    path="$complete"
20945    arguments="EOL"
20946    new_path="$path"
20947
20948  windows_path="$new_path"
20949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20950    unix_path=`$CYGPATH -u "$windows_path"`
20951    new_path="$unix_path"
20952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20954    new_path="$unix_path"
20955  fi
20956
20957
20958    new_path=`$WHICH "$new_path" 2> /dev/null`
20959    # bat and cmd files are not always considered executable in MSYS causing which
20960    # to not find them
20961    if test "x$new_path" = x \
20962        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20963        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20964      new_path="$path"
20965
20966  windows_path="$new_path"
20967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20968    unix_path=`$CYGPATH -u "$windows_path"`
20969    new_path="$unix_path"
20970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20972    new_path="$unix_path"
20973  fi
20974
20975    fi
20976
20977    if test "x$new_path" = x; then
20978      # It's still not found. Now this is an unrecoverable error.
20979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20980$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20981      has_space=`$ECHO "$complete" | $GREP " "`
20982      if test "x$has_space" != x; then
20983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20985      fi
20986      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20987    fi
20988  fi
20989
20990  # Now new_path has a complete unix path to the binary
20991  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20992    # Keep paths in /bin as-is, but remove trailing .exe if any
20993    new_path="${new_path/%.exe/}"
20994    # Do not save /bin paths to all_fixpath_prefixes!
20995  else
20996    # Not in mixed or Windows style, start by that.
20997    new_path=`cmd //c echo $new_path`
20998
20999  input_path="$new_path"
21000  # Check if we need to convert this using DOS-style short mode. If the path
21001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21002  # take no chances and rewrite it.
21003  # Note: m4 eats our [], so we need to use [ and ] instead.
21004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21005  if test "x$has_forbidden_chars" != x; then
21006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21008  fi
21009
21010    # Output is in $new_path
21011
21012  windows_path="$new_path"
21013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21014    unix_path=`$CYGPATH -u "$windows_path"`
21015    new_path="$unix_path"
21016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21018    new_path="$unix_path"
21019  fi
21020
21021    # remove trailing .exe if any
21022    new_path="${new_path/%.exe/}"
21023
21024    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21025    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21026  fi
21027
21028    else
21029      # We're on a unix platform. Hooray! :)
21030      # First separate the path from the arguments. This will split at the first
21031      # space.
21032      complete="$FOUND_MAKE"
21033      path="${complete%% *}"
21034      tmp="$complete EOL"
21035      arguments="${tmp#* }"
21036
21037      # Cannot rely on the command "which" here since it doesn't always work.
21038      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21039      if test -z "$is_absolute_path"; then
21040        # Path to executable is not absolute. Find it.
21041        IFS_save="$IFS"
21042        IFS=:
21043        for p in $PATH; do
21044          if test -f "$p/$path" && test -x "$p/$path"; then
21045            new_path="$p/$path"
21046            break
21047          fi
21048        done
21049        IFS="$IFS_save"
21050      else
21051        # This is an absolute path, we can use it without further modifications.
21052        new_path="$path"
21053      fi
21054
21055      if test "x$new_path" = x; then
21056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21057$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21058        has_space=`$ECHO "$complete" | $GREP " "`
21059        if test "x$has_space" != x; then
21060          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21061$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21062        fi
21063        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21064      fi
21065    fi
21066
21067    # Now join together the path and the arguments once again
21068    if test "x$arguments" != xEOL; then
21069      new_complete="$new_path ${arguments% *}"
21070    else
21071      new_complete="$new_path"
21072    fi
21073
21074    if test "x$complete" != "x$new_complete"; then
21075      FOUND_MAKE="$new_complete"
21076      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21077$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21078    fi
21079  fi
21080
21081        fi
21082      fi
21083    fi
21084  fi
21085
21086    if test "x$FOUND_MAKE" = x; then
21087      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21088    fi
21089
21090  fi
21091
21092
21093  MAKE=$FOUND_MAKE
21094
21095  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21096$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21097
21098
21099  # Check if make supports the output sync option and if so, setup using it.
21100  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21101$as_echo_n "checking if make --output-sync is supported... " >&6; }
21102  if $MAKE --version -O > /dev/null 2>&1; then
21103    OUTPUT_SYNC_SUPPORTED=true
21104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21105$as_echo "yes" >&6; }
21106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21107$as_echo_n "checking for output-sync value... " >&6; }
21108
21109# Check whether --with-output-sync was given.
21110if test "${with_output_sync+set}" = set; then :
21111  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21112fi
21113
21114    if test "x$OUTPUT_SYNC" = "x"; then
21115      OUTPUT_SYNC=none
21116    fi
21117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21118$as_echo "$OUTPUT_SYNC" >&6; }
21119    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21120      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21121    fi
21122  else
21123    OUTPUT_SYNC_SUPPORTED=false
21124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21125$as_echo "no" >&6; }
21126  fi
21127
21128
21129
21130
21131
21132
21133  # Test if find supports -delete
21134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21135$as_echo_n "checking if find supports -delete... " >&6; }
21136  FIND_DELETE="-delete"
21137
21138  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21139
21140  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21141
21142  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21143  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21144    # No, it does not.
21145    rm $DELETEDIR/TestIfFindSupportsDelete
21146    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21147      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21148      FIND_DELETE="-print | xargs rm"
21149    else
21150      FIND_DELETE="-exec rm \{\} \+"
21151    fi
21152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21153$as_echo "no" >&6; }
21154  else
21155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21156$as_echo "yes" >&6; }
21157  fi
21158  rmdir $DELETEDIR
21159
21160
21161
21162  # Test which kind of tar was found
21163  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21164    TAR_TYPE="gnu"
21165  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21166    TAR_TYPE="bsd"
21167  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21168    TAR_TYPE="solaris"
21169  fi
21170  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21171$as_echo_n "checking what type of tar was found... " >&6; }
21172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21173$as_echo "$TAR_TYPE" >&6; }
21174
21175  if test "x$TAR_TYPE" = "xgnu"; then
21176    TAR_INCLUDE_PARAM="T"
21177    TAR_SUPPORTS_TRANSFORM="true"
21178  else
21179    TAR_INCLUDE_PARAM="I"
21180    TAR_SUPPORTS_TRANSFORM="false"
21181  fi
21182
21183
21184
21185
21186  # These tools might not be installed by default,
21187  # need hint on how to install them.
21188
21189
21190
21191  # Publish this variable in the help.
21192
21193
21194  if [ -z "${UNZIP+x}" ]; then
21195    # The variable is not set by user, try to locate tool using the code snippet
21196    for ac_prog in unzip
21197do
21198  # Extract the first word of "$ac_prog", so it can be a program name with args.
21199set dummy $ac_prog; ac_word=$2
21200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21201$as_echo_n "checking for $ac_word... " >&6; }
21202if ${ac_cv_path_UNZIP+:} false; then :
21203  $as_echo_n "(cached) " >&6
21204else
21205  case $UNZIP in
21206  [\\/]* | ?:[\\/]*)
21207  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21208  ;;
21209  *)
21210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21211for as_dir in $PATH
21212do
21213  IFS=$as_save_IFS
21214  test -z "$as_dir" && as_dir=.
21215    for ac_exec_ext in '' $ac_executable_extensions; do
21216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21217    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21219    break 2
21220  fi
21221done
21222  done
21223IFS=$as_save_IFS
21224
21225  ;;
21226esac
21227fi
21228UNZIP=$ac_cv_path_UNZIP
21229if test -n "$UNZIP"; then
21230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21231$as_echo "$UNZIP" >&6; }
21232else
21233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21234$as_echo "no" >&6; }
21235fi
21236
21237
21238  test -n "$UNZIP" && break
21239done
21240
21241  else
21242    # The variable is set, but is it from the command line or the environment?
21243
21244    # Try to remove the string !UNZIP! from our list.
21245    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21246    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21247      # If it failed, the variable was not from the command line. Ignore it,
21248      # but warn the user (except for BASH, which is always set by the calling BASH).
21249      if test "xUNZIP" != xBASH; then
21250        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21251$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21252      fi
21253      # Try to locate tool using the code snippet
21254      for ac_prog in unzip
21255do
21256  # Extract the first word of "$ac_prog", so it can be a program name with args.
21257set dummy $ac_prog; ac_word=$2
21258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21259$as_echo_n "checking for $ac_word... " >&6; }
21260if ${ac_cv_path_UNZIP+:} false; then :
21261  $as_echo_n "(cached) " >&6
21262else
21263  case $UNZIP in
21264  [\\/]* | ?:[\\/]*)
21265  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21266  ;;
21267  *)
21268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21269for as_dir in $PATH
21270do
21271  IFS=$as_save_IFS
21272  test -z "$as_dir" && as_dir=.
21273    for ac_exec_ext in '' $ac_executable_extensions; do
21274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21275    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21277    break 2
21278  fi
21279done
21280  done
21281IFS=$as_save_IFS
21282
21283  ;;
21284esac
21285fi
21286UNZIP=$ac_cv_path_UNZIP
21287if test -n "$UNZIP"; then
21288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21289$as_echo "$UNZIP" >&6; }
21290else
21291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21292$as_echo "no" >&6; }
21293fi
21294
21295
21296  test -n "$UNZIP" && break
21297done
21298
21299    else
21300      # If it succeeded, then it was overridden by the user. We will use it
21301      # for the tool.
21302
21303      # First remove it from the list of overridden variables, so we can test
21304      # for unknown variables in the end.
21305      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21306
21307      # Check if we try to supply an empty value
21308      if test "x$UNZIP" = x; then
21309        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21310$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21311        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21312$as_echo_n "checking for UNZIP... " >&6; }
21313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21314$as_echo "disabled" >&6; }
21315      else
21316        # Check if the provided tool contains a complete path.
21317        tool_specified="$UNZIP"
21318        tool_basename="${tool_specified##*/}"
21319        if test "x$tool_basename" = "x$tool_specified"; then
21320          # A command without a complete path is provided, search $PATH.
21321          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21322$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21323          # Extract the first word of "$tool_basename", so it can be a program name with args.
21324set dummy $tool_basename; ac_word=$2
21325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21326$as_echo_n "checking for $ac_word... " >&6; }
21327if ${ac_cv_path_UNZIP+:} false; then :
21328  $as_echo_n "(cached) " >&6
21329else
21330  case $UNZIP in
21331  [\\/]* | ?:[\\/]*)
21332  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21333  ;;
21334  *)
21335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21336for as_dir in $PATH
21337do
21338  IFS=$as_save_IFS
21339  test -z "$as_dir" && as_dir=.
21340    for ac_exec_ext in '' $ac_executable_extensions; do
21341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21342    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21344    break 2
21345  fi
21346done
21347  done
21348IFS=$as_save_IFS
21349
21350  ;;
21351esac
21352fi
21353UNZIP=$ac_cv_path_UNZIP
21354if test -n "$UNZIP"; then
21355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21356$as_echo "$UNZIP" >&6; }
21357else
21358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21359$as_echo "no" >&6; }
21360fi
21361
21362
21363          if test "x$UNZIP" = x; then
21364            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21365          fi
21366        else
21367          # Otherwise we believe it is a complete path. Use it as it is.
21368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21369$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21370          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21371$as_echo_n "checking for UNZIP... " >&6; }
21372          if test ! -x "$tool_specified"; then
21373            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21374$as_echo "not found" >&6; }
21375            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21376          fi
21377          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21378$as_echo "$tool_specified" >&6; }
21379        fi
21380      fi
21381    fi
21382
21383  fi
21384
21385
21386
21387  if test "x$UNZIP" = x; then
21388    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21389  fi
21390
21391
21392
21393
21394
21395  # Publish this variable in the help.
21396
21397
21398  if [ -z "${ZIP+x}" ]; then
21399    # The variable is not set by user, try to locate tool using the code snippet
21400    for ac_prog in zip
21401do
21402  # Extract the first word of "$ac_prog", so it can be a program name with args.
21403set dummy $ac_prog; ac_word=$2
21404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21405$as_echo_n "checking for $ac_word... " >&6; }
21406if ${ac_cv_path_ZIP+:} false; then :
21407  $as_echo_n "(cached) " >&6
21408else
21409  case $ZIP in
21410  [\\/]* | ?:[\\/]*)
21411  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21412  ;;
21413  *)
21414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21415for as_dir in $PATH
21416do
21417  IFS=$as_save_IFS
21418  test -z "$as_dir" && as_dir=.
21419    for ac_exec_ext in '' $ac_executable_extensions; do
21420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21421    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21423    break 2
21424  fi
21425done
21426  done
21427IFS=$as_save_IFS
21428
21429  ;;
21430esac
21431fi
21432ZIP=$ac_cv_path_ZIP
21433if test -n "$ZIP"; then
21434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21435$as_echo "$ZIP" >&6; }
21436else
21437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21438$as_echo "no" >&6; }
21439fi
21440
21441
21442  test -n "$ZIP" && break
21443done
21444
21445  else
21446    # The variable is set, but is it from the command line or the environment?
21447
21448    # Try to remove the string !ZIP! from our list.
21449    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21450    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21451      # If it failed, the variable was not from the command line. Ignore it,
21452      # but warn the user (except for BASH, which is always set by the calling BASH).
21453      if test "xZIP" != xBASH; then
21454        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21455$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21456      fi
21457      # Try to locate tool using the code snippet
21458      for ac_prog in zip
21459do
21460  # Extract the first word of "$ac_prog", so it can be a program name with args.
21461set dummy $ac_prog; ac_word=$2
21462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21463$as_echo_n "checking for $ac_word... " >&6; }
21464if ${ac_cv_path_ZIP+:} false; then :
21465  $as_echo_n "(cached) " >&6
21466else
21467  case $ZIP in
21468  [\\/]* | ?:[\\/]*)
21469  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21470  ;;
21471  *)
21472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21473for as_dir in $PATH
21474do
21475  IFS=$as_save_IFS
21476  test -z "$as_dir" && as_dir=.
21477    for ac_exec_ext in '' $ac_executable_extensions; do
21478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21479    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21481    break 2
21482  fi
21483done
21484  done
21485IFS=$as_save_IFS
21486
21487  ;;
21488esac
21489fi
21490ZIP=$ac_cv_path_ZIP
21491if test -n "$ZIP"; then
21492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21493$as_echo "$ZIP" >&6; }
21494else
21495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21496$as_echo "no" >&6; }
21497fi
21498
21499
21500  test -n "$ZIP" && break
21501done
21502
21503    else
21504      # If it succeeded, then it was overridden by the user. We will use it
21505      # for the tool.
21506
21507      # First remove it from the list of overridden variables, so we can test
21508      # for unknown variables in the end.
21509      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21510
21511      # Check if we try to supply an empty value
21512      if test "x$ZIP" = x; then
21513        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21514$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21516$as_echo_n "checking for ZIP... " >&6; }
21517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21518$as_echo "disabled" >&6; }
21519      else
21520        # Check if the provided tool contains a complete path.
21521        tool_specified="$ZIP"
21522        tool_basename="${tool_specified##*/}"
21523        if test "x$tool_basename" = "x$tool_specified"; then
21524          # A command without a complete path is provided, search $PATH.
21525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21526$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21527          # Extract the first word of "$tool_basename", so it can be a program name with args.
21528set dummy $tool_basename; ac_word=$2
21529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21530$as_echo_n "checking for $ac_word... " >&6; }
21531if ${ac_cv_path_ZIP+:} false; then :
21532  $as_echo_n "(cached) " >&6
21533else
21534  case $ZIP in
21535  [\\/]* | ?:[\\/]*)
21536  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21537  ;;
21538  *)
21539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21540for as_dir in $PATH
21541do
21542  IFS=$as_save_IFS
21543  test -z "$as_dir" && as_dir=.
21544    for ac_exec_ext in '' $ac_executable_extensions; do
21545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21546    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21548    break 2
21549  fi
21550done
21551  done
21552IFS=$as_save_IFS
21553
21554  ;;
21555esac
21556fi
21557ZIP=$ac_cv_path_ZIP
21558if test -n "$ZIP"; then
21559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21560$as_echo "$ZIP" >&6; }
21561else
21562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21563$as_echo "no" >&6; }
21564fi
21565
21566
21567          if test "x$ZIP" = x; then
21568            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21569          fi
21570        else
21571          # Otherwise we believe it is a complete path. Use it as it is.
21572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21573$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21574          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21575$as_echo_n "checking for ZIP... " >&6; }
21576          if test ! -x "$tool_specified"; then
21577            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21578$as_echo "not found" >&6; }
21579            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21580          fi
21581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21582$as_echo "$tool_specified" >&6; }
21583        fi
21584      fi
21585    fi
21586
21587  fi
21588
21589
21590
21591  if test "x$ZIP" = x; then
21592    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21593  fi
21594
21595
21596
21597  # Non-required basic tools
21598
21599
21600
21601  # Publish this variable in the help.
21602
21603
21604  if [ -z "${LDD+x}" ]; then
21605    # The variable is not set by user, try to locate tool using the code snippet
21606    for ac_prog in ldd
21607do
21608  # Extract the first word of "$ac_prog", so it can be a program name with args.
21609set dummy $ac_prog; ac_word=$2
21610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21611$as_echo_n "checking for $ac_word... " >&6; }
21612if ${ac_cv_path_LDD+:} false; then :
21613  $as_echo_n "(cached) " >&6
21614else
21615  case $LDD in
21616  [\\/]* | ?:[\\/]*)
21617  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21618  ;;
21619  *)
21620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21621for as_dir in $PATH
21622do
21623  IFS=$as_save_IFS
21624  test -z "$as_dir" && as_dir=.
21625    for ac_exec_ext in '' $ac_executable_extensions; do
21626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21627    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21629    break 2
21630  fi
21631done
21632  done
21633IFS=$as_save_IFS
21634
21635  ;;
21636esac
21637fi
21638LDD=$ac_cv_path_LDD
21639if test -n "$LDD"; then
21640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21641$as_echo "$LDD" >&6; }
21642else
21643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21644$as_echo "no" >&6; }
21645fi
21646
21647
21648  test -n "$LDD" && break
21649done
21650
21651  else
21652    # The variable is set, but is it from the command line or the environment?
21653
21654    # Try to remove the string !LDD! from our list.
21655    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21656    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21657      # If it failed, the variable was not from the command line. Ignore it,
21658      # but warn the user (except for BASH, which is always set by the calling BASH).
21659      if test "xLDD" != xBASH; then
21660        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21661$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21662      fi
21663      # Try to locate tool using the code snippet
21664      for ac_prog in ldd
21665do
21666  # Extract the first word of "$ac_prog", so it can be a program name with args.
21667set dummy $ac_prog; ac_word=$2
21668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21669$as_echo_n "checking for $ac_word... " >&6; }
21670if ${ac_cv_path_LDD+:} false; then :
21671  $as_echo_n "(cached) " >&6
21672else
21673  case $LDD in
21674  [\\/]* | ?:[\\/]*)
21675  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21676  ;;
21677  *)
21678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21679for as_dir in $PATH
21680do
21681  IFS=$as_save_IFS
21682  test -z "$as_dir" && as_dir=.
21683    for ac_exec_ext in '' $ac_executable_extensions; do
21684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21685    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21687    break 2
21688  fi
21689done
21690  done
21691IFS=$as_save_IFS
21692
21693  ;;
21694esac
21695fi
21696LDD=$ac_cv_path_LDD
21697if test -n "$LDD"; then
21698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21699$as_echo "$LDD" >&6; }
21700else
21701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21702$as_echo "no" >&6; }
21703fi
21704
21705
21706  test -n "$LDD" && break
21707done
21708
21709    else
21710      # If it succeeded, then it was overridden by the user. We will use it
21711      # for the tool.
21712
21713      # First remove it from the list of overridden variables, so we can test
21714      # for unknown variables in the end.
21715      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21716
21717      # Check if we try to supply an empty value
21718      if test "x$LDD" = x; then
21719        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21720$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21721        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21722$as_echo_n "checking for LDD... " >&6; }
21723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21724$as_echo "disabled" >&6; }
21725      else
21726        # Check if the provided tool contains a complete path.
21727        tool_specified="$LDD"
21728        tool_basename="${tool_specified##*/}"
21729        if test "x$tool_basename" = "x$tool_specified"; then
21730          # A command without a complete path is provided, search $PATH.
21731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21732$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21733          # Extract the first word of "$tool_basename", so it can be a program name with args.
21734set dummy $tool_basename; ac_word=$2
21735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21736$as_echo_n "checking for $ac_word... " >&6; }
21737if ${ac_cv_path_LDD+:} false; then :
21738  $as_echo_n "(cached) " >&6
21739else
21740  case $LDD in
21741  [\\/]* | ?:[\\/]*)
21742  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21743  ;;
21744  *)
21745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21746for as_dir in $PATH
21747do
21748  IFS=$as_save_IFS
21749  test -z "$as_dir" && as_dir=.
21750    for ac_exec_ext in '' $ac_executable_extensions; do
21751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21752    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21754    break 2
21755  fi
21756done
21757  done
21758IFS=$as_save_IFS
21759
21760  ;;
21761esac
21762fi
21763LDD=$ac_cv_path_LDD
21764if test -n "$LDD"; then
21765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21766$as_echo "$LDD" >&6; }
21767else
21768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21769$as_echo "no" >&6; }
21770fi
21771
21772
21773          if test "x$LDD" = x; then
21774            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21775          fi
21776        else
21777          # Otherwise we believe it is a complete path. Use it as it is.
21778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21779$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21780          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21781$as_echo_n "checking for LDD... " >&6; }
21782          if test ! -x "$tool_specified"; then
21783            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21784$as_echo "not found" >&6; }
21785            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21786          fi
21787          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21788$as_echo "$tool_specified" >&6; }
21789        fi
21790      fi
21791    fi
21792
21793  fi
21794
21795
21796  if test "x$LDD" = "x"; then
21797    # List shared lib dependencies is used for
21798    # debug output and checking for forbidden dependencies.
21799    # We can build without it.
21800    LDD="true"
21801  fi
21802
21803
21804  # Publish this variable in the help.
21805
21806
21807  if [ -z "${OTOOL+x}" ]; then
21808    # The variable is not set by user, try to locate tool using the code snippet
21809    for ac_prog in otool
21810do
21811  # Extract the first word of "$ac_prog", so it can be a program name with args.
21812set dummy $ac_prog; ac_word=$2
21813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21814$as_echo_n "checking for $ac_word... " >&6; }
21815if ${ac_cv_path_OTOOL+:} false; then :
21816  $as_echo_n "(cached) " >&6
21817else
21818  case $OTOOL in
21819  [\\/]* | ?:[\\/]*)
21820  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21821  ;;
21822  *)
21823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21824for as_dir in $PATH
21825do
21826  IFS=$as_save_IFS
21827  test -z "$as_dir" && as_dir=.
21828    for ac_exec_ext in '' $ac_executable_extensions; do
21829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21830    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21832    break 2
21833  fi
21834done
21835  done
21836IFS=$as_save_IFS
21837
21838  ;;
21839esac
21840fi
21841OTOOL=$ac_cv_path_OTOOL
21842if test -n "$OTOOL"; then
21843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21844$as_echo "$OTOOL" >&6; }
21845else
21846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21847$as_echo "no" >&6; }
21848fi
21849
21850
21851  test -n "$OTOOL" && break
21852done
21853
21854  else
21855    # The variable is set, but is it from the command line or the environment?
21856
21857    # Try to remove the string !OTOOL! from our list.
21858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21860      # If it failed, the variable was not from the command line. Ignore it,
21861      # but warn the user (except for BASH, which is always set by the calling BASH).
21862      if test "xOTOOL" != xBASH; then
21863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21864$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21865      fi
21866      # Try to locate tool using the code snippet
21867      for ac_prog in otool
21868do
21869  # Extract the first word of "$ac_prog", so it can be a program name with args.
21870set dummy $ac_prog; ac_word=$2
21871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21872$as_echo_n "checking for $ac_word... " >&6; }
21873if ${ac_cv_path_OTOOL+:} false; then :
21874  $as_echo_n "(cached) " >&6
21875else
21876  case $OTOOL in
21877  [\\/]* | ?:[\\/]*)
21878  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21879  ;;
21880  *)
21881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21882for as_dir in $PATH
21883do
21884  IFS=$as_save_IFS
21885  test -z "$as_dir" && as_dir=.
21886    for ac_exec_ext in '' $ac_executable_extensions; do
21887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21888    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21890    break 2
21891  fi
21892done
21893  done
21894IFS=$as_save_IFS
21895
21896  ;;
21897esac
21898fi
21899OTOOL=$ac_cv_path_OTOOL
21900if test -n "$OTOOL"; then
21901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21902$as_echo "$OTOOL" >&6; }
21903else
21904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21905$as_echo "no" >&6; }
21906fi
21907
21908
21909  test -n "$OTOOL" && break
21910done
21911
21912    else
21913      # If it succeeded, then it was overridden by the user. We will use it
21914      # for the tool.
21915
21916      # First remove it from the list of overridden variables, so we can test
21917      # for unknown variables in the end.
21918      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21919
21920      # Check if we try to supply an empty value
21921      if test "x$OTOOL" = x; then
21922        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21923$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21925$as_echo_n "checking for OTOOL... " >&6; }
21926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21927$as_echo "disabled" >&6; }
21928      else
21929        # Check if the provided tool contains a complete path.
21930        tool_specified="$OTOOL"
21931        tool_basename="${tool_specified##*/}"
21932        if test "x$tool_basename" = "x$tool_specified"; then
21933          # A command without a complete path is provided, search $PATH.
21934          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21935$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21936          # Extract the first word of "$tool_basename", so it can be a program name with args.
21937set dummy $tool_basename; ac_word=$2
21938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21939$as_echo_n "checking for $ac_word... " >&6; }
21940if ${ac_cv_path_OTOOL+:} false; then :
21941  $as_echo_n "(cached) " >&6
21942else
21943  case $OTOOL in
21944  [\\/]* | ?:[\\/]*)
21945  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21946  ;;
21947  *)
21948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21949for as_dir in $PATH
21950do
21951  IFS=$as_save_IFS
21952  test -z "$as_dir" && as_dir=.
21953    for ac_exec_ext in '' $ac_executable_extensions; do
21954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21955    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21957    break 2
21958  fi
21959done
21960  done
21961IFS=$as_save_IFS
21962
21963  ;;
21964esac
21965fi
21966OTOOL=$ac_cv_path_OTOOL
21967if test -n "$OTOOL"; then
21968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21969$as_echo "$OTOOL" >&6; }
21970else
21971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21972$as_echo "no" >&6; }
21973fi
21974
21975
21976          if test "x$OTOOL" = x; then
21977            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21978          fi
21979        else
21980          # Otherwise we believe it is a complete path. Use it as it is.
21981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21982$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21983          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21984$as_echo_n "checking for OTOOL... " >&6; }
21985          if test ! -x "$tool_specified"; then
21986            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21987$as_echo "not found" >&6; }
21988            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21989          fi
21990          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21991$as_echo "$tool_specified" >&6; }
21992        fi
21993      fi
21994    fi
21995
21996  fi
21997
21998
21999  if test "x$OTOOL" = "x"; then
22000    OTOOL="true"
22001  fi
22002
22003
22004  # Publish this variable in the help.
22005
22006
22007  if [ -z "${READELF+x}" ]; then
22008    # The variable is not set by user, try to locate tool using the code snippet
22009    for ac_prog in greadelf readelf
22010do
22011  # Extract the first word of "$ac_prog", so it can be a program name with args.
22012set dummy $ac_prog; ac_word=$2
22013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22014$as_echo_n "checking for $ac_word... " >&6; }
22015if ${ac_cv_path_READELF+:} false; then :
22016  $as_echo_n "(cached) " >&6
22017else
22018  case $READELF in
22019  [\\/]* | ?:[\\/]*)
22020  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22021  ;;
22022  *)
22023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22024for as_dir in $PATH
22025do
22026  IFS=$as_save_IFS
22027  test -z "$as_dir" && as_dir=.
22028    for ac_exec_ext in '' $ac_executable_extensions; do
22029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22030    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22032    break 2
22033  fi
22034done
22035  done
22036IFS=$as_save_IFS
22037
22038  ;;
22039esac
22040fi
22041READELF=$ac_cv_path_READELF
22042if test -n "$READELF"; then
22043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22044$as_echo "$READELF" >&6; }
22045else
22046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22047$as_echo "no" >&6; }
22048fi
22049
22050
22051  test -n "$READELF" && break
22052done
22053
22054  else
22055    # The variable is set, but is it from the command line or the environment?
22056
22057    # Try to remove the string !READELF! from our list.
22058    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22059    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22060      # If it failed, the variable was not from the command line. Ignore it,
22061      # but warn the user (except for BASH, which is always set by the calling BASH).
22062      if test "xREADELF" != xBASH; then
22063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22064$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22065      fi
22066      # Try to locate tool using the code snippet
22067      for ac_prog in greadelf readelf
22068do
22069  # Extract the first word of "$ac_prog", so it can be a program name with args.
22070set dummy $ac_prog; ac_word=$2
22071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22072$as_echo_n "checking for $ac_word... " >&6; }
22073if ${ac_cv_path_READELF+:} false; then :
22074  $as_echo_n "(cached) " >&6
22075else
22076  case $READELF in
22077  [\\/]* | ?:[\\/]*)
22078  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22079  ;;
22080  *)
22081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22082for as_dir in $PATH
22083do
22084  IFS=$as_save_IFS
22085  test -z "$as_dir" && as_dir=.
22086    for ac_exec_ext in '' $ac_executable_extensions; do
22087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22088    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22090    break 2
22091  fi
22092done
22093  done
22094IFS=$as_save_IFS
22095
22096  ;;
22097esac
22098fi
22099READELF=$ac_cv_path_READELF
22100if test -n "$READELF"; then
22101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22102$as_echo "$READELF" >&6; }
22103else
22104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22105$as_echo "no" >&6; }
22106fi
22107
22108
22109  test -n "$READELF" && break
22110done
22111
22112    else
22113      # If it succeeded, then it was overridden by the user. We will use it
22114      # for the tool.
22115
22116      # First remove it from the list of overridden variables, so we can test
22117      # for unknown variables in the end.
22118      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22119
22120      # Check if we try to supply an empty value
22121      if test "x$READELF" = x; then
22122        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22123$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22124        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22125$as_echo_n "checking for READELF... " >&6; }
22126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22127$as_echo "disabled" >&6; }
22128      else
22129        # Check if the provided tool contains a complete path.
22130        tool_specified="$READELF"
22131        tool_basename="${tool_specified##*/}"
22132        if test "x$tool_basename" = "x$tool_specified"; then
22133          # A command without a complete path is provided, search $PATH.
22134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22135$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22136          # Extract the first word of "$tool_basename", so it can be a program name with args.
22137set dummy $tool_basename; ac_word=$2
22138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22139$as_echo_n "checking for $ac_word... " >&6; }
22140if ${ac_cv_path_READELF+:} false; then :
22141  $as_echo_n "(cached) " >&6
22142else
22143  case $READELF in
22144  [\\/]* | ?:[\\/]*)
22145  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22146  ;;
22147  *)
22148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22149for as_dir in $PATH
22150do
22151  IFS=$as_save_IFS
22152  test -z "$as_dir" && as_dir=.
22153    for ac_exec_ext in '' $ac_executable_extensions; do
22154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22155    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22157    break 2
22158  fi
22159done
22160  done
22161IFS=$as_save_IFS
22162
22163  ;;
22164esac
22165fi
22166READELF=$ac_cv_path_READELF
22167if test -n "$READELF"; then
22168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22169$as_echo "$READELF" >&6; }
22170else
22171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22172$as_echo "no" >&6; }
22173fi
22174
22175
22176          if test "x$READELF" = x; then
22177            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22178          fi
22179        else
22180          # Otherwise we believe it is a complete path. Use it as it is.
22181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22182$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22183          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22184$as_echo_n "checking for READELF... " >&6; }
22185          if test ! -x "$tool_specified"; then
22186            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22187$as_echo "not found" >&6; }
22188            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22189          fi
22190          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22191$as_echo "$tool_specified" >&6; }
22192        fi
22193      fi
22194    fi
22195
22196  fi
22197
22198
22199
22200
22201  # Publish this variable in the help.
22202
22203
22204  if [ -z "${HG+x}" ]; then
22205    # The variable is not set by user, try to locate tool using the code snippet
22206    for ac_prog in hg
22207do
22208  # Extract the first word of "$ac_prog", so it can be a program name with args.
22209set dummy $ac_prog; ac_word=$2
22210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22211$as_echo_n "checking for $ac_word... " >&6; }
22212if ${ac_cv_path_HG+:} false; then :
22213  $as_echo_n "(cached) " >&6
22214else
22215  case $HG in
22216  [\\/]* | ?:[\\/]*)
22217  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22218  ;;
22219  *)
22220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22221for as_dir in $PATH
22222do
22223  IFS=$as_save_IFS
22224  test -z "$as_dir" && as_dir=.
22225    for ac_exec_ext in '' $ac_executable_extensions; do
22226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22227    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22229    break 2
22230  fi
22231done
22232  done
22233IFS=$as_save_IFS
22234
22235  ;;
22236esac
22237fi
22238HG=$ac_cv_path_HG
22239if test -n "$HG"; then
22240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22241$as_echo "$HG" >&6; }
22242else
22243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22244$as_echo "no" >&6; }
22245fi
22246
22247
22248  test -n "$HG" && break
22249done
22250
22251  else
22252    # The variable is set, but is it from the command line or the environment?
22253
22254    # Try to remove the string !HG! from our list.
22255    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22256    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22257      # If it failed, the variable was not from the command line. Ignore it,
22258      # but warn the user (except for BASH, which is always set by the calling BASH).
22259      if test "xHG" != xBASH; then
22260        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22261$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22262      fi
22263      # Try to locate tool using the code snippet
22264      for ac_prog in hg
22265do
22266  # Extract the first word of "$ac_prog", so it can be a program name with args.
22267set dummy $ac_prog; ac_word=$2
22268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22269$as_echo_n "checking for $ac_word... " >&6; }
22270if ${ac_cv_path_HG+:} false; then :
22271  $as_echo_n "(cached) " >&6
22272else
22273  case $HG in
22274  [\\/]* | ?:[\\/]*)
22275  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22276  ;;
22277  *)
22278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22279for as_dir in $PATH
22280do
22281  IFS=$as_save_IFS
22282  test -z "$as_dir" && as_dir=.
22283    for ac_exec_ext in '' $ac_executable_extensions; do
22284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22285    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22287    break 2
22288  fi
22289done
22290  done
22291IFS=$as_save_IFS
22292
22293  ;;
22294esac
22295fi
22296HG=$ac_cv_path_HG
22297if test -n "$HG"; then
22298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22299$as_echo "$HG" >&6; }
22300else
22301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22302$as_echo "no" >&6; }
22303fi
22304
22305
22306  test -n "$HG" && break
22307done
22308
22309    else
22310      # If it succeeded, then it was overridden by the user. We will use it
22311      # for the tool.
22312
22313      # First remove it from the list of overridden variables, so we can test
22314      # for unknown variables in the end.
22315      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22316
22317      # Check if we try to supply an empty value
22318      if test "x$HG" = x; then
22319        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22320$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22321        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22322$as_echo_n "checking for HG... " >&6; }
22323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22324$as_echo "disabled" >&6; }
22325      else
22326        # Check if the provided tool contains a complete path.
22327        tool_specified="$HG"
22328        tool_basename="${tool_specified##*/}"
22329        if test "x$tool_basename" = "x$tool_specified"; then
22330          # A command without a complete path is provided, search $PATH.
22331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22332$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22333          # Extract the first word of "$tool_basename", so it can be a program name with args.
22334set dummy $tool_basename; ac_word=$2
22335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22336$as_echo_n "checking for $ac_word... " >&6; }
22337if ${ac_cv_path_HG+:} false; then :
22338  $as_echo_n "(cached) " >&6
22339else
22340  case $HG in
22341  [\\/]* | ?:[\\/]*)
22342  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22343  ;;
22344  *)
22345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22346for as_dir in $PATH
22347do
22348  IFS=$as_save_IFS
22349  test -z "$as_dir" && as_dir=.
22350    for ac_exec_ext in '' $ac_executable_extensions; do
22351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22352    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22354    break 2
22355  fi
22356done
22357  done
22358IFS=$as_save_IFS
22359
22360  ;;
22361esac
22362fi
22363HG=$ac_cv_path_HG
22364if test -n "$HG"; then
22365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22366$as_echo "$HG" >&6; }
22367else
22368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22369$as_echo "no" >&6; }
22370fi
22371
22372
22373          if test "x$HG" = x; then
22374            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22375          fi
22376        else
22377          # Otherwise we believe it is a complete path. Use it as it is.
22378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22379$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22380          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22381$as_echo_n "checking for HG... " >&6; }
22382          if test ! -x "$tool_specified"; then
22383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22384$as_echo "not found" >&6; }
22385            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22386          fi
22387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22388$as_echo "$tool_specified" >&6; }
22389        fi
22390      fi
22391    fi
22392
22393  fi
22394
22395
22396
22397
22398  # Publish this variable in the help.
22399
22400
22401  if [ -z "${STAT+x}" ]; then
22402    # The variable is not set by user, try to locate tool using the code snippet
22403    for ac_prog in stat
22404do
22405  # Extract the first word of "$ac_prog", so it can be a program name with args.
22406set dummy $ac_prog; ac_word=$2
22407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22408$as_echo_n "checking for $ac_word... " >&6; }
22409if ${ac_cv_path_STAT+:} false; then :
22410  $as_echo_n "(cached) " >&6
22411else
22412  case $STAT in
22413  [\\/]* | ?:[\\/]*)
22414  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22415  ;;
22416  *)
22417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22418for as_dir in $PATH
22419do
22420  IFS=$as_save_IFS
22421  test -z "$as_dir" && as_dir=.
22422    for ac_exec_ext in '' $ac_executable_extensions; do
22423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22424    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22426    break 2
22427  fi
22428done
22429  done
22430IFS=$as_save_IFS
22431
22432  ;;
22433esac
22434fi
22435STAT=$ac_cv_path_STAT
22436if test -n "$STAT"; then
22437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22438$as_echo "$STAT" >&6; }
22439else
22440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22441$as_echo "no" >&6; }
22442fi
22443
22444
22445  test -n "$STAT" && break
22446done
22447
22448  else
22449    # The variable is set, but is it from the command line or the environment?
22450
22451    # Try to remove the string !STAT! from our list.
22452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22454      # If it failed, the variable was not from the command line. Ignore it,
22455      # but warn the user (except for BASH, which is always set by the calling BASH).
22456      if test "xSTAT" != xBASH; then
22457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22458$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22459      fi
22460      # Try to locate tool using the code snippet
22461      for ac_prog in stat
22462do
22463  # Extract the first word of "$ac_prog", so it can be a program name with args.
22464set dummy $ac_prog; ac_word=$2
22465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22466$as_echo_n "checking for $ac_word... " >&6; }
22467if ${ac_cv_path_STAT+:} false; then :
22468  $as_echo_n "(cached) " >&6
22469else
22470  case $STAT in
22471  [\\/]* | ?:[\\/]*)
22472  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22473  ;;
22474  *)
22475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22476for as_dir in $PATH
22477do
22478  IFS=$as_save_IFS
22479  test -z "$as_dir" && as_dir=.
22480    for ac_exec_ext in '' $ac_executable_extensions; do
22481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22482    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22484    break 2
22485  fi
22486done
22487  done
22488IFS=$as_save_IFS
22489
22490  ;;
22491esac
22492fi
22493STAT=$ac_cv_path_STAT
22494if test -n "$STAT"; then
22495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22496$as_echo "$STAT" >&6; }
22497else
22498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22499$as_echo "no" >&6; }
22500fi
22501
22502
22503  test -n "$STAT" && break
22504done
22505
22506    else
22507      # If it succeeded, then it was overridden by the user. We will use it
22508      # for the tool.
22509
22510      # First remove it from the list of overridden variables, so we can test
22511      # for unknown variables in the end.
22512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22513
22514      # Check if we try to supply an empty value
22515      if test "x$STAT" = x; then
22516        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22517$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22518        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22519$as_echo_n "checking for STAT... " >&6; }
22520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22521$as_echo "disabled" >&6; }
22522      else
22523        # Check if the provided tool contains a complete path.
22524        tool_specified="$STAT"
22525        tool_basename="${tool_specified##*/}"
22526        if test "x$tool_basename" = "x$tool_specified"; then
22527          # A command without a complete path is provided, search $PATH.
22528          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22529$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22530          # Extract the first word of "$tool_basename", so it can be a program name with args.
22531set dummy $tool_basename; ac_word=$2
22532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22533$as_echo_n "checking for $ac_word... " >&6; }
22534if ${ac_cv_path_STAT+:} false; then :
22535  $as_echo_n "(cached) " >&6
22536else
22537  case $STAT in
22538  [\\/]* | ?:[\\/]*)
22539  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22540  ;;
22541  *)
22542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22543for as_dir in $PATH
22544do
22545  IFS=$as_save_IFS
22546  test -z "$as_dir" && as_dir=.
22547    for ac_exec_ext in '' $ac_executable_extensions; do
22548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22549    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22551    break 2
22552  fi
22553done
22554  done
22555IFS=$as_save_IFS
22556
22557  ;;
22558esac
22559fi
22560STAT=$ac_cv_path_STAT
22561if test -n "$STAT"; then
22562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22563$as_echo "$STAT" >&6; }
22564else
22565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22566$as_echo "no" >&6; }
22567fi
22568
22569
22570          if test "x$STAT" = x; then
22571            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22572          fi
22573        else
22574          # Otherwise we believe it is a complete path. Use it as it is.
22575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22576$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22577          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22578$as_echo_n "checking for STAT... " >&6; }
22579          if test ! -x "$tool_specified"; then
22580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22581$as_echo "not found" >&6; }
22582            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22583          fi
22584          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22585$as_echo "$tool_specified" >&6; }
22586        fi
22587      fi
22588    fi
22589
22590  fi
22591
22592
22593
22594
22595  # Publish this variable in the help.
22596
22597
22598  if [ -z "${TIME+x}" ]; then
22599    # The variable is not set by user, try to locate tool using the code snippet
22600    for ac_prog in time
22601do
22602  # Extract the first word of "$ac_prog", so it can be a program name with args.
22603set dummy $ac_prog; ac_word=$2
22604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22605$as_echo_n "checking for $ac_word... " >&6; }
22606if ${ac_cv_path_TIME+:} false; then :
22607  $as_echo_n "(cached) " >&6
22608else
22609  case $TIME in
22610  [\\/]* | ?:[\\/]*)
22611  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22612  ;;
22613  *)
22614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22615for as_dir in $PATH
22616do
22617  IFS=$as_save_IFS
22618  test -z "$as_dir" && as_dir=.
22619    for ac_exec_ext in '' $ac_executable_extensions; do
22620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22621    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22623    break 2
22624  fi
22625done
22626  done
22627IFS=$as_save_IFS
22628
22629  ;;
22630esac
22631fi
22632TIME=$ac_cv_path_TIME
22633if test -n "$TIME"; then
22634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22635$as_echo "$TIME" >&6; }
22636else
22637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22638$as_echo "no" >&6; }
22639fi
22640
22641
22642  test -n "$TIME" && break
22643done
22644
22645  else
22646    # The variable is set, but is it from the command line or the environment?
22647
22648    # Try to remove the string !TIME! from our list.
22649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22651      # If it failed, the variable was not from the command line. Ignore it,
22652      # but warn the user (except for BASH, which is always set by the calling BASH).
22653      if test "xTIME" != xBASH; then
22654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22655$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22656      fi
22657      # Try to locate tool using the code snippet
22658      for ac_prog in time
22659do
22660  # Extract the first word of "$ac_prog", so it can be a program name with args.
22661set dummy $ac_prog; ac_word=$2
22662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22663$as_echo_n "checking for $ac_word... " >&6; }
22664if ${ac_cv_path_TIME+:} false; then :
22665  $as_echo_n "(cached) " >&6
22666else
22667  case $TIME in
22668  [\\/]* | ?:[\\/]*)
22669  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22670  ;;
22671  *)
22672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22673for as_dir in $PATH
22674do
22675  IFS=$as_save_IFS
22676  test -z "$as_dir" && as_dir=.
22677    for ac_exec_ext in '' $ac_executable_extensions; do
22678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22679    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22681    break 2
22682  fi
22683done
22684  done
22685IFS=$as_save_IFS
22686
22687  ;;
22688esac
22689fi
22690TIME=$ac_cv_path_TIME
22691if test -n "$TIME"; then
22692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22693$as_echo "$TIME" >&6; }
22694else
22695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22696$as_echo "no" >&6; }
22697fi
22698
22699
22700  test -n "$TIME" && break
22701done
22702
22703    else
22704      # If it succeeded, then it was overridden by the user. We will use it
22705      # for the tool.
22706
22707      # First remove it from the list of overridden variables, so we can test
22708      # for unknown variables in the end.
22709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22710
22711      # Check if we try to supply an empty value
22712      if test "x$TIME" = x; then
22713        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22714$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22716$as_echo_n "checking for TIME... " >&6; }
22717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22718$as_echo "disabled" >&6; }
22719      else
22720        # Check if the provided tool contains a complete path.
22721        tool_specified="$TIME"
22722        tool_basename="${tool_specified##*/}"
22723        if test "x$tool_basename" = "x$tool_specified"; then
22724          # A command without a complete path is provided, search $PATH.
22725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22726$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22727          # Extract the first word of "$tool_basename", so it can be a program name with args.
22728set dummy $tool_basename; ac_word=$2
22729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22730$as_echo_n "checking for $ac_word... " >&6; }
22731if ${ac_cv_path_TIME+:} false; then :
22732  $as_echo_n "(cached) " >&6
22733else
22734  case $TIME in
22735  [\\/]* | ?:[\\/]*)
22736  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22737  ;;
22738  *)
22739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22740for as_dir in $PATH
22741do
22742  IFS=$as_save_IFS
22743  test -z "$as_dir" && as_dir=.
22744    for ac_exec_ext in '' $ac_executable_extensions; do
22745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22746    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22748    break 2
22749  fi
22750done
22751  done
22752IFS=$as_save_IFS
22753
22754  ;;
22755esac
22756fi
22757TIME=$ac_cv_path_TIME
22758if test -n "$TIME"; then
22759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22760$as_echo "$TIME" >&6; }
22761else
22762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22763$as_echo "no" >&6; }
22764fi
22765
22766
22767          if test "x$TIME" = x; then
22768            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22769          fi
22770        else
22771          # Otherwise we believe it is a complete path. Use it as it is.
22772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22773$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22774          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22775$as_echo_n "checking for TIME... " >&6; }
22776          if test ! -x "$tool_specified"; then
22777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22778$as_echo "not found" >&6; }
22779            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22780          fi
22781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22782$as_echo "$tool_specified" >&6; }
22783        fi
22784      fi
22785    fi
22786
22787  fi
22788
22789
22790
22791
22792  # Publish this variable in the help.
22793
22794
22795  if [ -z "${DTRACE+x}" ]; then
22796    # The variable is not set by user, try to locate tool using the code snippet
22797    for ac_prog in dtrace
22798do
22799  # Extract the first word of "$ac_prog", so it can be a program name with args.
22800set dummy $ac_prog; ac_word=$2
22801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22802$as_echo_n "checking for $ac_word... " >&6; }
22803if ${ac_cv_path_DTRACE+:} false; then :
22804  $as_echo_n "(cached) " >&6
22805else
22806  case $DTRACE in
22807  [\\/]* | ?:[\\/]*)
22808  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22809  ;;
22810  *)
22811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22812for as_dir in $PATH
22813do
22814  IFS=$as_save_IFS
22815  test -z "$as_dir" && as_dir=.
22816    for ac_exec_ext in '' $ac_executable_extensions; do
22817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22818    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22820    break 2
22821  fi
22822done
22823  done
22824IFS=$as_save_IFS
22825
22826  ;;
22827esac
22828fi
22829DTRACE=$ac_cv_path_DTRACE
22830if test -n "$DTRACE"; then
22831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22832$as_echo "$DTRACE" >&6; }
22833else
22834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22835$as_echo "no" >&6; }
22836fi
22837
22838
22839  test -n "$DTRACE" && break
22840done
22841
22842  else
22843    # The variable is set, but is it from the command line or the environment?
22844
22845    # Try to remove the string !DTRACE! from our list.
22846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22848      # If it failed, the variable was not from the command line. Ignore it,
22849      # but warn the user (except for BASH, which is always set by the calling BASH).
22850      if test "xDTRACE" != xBASH; then
22851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22852$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22853      fi
22854      # Try to locate tool using the code snippet
22855      for ac_prog in dtrace
22856do
22857  # Extract the first word of "$ac_prog", so it can be a program name with args.
22858set dummy $ac_prog; ac_word=$2
22859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22860$as_echo_n "checking for $ac_word... " >&6; }
22861if ${ac_cv_path_DTRACE+:} false; then :
22862  $as_echo_n "(cached) " >&6
22863else
22864  case $DTRACE in
22865  [\\/]* | ?:[\\/]*)
22866  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22867  ;;
22868  *)
22869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22870for as_dir in $PATH
22871do
22872  IFS=$as_save_IFS
22873  test -z "$as_dir" && as_dir=.
22874    for ac_exec_ext in '' $ac_executable_extensions; do
22875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22876    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22878    break 2
22879  fi
22880done
22881  done
22882IFS=$as_save_IFS
22883
22884  ;;
22885esac
22886fi
22887DTRACE=$ac_cv_path_DTRACE
22888if test -n "$DTRACE"; then
22889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22890$as_echo "$DTRACE" >&6; }
22891else
22892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22893$as_echo "no" >&6; }
22894fi
22895
22896
22897  test -n "$DTRACE" && break
22898done
22899
22900    else
22901      # If it succeeded, then it was overridden by the user. We will use it
22902      # for the tool.
22903
22904      # First remove it from the list of overridden variables, so we can test
22905      # for unknown variables in the end.
22906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22907
22908      # Check if we try to supply an empty value
22909      if test "x$DTRACE" = x; then
22910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22911$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22913$as_echo_n "checking for DTRACE... " >&6; }
22914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22915$as_echo "disabled" >&6; }
22916      else
22917        # Check if the provided tool contains a complete path.
22918        tool_specified="$DTRACE"
22919        tool_basename="${tool_specified##*/}"
22920        if test "x$tool_basename" = "x$tool_specified"; then
22921          # A command without a complete path is provided, search $PATH.
22922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22923$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22924          # Extract the first word of "$tool_basename", so it can be a program name with args.
22925set dummy $tool_basename; ac_word=$2
22926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22927$as_echo_n "checking for $ac_word... " >&6; }
22928if ${ac_cv_path_DTRACE+:} false; then :
22929  $as_echo_n "(cached) " >&6
22930else
22931  case $DTRACE in
22932  [\\/]* | ?:[\\/]*)
22933  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22934  ;;
22935  *)
22936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22937for as_dir in $PATH
22938do
22939  IFS=$as_save_IFS
22940  test -z "$as_dir" && as_dir=.
22941    for ac_exec_ext in '' $ac_executable_extensions; do
22942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22943    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22945    break 2
22946  fi
22947done
22948  done
22949IFS=$as_save_IFS
22950
22951  ;;
22952esac
22953fi
22954DTRACE=$ac_cv_path_DTRACE
22955if test -n "$DTRACE"; then
22956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22957$as_echo "$DTRACE" >&6; }
22958else
22959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22960$as_echo "no" >&6; }
22961fi
22962
22963
22964          if test "x$DTRACE" = x; then
22965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22966          fi
22967        else
22968          # Otherwise we believe it is a complete path. Use it as it is.
22969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22970$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22972$as_echo_n "checking for DTRACE... " >&6; }
22973          if test ! -x "$tool_specified"; then
22974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22975$as_echo "not found" >&6; }
22976            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22977          fi
22978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22979$as_echo "$tool_specified" >&6; }
22980        fi
22981      fi
22982    fi
22983
22984  fi
22985
22986
22987
22988
22989  # Publish this variable in the help.
22990
22991
22992  if [ -z "${PATCH+x}" ]; then
22993    # The variable is not set by user, try to locate tool using the code snippet
22994    for ac_prog in gpatch patch
22995do
22996  # Extract the first word of "$ac_prog", so it can be a program name with args.
22997set dummy $ac_prog; ac_word=$2
22998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22999$as_echo_n "checking for $ac_word... " >&6; }
23000if ${ac_cv_path_PATCH+:} false; then :
23001  $as_echo_n "(cached) " >&6
23002else
23003  case $PATCH in
23004  [\\/]* | ?:[\\/]*)
23005  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23006  ;;
23007  *)
23008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23009for as_dir in $PATH
23010do
23011  IFS=$as_save_IFS
23012  test -z "$as_dir" && as_dir=.
23013    for ac_exec_ext in '' $ac_executable_extensions; do
23014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23015    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23017    break 2
23018  fi
23019done
23020  done
23021IFS=$as_save_IFS
23022
23023  ;;
23024esac
23025fi
23026PATCH=$ac_cv_path_PATCH
23027if test -n "$PATCH"; then
23028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23029$as_echo "$PATCH" >&6; }
23030else
23031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23032$as_echo "no" >&6; }
23033fi
23034
23035
23036  test -n "$PATCH" && break
23037done
23038
23039  else
23040    # The variable is set, but is it from the command line or the environment?
23041
23042    # Try to remove the string !PATCH! from our list.
23043    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23044    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23045      # If it failed, the variable was not from the command line. Ignore it,
23046      # but warn the user (except for BASH, which is always set by the calling BASH).
23047      if test "xPATCH" != xBASH; then
23048        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23049$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23050      fi
23051      # Try to locate tool using the code snippet
23052      for ac_prog in gpatch patch
23053do
23054  # Extract the first word of "$ac_prog", so it can be a program name with args.
23055set dummy $ac_prog; ac_word=$2
23056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23057$as_echo_n "checking for $ac_word... " >&6; }
23058if ${ac_cv_path_PATCH+:} false; then :
23059  $as_echo_n "(cached) " >&6
23060else
23061  case $PATCH in
23062  [\\/]* | ?:[\\/]*)
23063  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23064  ;;
23065  *)
23066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23067for as_dir in $PATH
23068do
23069  IFS=$as_save_IFS
23070  test -z "$as_dir" && as_dir=.
23071    for ac_exec_ext in '' $ac_executable_extensions; do
23072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23073    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23075    break 2
23076  fi
23077done
23078  done
23079IFS=$as_save_IFS
23080
23081  ;;
23082esac
23083fi
23084PATCH=$ac_cv_path_PATCH
23085if test -n "$PATCH"; then
23086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23087$as_echo "$PATCH" >&6; }
23088else
23089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23090$as_echo "no" >&6; }
23091fi
23092
23093
23094  test -n "$PATCH" && break
23095done
23096
23097    else
23098      # If it succeeded, then it was overridden by the user. We will use it
23099      # for the tool.
23100
23101      # First remove it from the list of overridden variables, so we can test
23102      # for unknown variables in the end.
23103      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23104
23105      # Check if we try to supply an empty value
23106      if test "x$PATCH" = x; then
23107        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23108$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23109        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23110$as_echo_n "checking for PATCH... " >&6; }
23111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23112$as_echo "disabled" >&6; }
23113      else
23114        # Check if the provided tool contains a complete path.
23115        tool_specified="$PATCH"
23116        tool_basename="${tool_specified##*/}"
23117        if test "x$tool_basename" = "x$tool_specified"; then
23118          # A command without a complete path is provided, search $PATH.
23119          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23120$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23121          # Extract the first word of "$tool_basename", so it can be a program name with args.
23122set dummy $tool_basename; ac_word=$2
23123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23124$as_echo_n "checking for $ac_word... " >&6; }
23125if ${ac_cv_path_PATCH+:} false; then :
23126  $as_echo_n "(cached) " >&6
23127else
23128  case $PATCH in
23129  [\\/]* | ?:[\\/]*)
23130  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23131  ;;
23132  *)
23133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23134for as_dir in $PATH
23135do
23136  IFS=$as_save_IFS
23137  test -z "$as_dir" && as_dir=.
23138    for ac_exec_ext in '' $ac_executable_extensions; do
23139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23140    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23142    break 2
23143  fi
23144done
23145  done
23146IFS=$as_save_IFS
23147
23148  ;;
23149esac
23150fi
23151PATCH=$ac_cv_path_PATCH
23152if test -n "$PATCH"; then
23153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23154$as_echo "$PATCH" >&6; }
23155else
23156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23157$as_echo "no" >&6; }
23158fi
23159
23160
23161          if test "x$PATCH" = x; then
23162            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23163          fi
23164        else
23165          # Otherwise we believe it is a complete path. Use it as it is.
23166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23167$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23168          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23169$as_echo_n "checking for PATCH... " >&6; }
23170          if test ! -x "$tool_specified"; then
23171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23172$as_echo "not found" >&6; }
23173            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23174          fi
23175          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23176$as_echo "$tool_specified" >&6; }
23177        fi
23178      fi
23179    fi
23180
23181  fi
23182
23183
23184  # Check if it's GNU time
23185  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23186  if test "x$IS_GNU_TIME" != x; then
23187    IS_GNU_TIME=yes
23188  else
23189    IS_GNU_TIME=no
23190  fi
23191
23192
23193  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23194
23195
23196
23197  # Publish this variable in the help.
23198
23199
23200  if [ -z "${DSYMUTIL+x}" ]; then
23201    # The variable is not set by user, try to locate tool using the code snippet
23202    for ac_prog in dsymutil
23203do
23204  # Extract the first word of "$ac_prog", so it can be a program name with args.
23205set dummy $ac_prog; ac_word=$2
23206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23207$as_echo_n "checking for $ac_word... " >&6; }
23208if ${ac_cv_path_DSYMUTIL+:} false; then :
23209  $as_echo_n "(cached) " >&6
23210else
23211  case $DSYMUTIL in
23212  [\\/]* | ?:[\\/]*)
23213  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23214  ;;
23215  *)
23216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23217for as_dir in $PATH
23218do
23219  IFS=$as_save_IFS
23220  test -z "$as_dir" && as_dir=.
23221    for ac_exec_ext in '' $ac_executable_extensions; do
23222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23223    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23225    break 2
23226  fi
23227done
23228  done
23229IFS=$as_save_IFS
23230
23231  ;;
23232esac
23233fi
23234DSYMUTIL=$ac_cv_path_DSYMUTIL
23235if test -n "$DSYMUTIL"; then
23236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23237$as_echo "$DSYMUTIL" >&6; }
23238else
23239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23240$as_echo "no" >&6; }
23241fi
23242
23243
23244  test -n "$DSYMUTIL" && break
23245done
23246
23247  else
23248    # The variable is set, but is it from the command line or the environment?
23249
23250    # Try to remove the string !DSYMUTIL! from our list.
23251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23253      # If it failed, the variable was not from the command line. Ignore it,
23254      # but warn the user (except for BASH, which is always set by the calling BASH).
23255      if test "xDSYMUTIL" != xBASH; then
23256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23257$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23258      fi
23259      # Try to locate tool using the code snippet
23260      for ac_prog in dsymutil
23261do
23262  # Extract the first word of "$ac_prog", so it can be a program name with args.
23263set dummy $ac_prog; ac_word=$2
23264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23265$as_echo_n "checking for $ac_word... " >&6; }
23266if ${ac_cv_path_DSYMUTIL+:} false; then :
23267  $as_echo_n "(cached) " >&6
23268else
23269  case $DSYMUTIL in
23270  [\\/]* | ?:[\\/]*)
23271  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23272  ;;
23273  *)
23274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23275for as_dir in $PATH
23276do
23277  IFS=$as_save_IFS
23278  test -z "$as_dir" && as_dir=.
23279    for ac_exec_ext in '' $ac_executable_extensions; do
23280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23281    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23283    break 2
23284  fi
23285done
23286  done
23287IFS=$as_save_IFS
23288
23289  ;;
23290esac
23291fi
23292DSYMUTIL=$ac_cv_path_DSYMUTIL
23293if test -n "$DSYMUTIL"; then
23294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23295$as_echo "$DSYMUTIL" >&6; }
23296else
23297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23298$as_echo "no" >&6; }
23299fi
23300
23301
23302  test -n "$DSYMUTIL" && break
23303done
23304
23305    else
23306      # If it succeeded, then it was overridden by the user. We will use it
23307      # for the tool.
23308
23309      # First remove it from the list of overridden variables, so we can test
23310      # for unknown variables in the end.
23311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23312
23313      # Check if we try to supply an empty value
23314      if test "x$DSYMUTIL" = x; then
23315        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23316$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23318$as_echo_n "checking for DSYMUTIL... " >&6; }
23319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23320$as_echo "disabled" >&6; }
23321      else
23322        # Check if the provided tool contains a complete path.
23323        tool_specified="$DSYMUTIL"
23324        tool_basename="${tool_specified##*/}"
23325        if test "x$tool_basename" = "x$tool_specified"; then
23326          # A command without a complete path is provided, search $PATH.
23327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23328$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23329          # Extract the first word of "$tool_basename", so it can be a program name with args.
23330set dummy $tool_basename; ac_word=$2
23331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23332$as_echo_n "checking for $ac_word... " >&6; }
23333if ${ac_cv_path_DSYMUTIL+:} false; then :
23334  $as_echo_n "(cached) " >&6
23335else
23336  case $DSYMUTIL in
23337  [\\/]* | ?:[\\/]*)
23338  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23339  ;;
23340  *)
23341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23342for as_dir in $PATH
23343do
23344  IFS=$as_save_IFS
23345  test -z "$as_dir" && as_dir=.
23346    for ac_exec_ext in '' $ac_executable_extensions; do
23347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23348    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23350    break 2
23351  fi
23352done
23353  done
23354IFS=$as_save_IFS
23355
23356  ;;
23357esac
23358fi
23359DSYMUTIL=$ac_cv_path_DSYMUTIL
23360if test -n "$DSYMUTIL"; then
23361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23362$as_echo "$DSYMUTIL" >&6; }
23363else
23364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23365$as_echo "no" >&6; }
23366fi
23367
23368
23369          if test "x$DSYMUTIL" = x; then
23370            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23371          fi
23372        else
23373          # Otherwise we believe it is a complete path. Use it as it is.
23374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23375$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23376          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23377$as_echo_n "checking for DSYMUTIL... " >&6; }
23378          if test ! -x "$tool_specified"; then
23379            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23380$as_echo "not found" >&6; }
23381            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23382          fi
23383          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23384$as_echo "$tool_specified" >&6; }
23385        fi
23386      fi
23387    fi
23388
23389  fi
23390
23391
23392
23393  if test "x$DSYMUTIL" = x; then
23394    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23395  fi
23396
23397
23398
23399
23400
23401  # Publish this variable in the help.
23402
23403
23404  if [ -z "${XATTR+x}" ]; then
23405    # The variable is not set by user, try to locate tool using the code snippet
23406    for ac_prog in xattr
23407do
23408  # Extract the first word of "$ac_prog", so it can be a program name with args.
23409set dummy $ac_prog; ac_word=$2
23410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23411$as_echo_n "checking for $ac_word... " >&6; }
23412if ${ac_cv_path_XATTR+:} false; then :
23413  $as_echo_n "(cached) " >&6
23414else
23415  case $XATTR in
23416  [\\/]* | ?:[\\/]*)
23417  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23418  ;;
23419  *)
23420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23421for as_dir in $PATH
23422do
23423  IFS=$as_save_IFS
23424  test -z "$as_dir" && as_dir=.
23425    for ac_exec_ext in '' $ac_executable_extensions; do
23426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23427    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23429    break 2
23430  fi
23431done
23432  done
23433IFS=$as_save_IFS
23434
23435  ;;
23436esac
23437fi
23438XATTR=$ac_cv_path_XATTR
23439if test -n "$XATTR"; then
23440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23441$as_echo "$XATTR" >&6; }
23442else
23443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23444$as_echo "no" >&6; }
23445fi
23446
23447
23448  test -n "$XATTR" && break
23449done
23450
23451  else
23452    # The variable is set, but is it from the command line or the environment?
23453
23454    # Try to remove the string !XATTR! from our list.
23455    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23456    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23457      # If it failed, the variable was not from the command line. Ignore it,
23458      # but warn the user (except for BASH, which is always set by the calling BASH).
23459      if test "xXATTR" != xBASH; then
23460        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23461$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23462      fi
23463      # Try to locate tool using the code snippet
23464      for ac_prog in xattr
23465do
23466  # Extract the first word of "$ac_prog", so it can be a program name with args.
23467set dummy $ac_prog; ac_word=$2
23468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23469$as_echo_n "checking for $ac_word... " >&6; }
23470if ${ac_cv_path_XATTR+:} false; then :
23471  $as_echo_n "(cached) " >&6
23472else
23473  case $XATTR in
23474  [\\/]* | ?:[\\/]*)
23475  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23476  ;;
23477  *)
23478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23479for as_dir in $PATH
23480do
23481  IFS=$as_save_IFS
23482  test -z "$as_dir" && as_dir=.
23483    for ac_exec_ext in '' $ac_executable_extensions; do
23484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23485    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23487    break 2
23488  fi
23489done
23490  done
23491IFS=$as_save_IFS
23492
23493  ;;
23494esac
23495fi
23496XATTR=$ac_cv_path_XATTR
23497if test -n "$XATTR"; then
23498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23499$as_echo "$XATTR" >&6; }
23500else
23501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23502$as_echo "no" >&6; }
23503fi
23504
23505
23506  test -n "$XATTR" && break
23507done
23508
23509    else
23510      # If it succeeded, then it was overridden by the user. We will use it
23511      # for the tool.
23512
23513      # First remove it from the list of overridden variables, so we can test
23514      # for unknown variables in the end.
23515      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23516
23517      # Check if we try to supply an empty value
23518      if test "x$XATTR" = x; then
23519        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23520$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23522$as_echo_n "checking for XATTR... " >&6; }
23523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23524$as_echo "disabled" >&6; }
23525      else
23526        # Check if the provided tool contains a complete path.
23527        tool_specified="$XATTR"
23528        tool_basename="${tool_specified##*/}"
23529        if test "x$tool_basename" = "x$tool_specified"; then
23530          # A command without a complete path is provided, search $PATH.
23531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23532$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23533          # Extract the first word of "$tool_basename", so it can be a program name with args.
23534set dummy $tool_basename; ac_word=$2
23535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23536$as_echo_n "checking for $ac_word... " >&6; }
23537if ${ac_cv_path_XATTR+:} false; then :
23538  $as_echo_n "(cached) " >&6
23539else
23540  case $XATTR in
23541  [\\/]* | ?:[\\/]*)
23542  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23543  ;;
23544  *)
23545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23546for as_dir in $PATH
23547do
23548  IFS=$as_save_IFS
23549  test -z "$as_dir" && as_dir=.
23550    for ac_exec_ext in '' $ac_executable_extensions; do
23551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23552    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23554    break 2
23555  fi
23556done
23557  done
23558IFS=$as_save_IFS
23559
23560  ;;
23561esac
23562fi
23563XATTR=$ac_cv_path_XATTR
23564if test -n "$XATTR"; then
23565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23566$as_echo "$XATTR" >&6; }
23567else
23568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23569$as_echo "no" >&6; }
23570fi
23571
23572
23573          if test "x$XATTR" = x; then
23574            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23575          fi
23576        else
23577          # Otherwise we believe it is a complete path. Use it as it is.
23578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23579$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23580          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23581$as_echo_n "checking for XATTR... " >&6; }
23582          if test ! -x "$tool_specified"; then
23583            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23584$as_echo "not found" >&6; }
23585            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23586          fi
23587          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23588$as_echo "$tool_specified" >&6; }
23589        fi
23590      fi
23591    fi
23592
23593  fi
23594
23595
23596
23597  if test "x$XATTR" = x; then
23598    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23599  fi
23600
23601
23602
23603
23604  # Publish this variable in the help.
23605
23606
23607  if [ -z "${CODESIGN+x}" ]; then
23608    # The variable is not set by user, try to locate tool using the code snippet
23609    for ac_prog in codesign
23610do
23611  # Extract the first word of "$ac_prog", so it can be a program name with args.
23612set dummy $ac_prog; ac_word=$2
23613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23614$as_echo_n "checking for $ac_word... " >&6; }
23615if ${ac_cv_path_CODESIGN+:} false; then :
23616  $as_echo_n "(cached) " >&6
23617else
23618  case $CODESIGN in
23619  [\\/]* | ?:[\\/]*)
23620  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23621  ;;
23622  *)
23623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23624for as_dir in $PATH
23625do
23626  IFS=$as_save_IFS
23627  test -z "$as_dir" && as_dir=.
23628    for ac_exec_ext in '' $ac_executable_extensions; do
23629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23630    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23632    break 2
23633  fi
23634done
23635  done
23636IFS=$as_save_IFS
23637
23638  ;;
23639esac
23640fi
23641CODESIGN=$ac_cv_path_CODESIGN
23642if test -n "$CODESIGN"; then
23643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23644$as_echo "$CODESIGN" >&6; }
23645else
23646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23647$as_echo "no" >&6; }
23648fi
23649
23650
23651  test -n "$CODESIGN" && break
23652done
23653
23654  else
23655    # The variable is set, but is it from the command line or the environment?
23656
23657    # Try to remove the string !CODESIGN! from our list.
23658    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23659    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23660      # If it failed, the variable was not from the command line. Ignore it,
23661      # but warn the user (except for BASH, which is always set by the calling BASH).
23662      if test "xCODESIGN" != xBASH; then
23663        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23664$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23665      fi
23666      # Try to locate tool using the code snippet
23667      for ac_prog in codesign
23668do
23669  # Extract the first word of "$ac_prog", so it can be a program name with args.
23670set dummy $ac_prog; ac_word=$2
23671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23672$as_echo_n "checking for $ac_word... " >&6; }
23673if ${ac_cv_path_CODESIGN+:} false; then :
23674  $as_echo_n "(cached) " >&6
23675else
23676  case $CODESIGN in
23677  [\\/]* | ?:[\\/]*)
23678  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23679  ;;
23680  *)
23681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23682for as_dir in $PATH
23683do
23684  IFS=$as_save_IFS
23685  test -z "$as_dir" && as_dir=.
23686    for ac_exec_ext in '' $ac_executable_extensions; do
23687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23688    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23690    break 2
23691  fi
23692done
23693  done
23694IFS=$as_save_IFS
23695
23696  ;;
23697esac
23698fi
23699CODESIGN=$ac_cv_path_CODESIGN
23700if test -n "$CODESIGN"; then
23701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23702$as_echo "$CODESIGN" >&6; }
23703else
23704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23705$as_echo "no" >&6; }
23706fi
23707
23708
23709  test -n "$CODESIGN" && break
23710done
23711
23712    else
23713      # If it succeeded, then it was overridden by the user. We will use it
23714      # for the tool.
23715
23716      # First remove it from the list of overridden variables, so we can test
23717      # for unknown variables in the end.
23718      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23719
23720      # Check if we try to supply an empty value
23721      if test "x$CODESIGN" = x; then
23722        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23723$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23724        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23725$as_echo_n "checking for CODESIGN... " >&6; }
23726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23727$as_echo "disabled" >&6; }
23728      else
23729        # Check if the provided tool contains a complete path.
23730        tool_specified="$CODESIGN"
23731        tool_basename="${tool_specified##*/}"
23732        if test "x$tool_basename" = "x$tool_specified"; then
23733          # A command without a complete path is provided, search $PATH.
23734          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23735$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23736          # Extract the first word of "$tool_basename", so it can be a program name with args.
23737set dummy $tool_basename; ac_word=$2
23738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23739$as_echo_n "checking for $ac_word... " >&6; }
23740if ${ac_cv_path_CODESIGN+:} false; then :
23741  $as_echo_n "(cached) " >&6
23742else
23743  case $CODESIGN in
23744  [\\/]* | ?:[\\/]*)
23745  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23746  ;;
23747  *)
23748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23749for as_dir in $PATH
23750do
23751  IFS=$as_save_IFS
23752  test -z "$as_dir" && as_dir=.
23753    for ac_exec_ext in '' $ac_executable_extensions; do
23754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23755    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23757    break 2
23758  fi
23759done
23760  done
23761IFS=$as_save_IFS
23762
23763  ;;
23764esac
23765fi
23766CODESIGN=$ac_cv_path_CODESIGN
23767if test -n "$CODESIGN"; then
23768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23769$as_echo "$CODESIGN" >&6; }
23770else
23771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23772$as_echo "no" >&6; }
23773fi
23774
23775
23776          if test "x$CODESIGN" = x; then
23777            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23778          fi
23779        else
23780          # Otherwise we believe it is a complete path. Use it as it is.
23781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23782$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23783          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23784$as_echo_n "checking for CODESIGN... " >&6; }
23785          if test ! -x "$tool_specified"; then
23786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23787$as_echo "not found" >&6; }
23788            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23789          fi
23790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23791$as_echo "$tool_specified" >&6; }
23792        fi
23793      fi
23794    fi
23795
23796  fi
23797
23798
23799    if test "x$CODESIGN" != "x"; then
23800      # Verify that the openjdk_codesign certificate is present
23801      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23802$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23803      rm -f codesign-testfile
23804      touch codesign-testfile
23805      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23806      rm -f codesign-testfile
23807      if test "x$CODESIGN" = x; then
23808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23809$as_echo "no" >&6; }
23810      else
23811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23812$as_echo "yes" >&6; }
23813      fi
23814    fi
23815
23816
23817
23818  # Publish this variable in the help.
23819
23820
23821  if [ -z "${SETFILE+x}" ]; then
23822    # The variable is not set by user, try to locate tool using the code snippet
23823    for ac_prog in SetFile
23824do
23825  # Extract the first word of "$ac_prog", so it can be a program name with args.
23826set dummy $ac_prog; ac_word=$2
23827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23828$as_echo_n "checking for $ac_word... " >&6; }
23829if ${ac_cv_path_SETFILE+:} false; then :
23830  $as_echo_n "(cached) " >&6
23831else
23832  case $SETFILE in
23833  [\\/]* | ?:[\\/]*)
23834  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23835  ;;
23836  *)
23837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23838for as_dir in $PATH
23839do
23840  IFS=$as_save_IFS
23841  test -z "$as_dir" && as_dir=.
23842    for ac_exec_ext in '' $ac_executable_extensions; do
23843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23844    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23846    break 2
23847  fi
23848done
23849  done
23850IFS=$as_save_IFS
23851
23852  ;;
23853esac
23854fi
23855SETFILE=$ac_cv_path_SETFILE
23856if test -n "$SETFILE"; then
23857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23858$as_echo "$SETFILE" >&6; }
23859else
23860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23861$as_echo "no" >&6; }
23862fi
23863
23864
23865  test -n "$SETFILE" && break
23866done
23867
23868  else
23869    # The variable is set, but is it from the command line or the environment?
23870
23871    # Try to remove the string !SETFILE! from our list.
23872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23874      # If it failed, the variable was not from the command line. Ignore it,
23875      # but warn the user (except for BASH, which is always set by the calling BASH).
23876      if test "xSETFILE" != xBASH; then
23877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23878$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23879      fi
23880      # Try to locate tool using the code snippet
23881      for ac_prog in SetFile
23882do
23883  # Extract the first word of "$ac_prog", so it can be a program name with args.
23884set dummy $ac_prog; ac_word=$2
23885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23886$as_echo_n "checking for $ac_word... " >&6; }
23887if ${ac_cv_path_SETFILE+:} false; then :
23888  $as_echo_n "(cached) " >&6
23889else
23890  case $SETFILE in
23891  [\\/]* | ?:[\\/]*)
23892  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23893  ;;
23894  *)
23895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23896for as_dir in $PATH
23897do
23898  IFS=$as_save_IFS
23899  test -z "$as_dir" && as_dir=.
23900    for ac_exec_ext in '' $ac_executable_extensions; do
23901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23902    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23904    break 2
23905  fi
23906done
23907  done
23908IFS=$as_save_IFS
23909
23910  ;;
23911esac
23912fi
23913SETFILE=$ac_cv_path_SETFILE
23914if test -n "$SETFILE"; then
23915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23916$as_echo "$SETFILE" >&6; }
23917else
23918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23919$as_echo "no" >&6; }
23920fi
23921
23922
23923  test -n "$SETFILE" && break
23924done
23925
23926    else
23927      # If it succeeded, then it was overridden by the user. We will use it
23928      # for the tool.
23929
23930      # First remove it from the list of overridden variables, so we can test
23931      # for unknown variables in the end.
23932      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23933
23934      # Check if we try to supply an empty value
23935      if test "x$SETFILE" = x; then
23936        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23937$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23938        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23939$as_echo_n "checking for SETFILE... " >&6; }
23940        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23941$as_echo "disabled" >&6; }
23942      else
23943        # Check if the provided tool contains a complete path.
23944        tool_specified="$SETFILE"
23945        tool_basename="${tool_specified##*/}"
23946        if test "x$tool_basename" = "x$tool_specified"; then
23947          # A command without a complete path is provided, search $PATH.
23948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23949$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23950          # Extract the first word of "$tool_basename", so it can be a program name with args.
23951set dummy $tool_basename; ac_word=$2
23952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23953$as_echo_n "checking for $ac_word... " >&6; }
23954if ${ac_cv_path_SETFILE+:} false; then :
23955  $as_echo_n "(cached) " >&6
23956else
23957  case $SETFILE in
23958  [\\/]* | ?:[\\/]*)
23959  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23960  ;;
23961  *)
23962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23963for as_dir in $PATH
23964do
23965  IFS=$as_save_IFS
23966  test -z "$as_dir" && as_dir=.
23967    for ac_exec_ext in '' $ac_executable_extensions; do
23968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23969    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23971    break 2
23972  fi
23973done
23974  done
23975IFS=$as_save_IFS
23976
23977  ;;
23978esac
23979fi
23980SETFILE=$ac_cv_path_SETFILE
23981if test -n "$SETFILE"; then
23982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23983$as_echo "$SETFILE" >&6; }
23984else
23985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23986$as_echo "no" >&6; }
23987fi
23988
23989
23990          if test "x$SETFILE" = x; then
23991            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23992          fi
23993        else
23994          # Otherwise we believe it is a complete path. Use it as it is.
23995          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23996$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23997          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23998$as_echo_n "checking for SETFILE... " >&6; }
23999          if test ! -x "$tool_specified"; then
24000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24001$as_echo "not found" >&6; }
24002            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24003          fi
24004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24005$as_echo "$tool_specified" >&6; }
24006        fi
24007      fi
24008    fi
24009
24010  fi
24011
24012
24013
24014  if test "x$SETFILE" = x; then
24015    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24016  fi
24017
24018
24019  fi
24020
24021
24022  # Test if bash supports pipefail.
24023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24024$as_echo_n "checking if bash supports pipefail... " >&6; }
24025  if ${BASH} -c 'set -o pipefail'; then
24026    BASH_ARGS="$BASH_ARGS -o pipefail"
24027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24028$as_echo "yes" >&6; }
24029  else
24030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24031$as_echo "no" >&6; }
24032  fi
24033
24034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24035$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24036  if ${BASH} -e -c 'true'; then
24037    BASH_ARGS="$BASH_ARGS -e"
24038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24039$as_echo "yes" >&6; }
24040  else
24041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24042$as_echo "no" >&6; }
24043  fi
24044
24045
24046
24047
24048# Check if pkg-config is available.
24049
24050
24051if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24052	if test -n "$ac_tool_prefix"; then
24053  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24054set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24056$as_echo_n "checking for $ac_word... " >&6; }
24057if ${ac_cv_path_PKG_CONFIG+:} false; then :
24058  $as_echo_n "(cached) " >&6
24059else
24060  case $PKG_CONFIG in
24061  [\\/]* | ?:[\\/]*)
24062  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24063  ;;
24064  *)
24065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24066for as_dir in $PATH
24067do
24068  IFS=$as_save_IFS
24069  test -z "$as_dir" && as_dir=.
24070    for ac_exec_ext in '' $ac_executable_extensions; do
24071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24072    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24074    break 2
24075  fi
24076done
24077  done
24078IFS=$as_save_IFS
24079
24080  ;;
24081esac
24082fi
24083PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24084if test -n "$PKG_CONFIG"; then
24085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24086$as_echo "$PKG_CONFIG" >&6; }
24087else
24088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24089$as_echo "no" >&6; }
24090fi
24091
24092
24093fi
24094if test -z "$ac_cv_path_PKG_CONFIG"; then
24095  ac_pt_PKG_CONFIG=$PKG_CONFIG
24096  # Extract the first word of "pkg-config", so it can be a program name with args.
24097set dummy pkg-config; ac_word=$2
24098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24099$as_echo_n "checking for $ac_word... " >&6; }
24100if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24101  $as_echo_n "(cached) " >&6
24102else
24103  case $ac_pt_PKG_CONFIG in
24104  [\\/]* | ?:[\\/]*)
24105  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24106  ;;
24107  *)
24108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24109for as_dir in $PATH
24110do
24111  IFS=$as_save_IFS
24112  test -z "$as_dir" && as_dir=.
24113    for ac_exec_ext in '' $ac_executable_extensions; do
24114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24115    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24117    break 2
24118  fi
24119done
24120  done
24121IFS=$as_save_IFS
24122
24123  ;;
24124esac
24125fi
24126ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24127if test -n "$ac_pt_PKG_CONFIG"; then
24128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24129$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24130else
24131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24132$as_echo "no" >&6; }
24133fi
24134
24135  if test "x$ac_pt_PKG_CONFIG" = x; then
24136    PKG_CONFIG=""
24137  else
24138    case $cross_compiling:$ac_tool_warned in
24139yes:)
24140{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24141$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24142ac_tool_warned=yes ;;
24143esac
24144    PKG_CONFIG=$ac_pt_PKG_CONFIG
24145  fi
24146else
24147  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24148fi
24149
24150fi
24151if test -n "$PKG_CONFIG"; then
24152	_pkg_min_version=0.9.0
24153	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24154$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24155	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24156		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24157$as_echo "yes" >&6; }
24158	else
24159		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24160$as_echo "no" >&6; }
24161		PKG_CONFIG=""
24162	fi
24163
24164fi
24165
24166# After basic tools have been setup, we can check build os specific details.
24167
24168  ###############################################################################
24169
24170  # Note that this is the build platform OS version!
24171
24172  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24173  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24174  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24175  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24176
24177
24178
24179
24180
24181# Misc basic settings
24182
24183
24184# Check whether --with-default-make-target was given.
24185if test "${with_default_make_target+set}" = set; then :
24186  withval=$with_default_make_target;
24187fi
24188
24189  if test "x$with_default_make_target" = "x" \
24190      || test "x$with_default_make_target" = "xyes"; then
24191    DEFAULT_MAKE_TARGET="exploded-image"
24192  elif test "x$with_default_make_target" = "xno"; then
24193    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24194  else
24195    DEFAULT_MAKE_TARGET="$with_default_make_target"
24196  fi
24197
24198
24199
24200
24201###############################################################################
24202#
24203# Determine OpenJDK variants, options and version numbers.
24204#
24205###############################################################################
24206
24207# We need build & target for this.
24208
24209  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
24210  # We always build headless support.
24211  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
24212$as_echo_n "checking headful support... " >&6; }
24213  # Check whether --enable-headful was given.
24214if test "${enable_headful+set}" = set; then :
24215  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
24216else
24217  SUPPORT_HEADFUL=yes
24218fi
24219
24220
24221  SUPPORT_HEADLESS=yes
24222  BUILD_HEADLESS="BUILD_HEADLESS:=true"
24223
24224  if test "x$SUPPORT_HEADFUL" = xyes; then
24225    # We are building both headful and headless.
24226    headful_msg="include support for both headful and headless"
24227  fi
24228
24229  if test "x$SUPPORT_HEADFUL" = xno; then
24230    # Thus we are building headless only.
24231    BUILD_HEADLESS="BUILD_HEADLESS:=true"
24232    headful_msg="headless only"
24233  fi
24234
24235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
24236$as_echo "$headful_msg" >&6; }
24237
24238
24239
24240
24241
24242  # Choose cacerts source file
24243
24244# Check whether --with-cacerts-file was given.
24245if test "${with_cacerts_file+set}" = set; then :
24246  withval=$with_cacerts_file;
24247fi
24248
24249  if test "x$with_cacerts_file" != x; then
24250    CACERTS_FILE=$with_cacerts_file
24251  fi
24252
24253
24254  # Enable or disable unlimited crypto
24255  # Check whether --enable-unlimited-crypto was given.
24256if test "${enable_unlimited_crypto+set}" = set; then :
24257  enableval=$enable_unlimited_crypto;
24258else
24259  enable_unlimited_crypto=no
24260fi
24261
24262  if test "x$enable_unlimited_crypto" = "xyes"; then
24263    UNLIMITED_CRYPTO=true
24264  else
24265    UNLIMITED_CRYPTO=false
24266  fi
24267
24268
24269  # Should we build the serviceability agent (SA)?
24270  INCLUDE_SA=true
24271  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24272    INCLUDE_SA=false
24273  fi
24274  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24275    INCLUDE_SA=false
24276  fi
24277
24278
24279  # Compress jars
24280  COMPRESS_JARS=false
24281
24282
24283
24284  # Setup default copyright year. Mostly overridden when building close to a new year.
24285
24286# Check whether --with-copyright-year was given.
24287if test "${with_copyright_year+set}" = set; then :
24288  withval=$with_copyright_year;
24289fi
24290
24291  if test "x$with_copyright_year" = xyes; then
24292    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24293  elif test "x$with_copyright_year" != x; then
24294    COPYRIGHT_YEAR="$with_copyright_year"
24295  else
24296    COPYRIGHT_YEAR=`date +'%Y'`
24297  fi
24298
24299
24300
24301  # Check whether --enable-keep-packaged-modules was given.
24302if test "${enable_keep_packaged_modules+set}" = set; then :
24303  enableval=$enable_keep_packaged_modules;
24304fi
24305
24306
24307  if test "x$enable_keep_packaged_modules" = "xyes"; then
24308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24309$as_echo_n "checking if packaged modules are kept... " >&6; }
24310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24311$as_echo "yes" >&6; }
24312    JLINK_KEEP_PACKAGED_MODULES=true
24313  elif test "x$enable_keep_packaged_modules" = "xno"; then
24314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24315$as_echo_n "checking if packaged modules are kept... " >&6; }
24316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24317$as_echo "no" >&6; }
24318    JLINK_KEEP_PACKAGED_MODULES=false
24319  elif test "x$enable_keep_packaged_modules" = "x"; then
24320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24321$as_echo "yes (default)" >&6; }
24322    JLINK_KEEP_PACKAGED_MODULES=true
24323  else
24324    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24325  fi
24326
24327
24328
24329
24330  # Warn user that old version arguments are deprecated.
24331
24332
24333# Check whether --with-milestone was given.
24334if test "${with_milestone+set}" = set; then :
24335  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24336$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24337fi
24338
24339
24340
24341
24342# Check whether --with-update-version was given.
24343if test "${with_update_version+set}" = set; then :
24344  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24345$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24346fi
24347
24348
24349
24350
24351# Check whether --with-user-release-suffix was given.
24352if test "${with_user_release_suffix+set}" = set; then :
24353  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
24354$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24355fi
24356
24357
24358
24359
24360# Check whether --with-build-number was given.
24361if test "${with_build_number+set}" = set; then :
24362  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24363$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24364fi
24365
24366
24367
24368  # Source the version numbers file
24369  . $AUTOCONF_DIR/version-numbers
24370
24371  # Some non-version number information is set in that file
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381  # Override version from arguments
24382
24383  # If --with-version-string is set, process it first. It is possible to
24384  # override parts with more specific flags, since these are processed later.
24385
24386# Check whether --with-version-string was given.
24387if test "${with_version_string+set}" = set; then :
24388  withval=$with_version_string;
24389fi
24390
24391  if test "x$with_version_string" = xyes; then
24392    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24393  elif test "x$with_version_string" != x; then
24394    # Additional [] needed to keep m4 from mangling shell constructs.
24395    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24396      VERSION_MAJOR=${BASH_REMATCH[1]}
24397      VERSION_MINOR=${BASH_REMATCH[3]}
24398      VERSION_SECURITY=${BASH_REMATCH[5]}
24399      VERSION_PATCH=${BASH_REMATCH[7]}
24400      VERSION_PRE=${BASH_REMATCH[9]}
24401      version_plus_separator=${BASH_REMATCH[11]}
24402      VERSION_BUILD=${BASH_REMATCH[12]}
24403      VERSION_OPT=${BASH_REMATCH[14]}
24404      # Unspecified numerical fields are interpreted as 0.
24405      if test "x$VERSION_MINOR" = x; then
24406        VERSION_MINOR=0
24407      fi
24408      if test "x$VERSION_SECURITY" = x; then
24409        VERSION_SECURITY=0
24410      fi
24411      if test "x$VERSION_PATCH" = x; then
24412        VERSION_PATCH=0
24413      fi
24414      if test "x$version_plus_separator" != x \
24415          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24416        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24417      fi
24418      # Stop the version part process from setting default values.
24419      # We still allow them to explicitely override though.
24420      NO_DEFAULT_VERSION_PARTS=true
24421    else
24422      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24423    fi
24424  fi
24425
24426
24427# Check whether --with-version-pre was given.
24428if test "${with_version_pre+set}" = set; then :
24429  withval=$with_version_pre; with_version_pre_present=true
24430else
24431  with_version_pre_present=false
24432fi
24433
24434
24435  if test "x$with_version_pre_present" = xtrue; then
24436    if test "x$with_version_pre" = xyes; then
24437      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24438    elif test "x$with_version_pre" = xno; then
24439      # Interpret --without-* as empty string instead of the literal "no"
24440      VERSION_PRE=
24441    else
24442      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24443       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24444      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24446$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24447      fi
24448    fi
24449  else
24450    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24451      # Default is to use "internal" as pre
24452      VERSION_PRE="internal"
24453    fi
24454  fi
24455
24456
24457# Check whether --with-version-opt was given.
24458if test "${with_version_opt+set}" = set; then :
24459  withval=$with_version_opt; with_version_opt_present=true
24460else
24461  with_version_opt_present=false
24462fi
24463
24464
24465  if test "x$with_version_opt_present" = xtrue; then
24466    if test "x$with_version_opt" = xyes; then
24467      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24468    elif test "x$with_version_opt" = xno; then
24469      # Interpret --without-* as empty string instead of the literal "no"
24470      VERSION_OPT=
24471    else
24472      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24473       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24474      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24476$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24477      fi
24478    fi
24479  else
24480    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24481      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24482      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24483      # Outer [ ] to quote m4.
24484       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24485      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24486    fi
24487  fi
24488
24489
24490# Check whether --with-version-build was given.
24491if test "${with_version_build+set}" = set; then :
24492  withval=$with_version_build; with_version_build_present=true
24493else
24494  with_version_build_present=false
24495fi
24496
24497
24498  if test "x$with_version_build_present" = xtrue; then
24499    if test "x$with_version_build" = xyes; then
24500      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24501    elif test "x$with_version_build" = xno; then
24502      # Interpret --without-* as empty string instead of the literal "no"
24503      VERSION_BUILD=
24504    elif test "x$with_version_build" = x; then
24505      VERSION_BUILD=
24506    else
24507
24508  # Additional [] needed to keep m4 from mangling shell constructs.
24509  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24510    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24511  fi
24512  # Extract the version number without leading zeros.
24513  cleaned_value=${BASH_REMATCH[1]}
24514  if test "x$cleaned_value" = x; then
24515    # Special case for zero
24516    cleaned_value=${BASH_REMATCH[2]}
24517  fi
24518
24519  if test $cleaned_value -gt 255; then
24520    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24521  fi
24522  if test "x$cleaned_value" != "x$with_version_build"; then
24523    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24524$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24525  fi
24526  VERSION_BUILD=$cleaned_value
24527
24528    fi
24529  else
24530    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24531      # Default is to not have a build number.
24532      VERSION_BUILD=""
24533      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24534      VERSION_BUILD=0
24535    fi
24536  fi
24537
24538
24539# Check whether --with-version-major was given.
24540if test "${with_version_major+set}" = set; then :
24541  withval=$with_version_major; with_version_major_present=true
24542else
24543  with_version_major_present=false
24544fi
24545
24546
24547  if test "x$with_version_major_present" = xtrue; then
24548    if test "x$with_version_major" = xyes; then
24549      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24550    else
24551
24552  # Additional [] needed to keep m4 from mangling shell constructs.
24553  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24554    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24555  fi
24556  # Extract the version number without leading zeros.
24557  cleaned_value=${BASH_REMATCH[1]}
24558  if test "x$cleaned_value" = x; then
24559    # Special case for zero
24560    cleaned_value=${BASH_REMATCH[2]}
24561  fi
24562
24563  if test $cleaned_value -gt 255; then
24564    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24565  fi
24566  if test "x$cleaned_value" != "x$with_version_major"; then
24567    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24568$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24569  fi
24570  VERSION_MAJOR=$cleaned_value
24571
24572    fi
24573  else
24574    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24575      # Default is to get value from version-numbers
24576      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24577    fi
24578  fi
24579
24580
24581# Check whether --with-version-minor was given.
24582if test "${with_version_minor+set}" = set; then :
24583  withval=$with_version_minor; with_version_minor_present=true
24584else
24585  with_version_minor_present=false
24586fi
24587
24588
24589  if test "x$with_version_minor_present" = xtrue; then
24590    if test "x$with_version_minor" = xyes; then
24591      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24592    elif test "x$with_version_minor" = xno; then
24593      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24594      VERSION_MINOR=0
24595    elif test "x$with_version_minor" = x; then
24596      VERSION_MINOR=0
24597    else
24598
24599  # Additional [] needed to keep m4 from mangling shell constructs.
24600  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24601    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24602  fi
24603  # Extract the version number without leading zeros.
24604  cleaned_value=${BASH_REMATCH[1]}
24605  if test "x$cleaned_value" = x; then
24606    # Special case for zero
24607    cleaned_value=${BASH_REMATCH[2]}
24608  fi
24609
24610  if test $cleaned_value -gt 255; then
24611    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24612  fi
24613  if test "x$cleaned_value" != "x$with_version_minor"; then
24614    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24615$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24616  fi
24617  VERSION_MINOR=$cleaned_value
24618
24619    fi
24620  else
24621    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24622      # Default is 0, if unspecified
24623      VERSION_MINOR=0
24624    fi
24625  fi
24626
24627
24628# Check whether --with-version-security was given.
24629if test "${with_version_security+set}" = set; then :
24630  withval=$with_version_security; with_version_security_present=true
24631else
24632  with_version_security_present=false
24633fi
24634
24635
24636  if test "x$with_version_security_present" = xtrue; then
24637    if test "x$with_version_security" = xyes; then
24638      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24639    elif test "x$with_version_security" = xno; then
24640      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24641      VERSION_SECURITY=0
24642    elif test "x$with_version_security" = x; then
24643      VERSION_SECURITY=0
24644    else
24645
24646  # Additional [] needed to keep m4 from mangling shell constructs.
24647  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24648    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24649  fi
24650  # Extract the version number without leading zeros.
24651  cleaned_value=${BASH_REMATCH[1]}
24652  if test "x$cleaned_value" = x; then
24653    # Special case for zero
24654    cleaned_value=${BASH_REMATCH[2]}
24655  fi
24656
24657  if test $cleaned_value -gt 255; then
24658    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24659  fi
24660  if test "x$cleaned_value" != "x$with_version_security"; then
24661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24662$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24663  fi
24664  VERSION_SECURITY=$cleaned_value
24665
24666    fi
24667  else
24668    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24669      # Default is 0, if unspecified
24670      VERSION_SECURITY=0
24671    fi
24672  fi
24673
24674
24675# Check whether --with-version-patch was given.
24676if test "${with_version_patch+set}" = set; then :
24677  withval=$with_version_patch; with_version_patch_present=true
24678else
24679  with_version_patch_present=false
24680fi
24681
24682
24683  if test "x$with_version_patch_present" = xtrue; then
24684    if test "x$with_version_patch" = xyes; then
24685      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24686    elif test "x$with_version_patch" = xno; then
24687      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24688      VERSION_PATCH=0
24689    elif test "x$with_version_patch" = x; then
24690      VERSION_PATCH=0
24691    else
24692
24693  # Additional [] needed to keep m4 from mangling shell constructs.
24694  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24695    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24696  fi
24697  # Extract the version number without leading zeros.
24698  cleaned_value=${BASH_REMATCH[1]}
24699  if test "x$cleaned_value" = x; then
24700    # Special case for zero
24701    cleaned_value=${BASH_REMATCH[2]}
24702  fi
24703
24704  if test $cleaned_value -gt 255; then
24705    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24706  fi
24707  if test "x$cleaned_value" != "x$with_version_patch"; then
24708    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24709$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24710  fi
24711  VERSION_PATCH=$cleaned_value
24712
24713    fi
24714  else
24715    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24716      # Default is 0, if unspecified
24717      VERSION_PATCH=0
24718    fi
24719  fi
24720
24721  # Calculate derived version properties
24722
24723  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24724  if test "x$VERSION_PRE" = x; then
24725    VERSION_IS_GA=true
24726  else
24727    VERSION_IS_GA=false
24728  fi
24729
24730  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24731  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24732
24733  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24734  # Strip trailing zeroes from stripped_version_number
24735  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24736  VERSION_NUMBER=$stripped_version_number
24737
24738  # The complete version string, with additional build information
24739  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24740    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24741  else
24742    # If either build or opt is set, we need a + separator
24743    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24744  fi
24745
24746  # The short version string, just VERSION_NUMBER and PRE, if present.
24747  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24748
24749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24750$as_echo_n "checking for version string... " >&6; }
24751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24752$as_echo "$VERSION_STRING" >&6; }
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768###############################################################################
24769#
24770# Setup BootJDK, used to bootstrap the build.
24771#
24772###############################################################################
24773
24774
24775  BOOT_JDK_FOUND=no
24776
24777# Check whether --with-boot-jdk was given.
24778if test "${with_boot_jdk+set}" = set; then :
24779  withval=$with_boot_jdk;
24780fi
24781
24782
24783  # We look for the Boot JDK through various means, going from more certain to
24784  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24785  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24786  # must check if this is indeed valid; otherwise we'll continue looking.
24787
24788  # Test: Is bootjdk explicitely set by command line arguments?
24789
24790  if test "x$BOOT_JDK_FOUND" = xno; then
24791    # Now execute the test
24792
24793  if test "x$with_boot_jdk" != x; then
24794    BOOT_JDK=$with_boot_jdk
24795    BOOT_JDK_FOUND=maybe
24796    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24797$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24798  fi
24799
24800
24801    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24802    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24803      # Do we have a bin/java?
24804      if test ! -x "$BOOT_JDK/bin/java"; then
24805        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24807        BOOT_JDK_FOUND=no
24808      else
24809        # Do we have a bin/javac?
24810        if test ! -x "$BOOT_JDK/bin/javac"; then
24811          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24813          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24814$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24815          BOOT_JDK_FOUND=no
24816        else
24817          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24818          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24819
24820          # Extra M4 quote needed to protect [] in grep expression.
24821          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24822          if test "x$FOUND_CORRECT_VERSION" = x; then
24823            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24825            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24826$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24827            BOOT_JDK_FOUND=no
24828          else
24829            # We're done! :-)
24830            BOOT_JDK_FOUND=yes
24831
24832  # Only process if variable expands to non-empty
24833
24834  if test "x$BOOT_JDK" != x; then
24835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24836
24837  # Input might be given as Windows format, start by converting to
24838  # unix format.
24839  path="$BOOT_JDK"
24840  new_path=`$CYGPATH -u "$path"`
24841
24842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24845  # "foo.exe" is OK but "foo" is an error.
24846  #
24847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24848  # It is also a way to make sure we got the proper file name for the real test later on.
24849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24850  if test "x$test_shortpath" = x; then
24851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24852$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24853    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24854  fi
24855
24856  # Call helper function which possibly converts this using DOS-style short mode.
24857  # If so, the updated path is stored in $new_path.
24858
24859  input_path="$new_path"
24860  # Check if we need to convert this using DOS-style short mode. If the path
24861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24862  # take no chances and rewrite it.
24863  # Note: m4 eats our [], so we need to use [ and ] instead.
24864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24865  if test "x$has_forbidden_chars" != x; then
24866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24870      # Going to short mode and back again did indeed matter. Since short mode is
24871      # case insensitive, let's make it lowercase to improve readability.
24872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24873      # Now convert it back to Unix-style (cygpath)
24874      input_path=`$CYGPATH -u "$shortmode_path"`
24875      new_path="$input_path"
24876    fi
24877  fi
24878
24879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24880  if test "x$test_cygdrive_prefix" = x; then
24881    # As a simple fix, exclude /usr/bin since it's not a real path.
24882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24884      # a path prefixed by /cygdrive for fixpath to work.
24885      new_path="$CYGWIN_ROOT_PATH$input_path"
24886    fi
24887  fi
24888
24889
24890  if test "x$path" != "x$new_path"; then
24891    BOOT_JDK="$new_path"
24892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24894  fi
24895
24896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24897
24898  path="$BOOT_JDK"
24899  has_colon=`$ECHO $path | $GREP ^.:`
24900  new_path="$path"
24901  if test "x$has_colon" = x; then
24902    # Not in mixed or Windows style, start by that.
24903    new_path=`cmd //c echo $path`
24904  fi
24905
24906
24907  input_path="$new_path"
24908  # Check if we need to convert this using DOS-style short mode. If the path
24909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24910  # take no chances and rewrite it.
24911  # Note: m4 eats our [], so we need to use [ and ] instead.
24912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24913  if test "x$has_forbidden_chars" != x; then
24914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24916  fi
24917
24918
24919  windows_path="$new_path"
24920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24921    unix_path=`$CYGPATH -u "$windows_path"`
24922    new_path="$unix_path"
24923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24925    new_path="$unix_path"
24926  fi
24927
24928  if test "x$path" != "x$new_path"; then
24929    BOOT_JDK="$new_path"
24930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24931$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24932  fi
24933
24934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24936
24937    else
24938      # We're on a unix platform. Hooray! :)
24939      path="$BOOT_JDK"
24940      has_space=`$ECHO "$path" | $GREP " "`
24941      if test "x$has_space" != x; then
24942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24943$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24944        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24945      fi
24946
24947      # Use eval to expand a potential ~
24948      eval path="$path"
24949      if test ! -f "$path" && test ! -d "$path"; then
24950        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24951      fi
24952
24953      if test -d "$path"; then
24954        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24955      else
24956        dir="`$DIRNAME "$path"`"
24957        base="`$BASENAME "$path"`"
24958        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24959      fi
24960    fi
24961  fi
24962
24963            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24964$as_echo_n "checking for Boot JDK... " >&6; }
24965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24966$as_echo "$BOOT_JDK" >&6; }
24967            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24968$as_echo_n "checking Boot JDK version... " >&6; }
24969            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24970            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24971$as_echo "$BOOT_JDK_VERSION" >&6; }
24972          fi # end check jdk version
24973        fi # end check javac
24974      fi # end check java
24975    fi # end check boot jdk found
24976  fi
24977
24978  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24979    # Having specified an argument which is incorrect will produce an instant failure;
24980    # we should not go on looking
24981    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24982  fi
24983
24984  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24985
24986  if test "x$BOOT_JDK_FOUND" = xno; then
24987    # Now execute the test
24988
24989  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24990    # First check at user selected default
24991
24992  if test "x$BOOT_JDK_FOUND" = xno; then
24993    # Now execute the test
24994
24995  if test -x /usr/libexec/java_home; then
24996    BOOT_JDK=`/usr/libexec/java_home `
24997    BOOT_JDK_FOUND=maybe
24998    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24999$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25000  fi
25001
25002
25003    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25004    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25005      # Do we have a bin/java?
25006      if test ! -x "$BOOT_JDK/bin/java"; then
25007        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25009        BOOT_JDK_FOUND=no
25010      else
25011        # Do we have a bin/javac?
25012        if test ! -x "$BOOT_JDK/bin/javac"; then
25013          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25015          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25016$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25017          BOOT_JDK_FOUND=no
25018        else
25019          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25020          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25021
25022          # Extra M4 quote needed to protect [] in grep expression.
25023          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25024          if test "x$FOUND_CORRECT_VERSION" = x; then
25025            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25027            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25028$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25029            BOOT_JDK_FOUND=no
25030          else
25031            # We're done! :-)
25032            BOOT_JDK_FOUND=yes
25033
25034  # Only process if variable expands to non-empty
25035
25036  if test "x$BOOT_JDK" != x; then
25037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25038
25039  # Input might be given as Windows format, start by converting to
25040  # unix format.
25041  path="$BOOT_JDK"
25042  new_path=`$CYGPATH -u "$path"`
25043
25044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25047  # "foo.exe" is OK but "foo" is an error.
25048  #
25049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25050  # It is also a way to make sure we got the proper file name for the real test later on.
25051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25052  if test "x$test_shortpath" = x; then
25053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25054$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25055    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25056  fi
25057
25058  # Call helper function which possibly converts this using DOS-style short mode.
25059  # If so, the updated path is stored in $new_path.
25060
25061  input_path="$new_path"
25062  # Check if we need to convert this using DOS-style short mode. If the path
25063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25064  # take no chances and rewrite it.
25065  # Note: m4 eats our [], so we need to use [ and ] instead.
25066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25067  if test "x$has_forbidden_chars" != x; then
25068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25072      # Going to short mode and back again did indeed matter. Since short mode is
25073      # case insensitive, let's make it lowercase to improve readability.
25074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25075      # Now convert it back to Unix-style (cygpath)
25076      input_path=`$CYGPATH -u "$shortmode_path"`
25077      new_path="$input_path"
25078    fi
25079  fi
25080
25081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25082  if test "x$test_cygdrive_prefix" = x; then
25083    # As a simple fix, exclude /usr/bin since it's not a real path.
25084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25086      # a path prefixed by /cygdrive for fixpath to work.
25087      new_path="$CYGWIN_ROOT_PATH$input_path"
25088    fi
25089  fi
25090
25091
25092  if test "x$path" != "x$new_path"; then
25093    BOOT_JDK="$new_path"
25094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25096  fi
25097
25098    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25099
25100  path="$BOOT_JDK"
25101  has_colon=`$ECHO $path | $GREP ^.:`
25102  new_path="$path"
25103  if test "x$has_colon" = x; then
25104    # Not in mixed or Windows style, start by that.
25105    new_path=`cmd //c echo $path`
25106  fi
25107
25108
25109  input_path="$new_path"
25110  # Check if we need to convert this using DOS-style short mode. If the path
25111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25112  # take no chances and rewrite it.
25113  # Note: m4 eats our [], so we need to use [ and ] instead.
25114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25115  if test "x$has_forbidden_chars" != x; then
25116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25118  fi
25119
25120
25121  windows_path="$new_path"
25122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25123    unix_path=`$CYGPATH -u "$windows_path"`
25124    new_path="$unix_path"
25125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25127    new_path="$unix_path"
25128  fi
25129
25130  if test "x$path" != "x$new_path"; then
25131    BOOT_JDK="$new_path"
25132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25133$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25134  fi
25135
25136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25138
25139    else
25140      # We're on a unix platform. Hooray! :)
25141      path="$BOOT_JDK"
25142      has_space=`$ECHO "$path" | $GREP " "`
25143      if test "x$has_space" != x; then
25144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25145$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25146        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25147      fi
25148
25149      # Use eval to expand a potential ~
25150      eval path="$path"
25151      if test ! -f "$path" && test ! -d "$path"; then
25152        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25153      fi
25154
25155      if test -d "$path"; then
25156        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25157      else
25158        dir="`$DIRNAME "$path"`"
25159        base="`$BASENAME "$path"`"
25160        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25161      fi
25162    fi
25163  fi
25164
25165            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25166$as_echo_n "checking for Boot JDK... " >&6; }
25167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25168$as_echo "$BOOT_JDK" >&6; }
25169            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25170$as_echo_n "checking Boot JDK version... " >&6; }
25171            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25173$as_echo "$BOOT_JDK_VERSION" >&6; }
25174          fi # end check jdk version
25175        fi # end check javac
25176      fi # end check java
25177    fi # end check boot jdk found
25178  fi
25179
25180    # If that did not work out (e.g. too old), try explicit versions instead
25181
25182  if test "x$BOOT_JDK_FOUND" = xno; then
25183    # Now execute the test
25184
25185  if test -x /usr/libexec/java_home; then
25186    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25187    BOOT_JDK_FOUND=maybe
25188    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25189$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25190  fi
25191
25192
25193    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25194    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25195      # Do we have a bin/java?
25196      if test ! -x "$BOOT_JDK/bin/java"; then
25197        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25199        BOOT_JDK_FOUND=no
25200      else
25201        # Do we have a bin/javac?
25202        if test ! -x "$BOOT_JDK/bin/javac"; then
25203          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25205          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25206$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25207          BOOT_JDK_FOUND=no
25208        else
25209          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25210          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25211
25212          # Extra M4 quote needed to protect [] in grep expression.
25213          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25214          if test "x$FOUND_CORRECT_VERSION" = x; then
25215            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25217            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25218$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25219            BOOT_JDK_FOUND=no
25220          else
25221            # We're done! :-)
25222            BOOT_JDK_FOUND=yes
25223
25224  # Only process if variable expands to non-empty
25225
25226  if test "x$BOOT_JDK" != x; then
25227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25228
25229  # Input might be given as Windows format, start by converting to
25230  # unix format.
25231  path="$BOOT_JDK"
25232  new_path=`$CYGPATH -u "$path"`
25233
25234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25237  # "foo.exe" is OK but "foo" is an error.
25238  #
25239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25240  # It is also a way to make sure we got the proper file name for the real test later on.
25241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25242  if test "x$test_shortpath" = x; then
25243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25244$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25245    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25246  fi
25247
25248  # Call helper function which possibly converts this using DOS-style short mode.
25249  # If so, the updated path is stored in $new_path.
25250
25251  input_path="$new_path"
25252  # Check if we need to convert this using DOS-style short mode. If the path
25253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25254  # take no chances and rewrite it.
25255  # Note: m4 eats our [], so we need to use [ and ] instead.
25256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25257  if test "x$has_forbidden_chars" != x; then
25258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25262      # Going to short mode and back again did indeed matter. Since short mode is
25263      # case insensitive, let's make it lowercase to improve readability.
25264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25265      # Now convert it back to Unix-style (cygpath)
25266      input_path=`$CYGPATH -u "$shortmode_path"`
25267      new_path="$input_path"
25268    fi
25269  fi
25270
25271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25272  if test "x$test_cygdrive_prefix" = x; then
25273    # As a simple fix, exclude /usr/bin since it's not a real path.
25274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25276      # a path prefixed by /cygdrive for fixpath to work.
25277      new_path="$CYGWIN_ROOT_PATH$input_path"
25278    fi
25279  fi
25280
25281
25282  if test "x$path" != "x$new_path"; then
25283    BOOT_JDK="$new_path"
25284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25285$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25286  fi
25287
25288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25289
25290  path="$BOOT_JDK"
25291  has_colon=`$ECHO $path | $GREP ^.:`
25292  new_path="$path"
25293  if test "x$has_colon" = x; then
25294    # Not in mixed or Windows style, start by that.
25295    new_path=`cmd //c echo $path`
25296  fi
25297
25298
25299  input_path="$new_path"
25300  # Check if we need to convert this using DOS-style short mode. If the path
25301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25302  # take no chances and rewrite it.
25303  # Note: m4 eats our [], so we need to use [ and ] instead.
25304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25305  if test "x$has_forbidden_chars" != x; then
25306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25308  fi
25309
25310
25311  windows_path="$new_path"
25312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25313    unix_path=`$CYGPATH -u "$windows_path"`
25314    new_path="$unix_path"
25315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25317    new_path="$unix_path"
25318  fi
25319
25320  if test "x$path" != "x$new_path"; then
25321    BOOT_JDK="$new_path"
25322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25323$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25324  fi
25325
25326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25328
25329    else
25330      # We're on a unix platform. Hooray! :)
25331      path="$BOOT_JDK"
25332      has_space=`$ECHO "$path" | $GREP " "`
25333      if test "x$has_space" != x; then
25334        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25335$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25336        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25337      fi
25338
25339      # Use eval to expand a potential ~
25340      eval path="$path"
25341      if test ! -f "$path" && test ! -d "$path"; then
25342        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25343      fi
25344
25345      if test -d "$path"; then
25346        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25347      else
25348        dir="`$DIRNAME "$path"`"
25349        base="`$BASENAME "$path"`"
25350        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25351      fi
25352    fi
25353  fi
25354
25355            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25356$as_echo_n "checking for Boot JDK... " >&6; }
25357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25358$as_echo "$BOOT_JDK" >&6; }
25359            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25360$as_echo_n "checking Boot JDK version... " >&6; }
25361            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25363$as_echo "$BOOT_JDK_VERSION" >&6; }
25364          fi # end check jdk version
25365        fi # end check javac
25366      fi # end check java
25367    fi # end check boot jdk found
25368  fi
25369
25370
25371  if test "x$BOOT_JDK_FOUND" = xno; then
25372    # Now execute the test
25373
25374  if test -x /usr/libexec/java_home; then
25375    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25376    BOOT_JDK_FOUND=maybe
25377    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25378$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25379  fi
25380
25381
25382    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25383    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25384      # Do we have a bin/java?
25385      if test ! -x "$BOOT_JDK/bin/java"; then
25386        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25388        BOOT_JDK_FOUND=no
25389      else
25390        # Do we have a bin/javac?
25391        if test ! -x "$BOOT_JDK/bin/javac"; then
25392          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25394          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25395$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25396          BOOT_JDK_FOUND=no
25397        else
25398          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25399          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25400
25401          # Extra M4 quote needed to protect [] in grep expression.
25402          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25403          if test "x$FOUND_CORRECT_VERSION" = x; then
25404            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25406            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25407$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25408            BOOT_JDK_FOUND=no
25409          else
25410            # We're done! :-)
25411            BOOT_JDK_FOUND=yes
25412
25413  # Only process if variable expands to non-empty
25414
25415  if test "x$BOOT_JDK" != x; then
25416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25417
25418  # Input might be given as Windows format, start by converting to
25419  # unix format.
25420  path="$BOOT_JDK"
25421  new_path=`$CYGPATH -u "$path"`
25422
25423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25426  # "foo.exe" is OK but "foo" is an error.
25427  #
25428  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25429  # It is also a way to make sure we got the proper file name for the real test later on.
25430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25431  if test "x$test_shortpath" = x; then
25432    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25433$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25434    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25435  fi
25436
25437  # Call helper function which possibly converts this using DOS-style short mode.
25438  # If so, the updated path is stored in $new_path.
25439
25440  input_path="$new_path"
25441  # Check if we need to convert this using DOS-style short mode. If the path
25442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25443  # take no chances and rewrite it.
25444  # Note: m4 eats our [], so we need to use [ and ] instead.
25445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25446  if test "x$has_forbidden_chars" != x; then
25447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25451      # Going to short mode and back again did indeed matter. Since short mode is
25452      # case insensitive, let's make it lowercase to improve readability.
25453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25454      # Now convert it back to Unix-style (cygpath)
25455      input_path=`$CYGPATH -u "$shortmode_path"`
25456      new_path="$input_path"
25457    fi
25458  fi
25459
25460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25461  if test "x$test_cygdrive_prefix" = x; then
25462    # As a simple fix, exclude /usr/bin since it's not a real path.
25463    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25465      # a path prefixed by /cygdrive for fixpath to work.
25466      new_path="$CYGWIN_ROOT_PATH$input_path"
25467    fi
25468  fi
25469
25470
25471  if test "x$path" != "x$new_path"; then
25472    BOOT_JDK="$new_path"
25473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25474$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25475  fi
25476
25477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25478
25479  path="$BOOT_JDK"
25480  has_colon=`$ECHO $path | $GREP ^.:`
25481  new_path="$path"
25482  if test "x$has_colon" = x; then
25483    # Not in mixed or Windows style, start by that.
25484    new_path=`cmd //c echo $path`
25485  fi
25486
25487
25488  input_path="$new_path"
25489  # Check if we need to convert this using DOS-style short mode. If the path
25490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25491  # take no chances and rewrite it.
25492  # Note: m4 eats our [], so we need to use [ and ] instead.
25493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25494  if test "x$has_forbidden_chars" != x; then
25495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25497  fi
25498
25499
25500  windows_path="$new_path"
25501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25502    unix_path=`$CYGPATH -u "$windows_path"`
25503    new_path="$unix_path"
25504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25506    new_path="$unix_path"
25507  fi
25508
25509  if test "x$path" != "x$new_path"; then
25510    BOOT_JDK="$new_path"
25511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25512$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25513  fi
25514
25515  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25516  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25517
25518    else
25519      # We're on a unix platform. Hooray! :)
25520      path="$BOOT_JDK"
25521      has_space=`$ECHO "$path" | $GREP " "`
25522      if test "x$has_space" != x; then
25523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25524$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25525        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25526      fi
25527
25528      # Use eval to expand a potential ~
25529      eval path="$path"
25530      if test ! -f "$path" && test ! -d "$path"; then
25531        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25532      fi
25533
25534      if test -d "$path"; then
25535        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25536      else
25537        dir="`$DIRNAME "$path"`"
25538        base="`$BASENAME "$path"`"
25539        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25540      fi
25541    fi
25542  fi
25543
25544            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25545$as_echo_n "checking for Boot JDK... " >&6; }
25546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25547$as_echo "$BOOT_JDK" >&6; }
25548            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25549$as_echo_n "checking Boot JDK version... " >&6; }
25550            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25551            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25552$as_echo "$BOOT_JDK_VERSION" >&6; }
25553          fi # end check jdk version
25554        fi # end check javac
25555      fi # end check java
25556    fi # end check boot jdk found
25557  fi
25558
25559
25560  if test "x$BOOT_JDK_FOUND" = xno; then
25561    # Now execute the test
25562
25563  if test -x /usr/libexec/java_home; then
25564    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25565    BOOT_JDK_FOUND=maybe
25566    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25567$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25568  fi
25569
25570
25571    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25572    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25573      # Do we have a bin/java?
25574      if test ! -x "$BOOT_JDK/bin/java"; then
25575        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25577        BOOT_JDK_FOUND=no
25578      else
25579        # Do we have a bin/javac?
25580        if test ! -x "$BOOT_JDK/bin/javac"; then
25581          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25583          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25584$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25585          BOOT_JDK_FOUND=no
25586        else
25587          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25588          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25589
25590          # Extra M4 quote needed to protect [] in grep expression.
25591          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25592          if test "x$FOUND_CORRECT_VERSION" = x; then
25593            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25595            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25596$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25597            BOOT_JDK_FOUND=no
25598          else
25599            # We're done! :-)
25600            BOOT_JDK_FOUND=yes
25601
25602  # Only process if variable expands to non-empty
25603
25604  if test "x$BOOT_JDK" != x; then
25605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25606
25607  # Input might be given as Windows format, start by converting to
25608  # unix format.
25609  path="$BOOT_JDK"
25610  new_path=`$CYGPATH -u "$path"`
25611
25612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25615  # "foo.exe" is OK but "foo" is an error.
25616  #
25617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25618  # It is also a way to make sure we got the proper file name for the real test later on.
25619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25620  if test "x$test_shortpath" = x; then
25621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25622$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25623    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25624  fi
25625
25626  # Call helper function which possibly converts this using DOS-style short mode.
25627  # If so, the updated path is stored in $new_path.
25628
25629  input_path="$new_path"
25630  # Check if we need to convert this using DOS-style short mode. If the path
25631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25632  # take no chances and rewrite it.
25633  # Note: m4 eats our [], so we need to use [ and ] instead.
25634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25635  if test "x$has_forbidden_chars" != x; then
25636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25640      # Going to short mode and back again did indeed matter. Since short mode is
25641      # case insensitive, let's make it lowercase to improve readability.
25642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25643      # Now convert it back to Unix-style (cygpath)
25644      input_path=`$CYGPATH -u "$shortmode_path"`
25645      new_path="$input_path"
25646    fi
25647  fi
25648
25649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25650  if test "x$test_cygdrive_prefix" = x; then
25651    # As a simple fix, exclude /usr/bin since it's not a real path.
25652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25654      # a path prefixed by /cygdrive for fixpath to work.
25655      new_path="$CYGWIN_ROOT_PATH$input_path"
25656    fi
25657  fi
25658
25659
25660  if test "x$path" != "x$new_path"; then
25661    BOOT_JDK="$new_path"
25662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25663$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25664  fi
25665
25666    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25667
25668  path="$BOOT_JDK"
25669  has_colon=`$ECHO $path | $GREP ^.:`
25670  new_path="$path"
25671  if test "x$has_colon" = x; then
25672    # Not in mixed or Windows style, start by that.
25673    new_path=`cmd //c echo $path`
25674  fi
25675
25676
25677  input_path="$new_path"
25678  # Check if we need to convert this using DOS-style short mode. If the path
25679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25680  # take no chances and rewrite it.
25681  # Note: m4 eats our [], so we need to use [ and ] instead.
25682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25683  if test "x$has_forbidden_chars" != x; then
25684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25686  fi
25687
25688
25689  windows_path="$new_path"
25690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25691    unix_path=`$CYGPATH -u "$windows_path"`
25692    new_path="$unix_path"
25693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25695    new_path="$unix_path"
25696  fi
25697
25698  if test "x$path" != "x$new_path"; then
25699    BOOT_JDK="$new_path"
25700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25701$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25702  fi
25703
25704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25706
25707    else
25708      # We're on a unix platform. Hooray! :)
25709      path="$BOOT_JDK"
25710      has_space=`$ECHO "$path" | $GREP " "`
25711      if test "x$has_space" != x; then
25712        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25713$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25714        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25715      fi
25716
25717      # Use eval to expand a potential ~
25718      eval path="$path"
25719      if test ! -f "$path" && test ! -d "$path"; then
25720        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25721      fi
25722
25723      if test -d "$path"; then
25724        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25725      else
25726        dir="`$DIRNAME "$path"`"
25727        base="`$BASENAME "$path"`"
25728        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25729      fi
25730    fi
25731  fi
25732
25733            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25734$as_echo_n "checking for Boot JDK... " >&6; }
25735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25736$as_echo "$BOOT_JDK" >&6; }
25737            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25738$as_echo_n "checking Boot JDK version... " >&6; }
25739            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25741$as_echo "$BOOT_JDK_VERSION" >&6; }
25742          fi # end check jdk version
25743        fi # end check javac
25744      fi # end check java
25745    fi # end check boot jdk found
25746  fi
25747
25748  fi
25749
25750
25751    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25752    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25753      # Do we have a bin/java?
25754      if test ! -x "$BOOT_JDK/bin/java"; then
25755        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25757        BOOT_JDK_FOUND=no
25758      else
25759        # Do we have a bin/javac?
25760        if test ! -x "$BOOT_JDK/bin/javac"; then
25761          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25763          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25764$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25765          BOOT_JDK_FOUND=no
25766        else
25767          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25768          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25769
25770          # Extra M4 quote needed to protect [] in grep expression.
25771          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25772          if test "x$FOUND_CORRECT_VERSION" = x; then
25773            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25775            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25776$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25777            BOOT_JDK_FOUND=no
25778          else
25779            # We're done! :-)
25780            BOOT_JDK_FOUND=yes
25781
25782  # Only process if variable expands to non-empty
25783
25784  if test "x$BOOT_JDK" != x; then
25785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25786
25787  # Input might be given as Windows format, start by converting to
25788  # unix format.
25789  path="$BOOT_JDK"
25790  new_path=`$CYGPATH -u "$path"`
25791
25792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25795  # "foo.exe" is OK but "foo" is an error.
25796  #
25797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25798  # It is also a way to make sure we got the proper file name for the real test later on.
25799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25800  if test "x$test_shortpath" = x; then
25801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25802$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25803    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25804  fi
25805
25806  # Call helper function which possibly converts this using DOS-style short mode.
25807  # If so, the updated path is stored in $new_path.
25808
25809  input_path="$new_path"
25810  # Check if we need to convert this using DOS-style short mode. If the path
25811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25812  # take no chances and rewrite it.
25813  # Note: m4 eats our [], so we need to use [ and ] instead.
25814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25815  if test "x$has_forbidden_chars" != x; then
25816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25820      # Going to short mode and back again did indeed matter. Since short mode is
25821      # case insensitive, let's make it lowercase to improve readability.
25822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25823      # Now convert it back to Unix-style (cygpath)
25824      input_path=`$CYGPATH -u "$shortmode_path"`
25825      new_path="$input_path"
25826    fi
25827  fi
25828
25829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25830  if test "x$test_cygdrive_prefix" = x; then
25831    # As a simple fix, exclude /usr/bin since it's not a real path.
25832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25834      # a path prefixed by /cygdrive for fixpath to work.
25835      new_path="$CYGWIN_ROOT_PATH$input_path"
25836    fi
25837  fi
25838
25839
25840  if test "x$path" != "x$new_path"; then
25841    BOOT_JDK="$new_path"
25842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25843$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25844  fi
25845
25846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25847
25848  path="$BOOT_JDK"
25849  has_colon=`$ECHO $path | $GREP ^.:`
25850  new_path="$path"
25851  if test "x$has_colon" = x; then
25852    # Not in mixed or Windows style, start by that.
25853    new_path=`cmd //c echo $path`
25854  fi
25855
25856
25857  input_path="$new_path"
25858  # Check if we need to convert this using DOS-style short mode. If the path
25859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25860  # take no chances and rewrite it.
25861  # Note: m4 eats our [], so we need to use [ and ] instead.
25862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25863  if test "x$has_forbidden_chars" != x; then
25864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25866  fi
25867
25868
25869  windows_path="$new_path"
25870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25871    unix_path=`$CYGPATH -u "$windows_path"`
25872    new_path="$unix_path"
25873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25875    new_path="$unix_path"
25876  fi
25877
25878  if test "x$path" != "x$new_path"; then
25879    BOOT_JDK="$new_path"
25880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25882  fi
25883
25884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25886
25887    else
25888      # We're on a unix platform. Hooray! :)
25889      path="$BOOT_JDK"
25890      has_space=`$ECHO "$path" | $GREP " "`
25891      if test "x$has_space" != x; then
25892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25893$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25894        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25895      fi
25896
25897      # Use eval to expand a potential ~
25898      eval path="$path"
25899      if test ! -f "$path" && test ! -d "$path"; then
25900        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25901      fi
25902
25903      if test -d "$path"; then
25904        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25905      else
25906        dir="`$DIRNAME "$path"`"
25907        base="`$BASENAME "$path"`"
25908        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25909      fi
25910    fi
25911  fi
25912
25913            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25914$as_echo_n "checking for Boot JDK... " >&6; }
25915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25916$as_echo "$BOOT_JDK" >&6; }
25917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25918$as_echo_n "checking Boot JDK version... " >&6; }
25919            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25921$as_echo "$BOOT_JDK_VERSION" >&6; }
25922          fi # end check jdk version
25923        fi # end check javac
25924      fi # end check java
25925    fi # end check boot jdk found
25926  fi
25927
25928
25929  # Test: Is $JAVA_HOME set?
25930
25931  if test "x$BOOT_JDK_FOUND" = xno; then
25932    # Now execute the test
25933
25934  if test "x$JAVA_HOME" != x; then
25935    JAVA_HOME_PROCESSED="$JAVA_HOME"
25936
25937  # Only process if variable expands to non-empty
25938
25939  if test "x$JAVA_HOME_PROCESSED" != x; then
25940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25941
25942  # Input might be given as Windows format, start by converting to
25943  # unix format.
25944  path="$JAVA_HOME_PROCESSED"
25945  new_path=`$CYGPATH -u "$path"`
25946
25947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25950  # "foo.exe" is OK but "foo" is an error.
25951  #
25952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25953  # It is also a way to make sure we got the proper file name for the real test later on.
25954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25955  if test "x$test_shortpath" = x; then
25956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25957$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25958    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25959  fi
25960
25961  # Call helper function which possibly converts this using DOS-style short mode.
25962  # If so, the updated path is stored in $new_path.
25963
25964  input_path="$new_path"
25965  # Check if we need to convert this using DOS-style short mode. If the path
25966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25967  # take no chances and rewrite it.
25968  # Note: m4 eats our [], so we need to use [ and ] instead.
25969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25970  if test "x$has_forbidden_chars" != x; then
25971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25975      # Going to short mode and back again did indeed matter. Since short mode is
25976      # case insensitive, let's make it lowercase to improve readability.
25977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25978      # Now convert it back to Unix-style (cygpath)
25979      input_path=`$CYGPATH -u "$shortmode_path"`
25980      new_path="$input_path"
25981    fi
25982  fi
25983
25984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25985  if test "x$test_cygdrive_prefix" = x; then
25986    # As a simple fix, exclude /usr/bin since it's not a real path.
25987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25989      # a path prefixed by /cygdrive for fixpath to work.
25990      new_path="$CYGWIN_ROOT_PATH$input_path"
25991    fi
25992  fi
25993
25994
25995  if test "x$path" != "x$new_path"; then
25996    JAVA_HOME_PROCESSED="$new_path"
25997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25998$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25999  fi
26000
26001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26002
26003  path="$JAVA_HOME_PROCESSED"
26004  has_colon=`$ECHO $path | $GREP ^.:`
26005  new_path="$path"
26006  if test "x$has_colon" = x; then
26007    # Not in mixed or Windows style, start by that.
26008    new_path=`cmd //c echo $path`
26009  fi
26010
26011
26012  input_path="$new_path"
26013  # Check if we need to convert this using DOS-style short mode. If the path
26014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26015  # take no chances and rewrite it.
26016  # Note: m4 eats our [], so we need to use [ and ] instead.
26017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26018  if test "x$has_forbidden_chars" != x; then
26019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26021  fi
26022
26023
26024  windows_path="$new_path"
26025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26026    unix_path=`$CYGPATH -u "$windows_path"`
26027    new_path="$unix_path"
26028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26030    new_path="$unix_path"
26031  fi
26032
26033  if test "x$path" != "x$new_path"; then
26034    JAVA_HOME_PROCESSED="$new_path"
26035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26036$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26037  fi
26038
26039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26041
26042    else
26043      # We're on a unix platform. Hooray! :)
26044      path="$JAVA_HOME_PROCESSED"
26045      has_space=`$ECHO "$path" | $GREP " "`
26046      if test "x$has_space" != x; then
26047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26048$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26049        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26050      fi
26051
26052      # Use eval to expand a potential ~
26053      eval path="$path"
26054      if test ! -f "$path" && test ! -d "$path"; then
26055        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26056      fi
26057
26058      if test -d "$path"; then
26059        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26060      else
26061        dir="`$DIRNAME "$path"`"
26062        base="`$BASENAME "$path"`"
26063        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26064      fi
26065    fi
26066  fi
26067
26068    if test ! -d "$JAVA_HOME_PROCESSED"; then
26069      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26070$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26071    else
26072      # Aha, the user has set a JAVA_HOME
26073      # let us use that as the Boot JDK.
26074      BOOT_JDK="$JAVA_HOME_PROCESSED"
26075      BOOT_JDK_FOUND=maybe
26076      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26077$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26078    fi
26079  fi
26080
26081
26082    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26083    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26084      # Do we have a bin/java?
26085      if test ! -x "$BOOT_JDK/bin/java"; then
26086        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26088        BOOT_JDK_FOUND=no
26089      else
26090        # Do we have a bin/javac?
26091        if test ! -x "$BOOT_JDK/bin/javac"; then
26092          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26094          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26095$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26096          BOOT_JDK_FOUND=no
26097        else
26098          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26099          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26100
26101          # Extra M4 quote needed to protect [] in grep expression.
26102          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26103          if test "x$FOUND_CORRECT_VERSION" = x; then
26104            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26106            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26107$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26108            BOOT_JDK_FOUND=no
26109          else
26110            # We're done! :-)
26111            BOOT_JDK_FOUND=yes
26112
26113  # Only process if variable expands to non-empty
26114
26115  if test "x$BOOT_JDK" != x; then
26116    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26117
26118  # Input might be given as Windows format, start by converting to
26119  # unix format.
26120  path="$BOOT_JDK"
26121  new_path=`$CYGPATH -u "$path"`
26122
26123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26126  # "foo.exe" is OK but "foo" is an error.
26127  #
26128  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26129  # It is also a way to make sure we got the proper file name for the real test later on.
26130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26131  if test "x$test_shortpath" = x; then
26132    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26133$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26134    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26135  fi
26136
26137  # Call helper function which possibly converts this using DOS-style short mode.
26138  # If so, the updated path is stored in $new_path.
26139
26140  input_path="$new_path"
26141  # Check if we need to convert this using DOS-style short mode. If the path
26142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26143  # take no chances and rewrite it.
26144  # Note: m4 eats our [], so we need to use [ and ] instead.
26145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26146  if test "x$has_forbidden_chars" != x; then
26147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26151      # Going to short mode and back again did indeed matter. Since short mode is
26152      # case insensitive, let's make it lowercase to improve readability.
26153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26154      # Now convert it back to Unix-style (cygpath)
26155      input_path=`$CYGPATH -u "$shortmode_path"`
26156      new_path="$input_path"
26157    fi
26158  fi
26159
26160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26161  if test "x$test_cygdrive_prefix" = x; then
26162    # As a simple fix, exclude /usr/bin since it's not a real path.
26163    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26165      # a path prefixed by /cygdrive for fixpath to work.
26166      new_path="$CYGWIN_ROOT_PATH$input_path"
26167    fi
26168  fi
26169
26170
26171  if test "x$path" != "x$new_path"; then
26172    BOOT_JDK="$new_path"
26173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26174$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26175  fi
26176
26177    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26178
26179  path="$BOOT_JDK"
26180  has_colon=`$ECHO $path | $GREP ^.:`
26181  new_path="$path"
26182  if test "x$has_colon" = x; then
26183    # Not in mixed or Windows style, start by that.
26184    new_path=`cmd //c echo $path`
26185  fi
26186
26187
26188  input_path="$new_path"
26189  # Check if we need to convert this using DOS-style short mode. If the path
26190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26191  # take no chances and rewrite it.
26192  # Note: m4 eats our [], so we need to use [ and ] instead.
26193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26194  if test "x$has_forbidden_chars" != x; then
26195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26197  fi
26198
26199
26200  windows_path="$new_path"
26201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26202    unix_path=`$CYGPATH -u "$windows_path"`
26203    new_path="$unix_path"
26204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26206    new_path="$unix_path"
26207  fi
26208
26209  if test "x$path" != "x$new_path"; then
26210    BOOT_JDK="$new_path"
26211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26212$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26213  fi
26214
26215  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26216  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26217
26218    else
26219      # We're on a unix platform. Hooray! :)
26220      path="$BOOT_JDK"
26221      has_space=`$ECHO "$path" | $GREP " "`
26222      if test "x$has_space" != x; then
26223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26224$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26225        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26226      fi
26227
26228      # Use eval to expand a potential ~
26229      eval path="$path"
26230      if test ! -f "$path" && test ! -d "$path"; then
26231        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26232      fi
26233
26234      if test -d "$path"; then
26235        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26236      else
26237        dir="`$DIRNAME "$path"`"
26238        base="`$BASENAME "$path"`"
26239        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26240      fi
26241    fi
26242  fi
26243
26244            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26245$as_echo_n "checking for Boot JDK... " >&6; }
26246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26247$as_echo "$BOOT_JDK" >&6; }
26248            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26249$as_echo_n "checking Boot JDK version... " >&6; }
26250            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26251            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26252$as_echo "$BOOT_JDK_VERSION" >&6; }
26253          fi # end check jdk version
26254        fi # end check javac
26255      fi # end check java
26256    fi # end check boot jdk found
26257  fi
26258
26259
26260  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26261
26262  if test "x$BOOT_JDK_FOUND" = xno; then
26263    # Now execute the test
26264
26265  # Extract the first word of "javac", so it can be a program name with args.
26266set dummy javac; ac_word=$2
26267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26268$as_echo_n "checking for $ac_word... " >&6; }
26269if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26270  $as_echo_n "(cached) " >&6
26271else
26272  case $JAVAC_CHECK in
26273  [\\/]* | ?:[\\/]*)
26274  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26275  ;;
26276  *)
26277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26278for as_dir in $PATH
26279do
26280  IFS=$as_save_IFS
26281  test -z "$as_dir" && as_dir=.
26282    for ac_exec_ext in '' $ac_executable_extensions; do
26283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26284    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26286    break 2
26287  fi
26288done
26289  done
26290IFS=$as_save_IFS
26291
26292  ;;
26293esac
26294fi
26295JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26296if test -n "$JAVAC_CHECK"; then
26297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26298$as_echo "$JAVAC_CHECK" >&6; }
26299else
26300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26301$as_echo "no" >&6; }
26302fi
26303
26304
26305  # Extract the first word of "java", so it can be a program name with args.
26306set dummy java; ac_word=$2
26307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26308$as_echo_n "checking for $ac_word... " >&6; }
26309if ${ac_cv_path_JAVA_CHECK+:} false; then :
26310  $as_echo_n "(cached) " >&6
26311else
26312  case $JAVA_CHECK in
26313  [\\/]* | ?:[\\/]*)
26314  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26315  ;;
26316  *)
26317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26318for as_dir in $PATH
26319do
26320  IFS=$as_save_IFS
26321  test -z "$as_dir" && as_dir=.
26322    for ac_exec_ext in '' $ac_executable_extensions; do
26323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26324    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26326    break 2
26327  fi
26328done
26329  done
26330IFS=$as_save_IFS
26331
26332  ;;
26333esac
26334fi
26335JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26336if test -n "$JAVA_CHECK"; then
26337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26338$as_echo "$JAVA_CHECK" >&6; }
26339else
26340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26341$as_echo "no" >&6; }
26342fi
26343
26344
26345  BINARY="$JAVAC_CHECK"
26346  if test "x$JAVAC_CHECK" = x; then
26347    BINARY="$JAVA_CHECK"
26348  fi
26349  if test "x$BINARY" != x; then
26350    # So there is a java(c) binary, it might be part of a JDK.
26351    # Lets find the JDK/JRE directory by following symbolic links.
26352    # Linux/GNU systems often have links from /usr/bin/java to
26353    # /etc/alternatives/java to the real JDK binary.
26354
26355  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26356    # Follow a chain of symbolic links. Use readlink
26357    # where it exists, else fall back to horribly
26358    # complicated shell code.
26359    if test "x$READLINK_TESTED" != yes; then
26360      # On MacOSX there is a readlink tool with a different
26361      # purpose than the GNU readlink tool. Check the found readlink.
26362      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26363      if test "x$ISGNU" = x; then
26364        # A readlink that we do not know how to use.
26365        # Are there other non-GNU readlinks out there?
26366        READLINK_TESTED=yes
26367        READLINK=
26368      fi
26369    fi
26370
26371    if test "x$READLINK" != x; then
26372      BINARY=`$READLINK -f $BINARY`
26373    else
26374      # Save the current directory for restoring afterwards
26375      STARTDIR=$PWD
26376      COUNTER=0
26377      sym_link_dir=`$DIRNAME $BINARY`
26378      sym_link_file=`$BASENAME $BINARY`
26379      cd $sym_link_dir
26380      # Use -P flag to resolve symlinks in directories.
26381      cd `$THEPWDCMD -P`
26382      sym_link_dir=`$THEPWDCMD -P`
26383      # Resolve file symlinks
26384      while test $COUNTER -lt 20; do
26385        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26386        if test "x$ISLINK" == x; then
26387          # This is not a symbolic link! We are done!
26388          break
26389        fi
26390        # Again resolve directory symlinks since the target of the just found
26391        # link could be in a different directory
26392        cd `$DIRNAME $ISLINK`
26393        sym_link_dir=`$THEPWDCMD -P`
26394        sym_link_file=`$BASENAME $ISLINK`
26395        let COUNTER=COUNTER+1
26396      done
26397      cd $STARTDIR
26398      BINARY=$sym_link_dir/$sym_link_file
26399    fi
26400  fi
26401
26402    BOOT_JDK=`dirname "$BINARY"`
26403    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26404    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26405      # Looks like we found ourselves an JDK
26406      BOOT_JDK_FOUND=maybe
26407      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26408$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26409    fi
26410  fi
26411
26412
26413    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26414    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26415      # Do we have a bin/java?
26416      if test ! -x "$BOOT_JDK/bin/java"; then
26417        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26419        BOOT_JDK_FOUND=no
26420      else
26421        # Do we have a bin/javac?
26422        if test ! -x "$BOOT_JDK/bin/javac"; then
26423          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26425          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26426$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26427          BOOT_JDK_FOUND=no
26428        else
26429          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26430          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26431
26432          # Extra M4 quote needed to protect [] in grep expression.
26433          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26434          if test "x$FOUND_CORRECT_VERSION" = x; then
26435            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26437            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26438$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26439            BOOT_JDK_FOUND=no
26440          else
26441            # We're done! :-)
26442            BOOT_JDK_FOUND=yes
26443
26444  # Only process if variable expands to non-empty
26445
26446  if test "x$BOOT_JDK" != x; then
26447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26448
26449  # Input might be given as Windows format, start by converting to
26450  # unix format.
26451  path="$BOOT_JDK"
26452  new_path=`$CYGPATH -u "$path"`
26453
26454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26457  # "foo.exe" is OK but "foo" is an error.
26458  #
26459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26460  # It is also a way to make sure we got the proper file name for the real test later on.
26461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26462  if test "x$test_shortpath" = x; then
26463    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26464$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26465    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26466  fi
26467
26468  # Call helper function which possibly converts this using DOS-style short mode.
26469  # If so, the updated path is stored in $new_path.
26470
26471  input_path="$new_path"
26472  # Check if we need to convert this using DOS-style short mode. If the path
26473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26474  # take no chances and rewrite it.
26475  # Note: m4 eats our [], so we need to use [ and ] instead.
26476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26477  if test "x$has_forbidden_chars" != x; then
26478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26482      # Going to short mode and back again did indeed matter. Since short mode is
26483      # case insensitive, let's make it lowercase to improve readability.
26484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26485      # Now convert it back to Unix-style (cygpath)
26486      input_path=`$CYGPATH -u "$shortmode_path"`
26487      new_path="$input_path"
26488    fi
26489  fi
26490
26491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26492  if test "x$test_cygdrive_prefix" = x; then
26493    # As a simple fix, exclude /usr/bin since it's not a real path.
26494    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26496      # a path prefixed by /cygdrive for fixpath to work.
26497      new_path="$CYGWIN_ROOT_PATH$input_path"
26498    fi
26499  fi
26500
26501
26502  if test "x$path" != "x$new_path"; then
26503    BOOT_JDK="$new_path"
26504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26506  fi
26507
26508    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26509
26510  path="$BOOT_JDK"
26511  has_colon=`$ECHO $path | $GREP ^.:`
26512  new_path="$path"
26513  if test "x$has_colon" = x; then
26514    # Not in mixed or Windows style, start by that.
26515    new_path=`cmd //c echo $path`
26516  fi
26517
26518
26519  input_path="$new_path"
26520  # Check if we need to convert this using DOS-style short mode. If the path
26521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26522  # take no chances and rewrite it.
26523  # Note: m4 eats our [], so we need to use [ and ] instead.
26524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26525  if test "x$has_forbidden_chars" != x; then
26526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26528  fi
26529
26530
26531  windows_path="$new_path"
26532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26533    unix_path=`$CYGPATH -u "$windows_path"`
26534    new_path="$unix_path"
26535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26537    new_path="$unix_path"
26538  fi
26539
26540  if test "x$path" != "x$new_path"; then
26541    BOOT_JDK="$new_path"
26542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26543$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26544  fi
26545
26546  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26547  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26548
26549    else
26550      # We're on a unix platform. Hooray! :)
26551      path="$BOOT_JDK"
26552      has_space=`$ECHO "$path" | $GREP " "`
26553      if test "x$has_space" != x; then
26554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26555$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26556        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26557      fi
26558
26559      # Use eval to expand a potential ~
26560      eval path="$path"
26561      if test ! -f "$path" && test ! -d "$path"; then
26562        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26563      fi
26564
26565      if test -d "$path"; then
26566        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26567      else
26568        dir="`$DIRNAME "$path"`"
26569        base="`$BASENAME "$path"`"
26570        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26571      fi
26572    fi
26573  fi
26574
26575            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26576$as_echo_n "checking for Boot JDK... " >&6; }
26577            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26578$as_echo "$BOOT_JDK" >&6; }
26579            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26580$as_echo_n "checking Boot JDK version... " >&6; }
26581            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26583$as_echo "$BOOT_JDK_VERSION" >&6; }
26584          fi # end check jdk version
26585        fi # end check javac
26586      fi # end check java
26587    fi # end check boot jdk found
26588  fi
26589
26590
26591  # Test: Is there a JDK installed in default, well-known locations?
26592
26593  if test "x$BOOT_JDK_FOUND" = xno; then
26594    # Now execute the test
26595
26596  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26597
26598  if test "x$BOOT_JDK_FOUND" = xno; then
26599    # Now execute the test
26600
26601  if test "x$ProgramW6432" != x; then
26602    VIRTUAL_DIR="$ProgramW6432/Java"
26603
26604  windows_path="$VIRTUAL_DIR"
26605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26606    unix_path=`$CYGPATH -u "$windows_path"`
26607    VIRTUAL_DIR="$unix_path"
26608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26610    VIRTUAL_DIR="$unix_path"
26611  fi
26612
26613
26614  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26615  BOOT_JDK_SUFFIX=""
26616  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26617  if test "x$ALL_JDKS_FOUND" != x; then
26618    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26619
26620  if test "x$BOOT_JDK_FOUND" = xno; then
26621    # Now execute the test
26622
26623        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26624        if test -d "$BOOT_JDK"; then
26625          BOOT_JDK_FOUND=maybe
26626          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26627$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26628        fi
26629
26630
26631    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26632    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26633      # Do we have a bin/java?
26634      if test ! -x "$BOOT_JDK/bin/java"; then
26635        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26637        BOOT_JDK_FOUND=no
26638      else
26639        # Do we have a bin/javac?
26640        if test ! -x "$BOOT_JDK/bin/javac"; then
26641          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26642$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26643          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26644$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26645          BOOT_JDK_FOUND=no
26646        else
26647          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26648          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26649
26650          # Extra M4 quote needed to protect [] in grep expression.
26651          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26652          if test "x$FOUND_CORRECT_VERSION" = x; then
26653            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26655            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26656$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26657            BOOT_JDK_FOUND=no
26658          else
26659            # We're done! :-)
26660            BOOT_JDK_FOUND=yes
26661
26662  # Only process if variable expands to non-empty
26663
26664  if test "x$BOOT_JDK" != x; then
26665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26666
26667  # Input might be given as Windows format, start by converting to
26668  # unix format.
26669  path="$BOOT_JDK"
26670  new_path=`$CYGPATH -u "$path"`
26671
26672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26675  # "foo.exe" is OK but "foo" is an error.
26676  #
26677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26678  # It is also a way to make sure we got the proper file name for the real test later on.
26679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26680  if test "x$test_shortpath" = x; then
26681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26682$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26683    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26684  fi
26685
26686  # Call helper function which possibly converts this using DOS-style short mode.
26687  # If so, the updated path is stored in $new_path.
26688
26689  input_path="$new_path"
26690  # Check if we need to convert this using DOS-style short mode. If the path
26691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26692  # take no chances and rewrite it.
26693  # Note: m4 eats our [], so we need to use [ and ] instead.
26694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26695  if test "x$has_forbidden_chars" != x; then
26696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26700      # Going to short mode and back again did indeed matter. Since short mode is
26701      # case insensitive, let's make it lowercase to improve readability.
26702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26703      # Now convert it back to Unix-style (cygpath)
26704      input_path=`$CYGPATH -u "$shortmode_path"`
26705      new_path="$input_path"
26706    fi
26707  fi
26708
26709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26710  if test "x$test_cygdrive_prefix" = x; then
26711    # As a simple fix, exclude /usr/bin since it's not a real path.
26712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26714      # a path prefixed by /cygdrive for fixpath to work.
26715      new_path="$CYGWIN_ROOT_PATH$input_path"
26716    fi
26717  fi
26718
26719
26720  if test "x$path" != "x$new_path"; then
26721    BOOT_JDK="$new_path"
26722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26724  fi
26725
26726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26727
26728  path="$BOOT_JDK"
26729  has_colon=`$ECHO $path | $GREP ^.:`
26730  new_path="$path"
26731  if test "x$has_colon" = x; then
26732    # Not in mixed or Windows style, start by that.
26733    new_path=`cmd //c echo $path`
26734  fi
26735
26736
26737  input_path="$new_path"
26738  # Check if we need to convert this using DOS-style short mode. If the path
26739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26740  # take no chances and rewrite it.
26741  # Note: m4 eats our [], so we need to use [ and ] instead.
26742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26743  if test "x$has_forbidden_chars" != x; then
26744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26746  fi
26747
26748
26749  windows_path="$new_path"
26750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26751    unix_path=`$CYGPATH -u "$windows_path"`
26752    new_path="$unix_path"
26753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26755    new_path="$unix_path"
26756  fi
26757
26758  if test "x$path" != "x$new_path"; then
26759    BOOT_JDK="$new_path"
26760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26761$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26762  fi
26763
26764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26766
26767    else
26768      # We're on a unix platform. Hooray! :)
26769      path="$BOOT_JDK"
26770      has_space=`$ECHO "$path" | $GREP " "`
26771      if test "x$has_space" != x; then
26772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26773$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26774        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26775      fi
26776
26777      # Use eval to expand a potential ~
26778      eval path="$path"
26779      if test ! -f "$path" && test ! -d "$path"; then
26780        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26781      fi
26782
26783      if test -d "$path"; then
26784        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26785      else
26786        dir="`$DIRNAME "$path"`"
26787        base="`$BASENAME "$path"`"
26788        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26789      fi
26790    fi
26791  fi
26792
26793            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26794$as_echo_n "checking for Boot JDK... " >&6; }
26795            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26796$as_echo "$BOOT_JDK" >&6; }
26797            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26798$as_echo_n "checking Boot JDK version... " >&6; }
26799            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26800            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26801$as_echo "$BOOT_JDK_VERSION" >&6; }
26802          fi # end check jdk version
26803        fi # end check javac
26804      fi # end check java
26805    fi # end check boot jdk found
26806  fi
26807
26808    done
26809  fi
26810
26811  fi
26812
26813
26814    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26815    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26816      # Do we have a bin/java?
26817      if test ! -x "$BOOT_JDK/bin/java"; then
26818        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26820        BOOT_JDK_FOUND=no
26821      else
26822        # Do we have a bin/javac?
26823        if test ! -x "$BOOT_JDK/bin/javac"; then
26824          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26826          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26827$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26828          BOOT_JDK_FOUND=no
26829        else
26830          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26831          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26832
26833          # Extra M4 quote needed to protect [] in grep expression.
26834          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26835          if test "x$FOUND_CORRECT_VERSION" = x; then
26836            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26838            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26839$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26840            BOOT_JDK_FOUND=no
26841          else
26842            # We're done! :-)
26843            BOOT_JDK_FOUND=yes
26844
26845  # Only process if variable expands to non-empty
26846
26847  if test "x$BOOT_JDK" != x; then
26848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26849
26850  # Input might be given as Windows format, start by converting to
26851  # unix format.
26852  path="$BOOT_JDK"
26853  new_path=`$CYGPATH -u "$path"`
26854
26855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26858  # "foo.exe" is OK but "foo" is an error.
26859  #
26860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26861  # It is also a way to make sure we got the proper file name for the real test later on.
26862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26863  if test "x$test_shortpath" = x; then
26864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26866    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26867  fi
26868
26869  # Call helper function which possibly converts this using DOS-style short mode.
26870  # If so, the updated path is stored in $new_path.
26871
26872  input_path="$new_path"
26873  # Check if we need to convert this using DOS-style short mode. If the path
26874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26875  # take no chances and rewrite it.
26876  # Note: m4 eats our [], so we need to use [ and ] instead.
26877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26878  if test "x$has_forbidden_chars" != x; then
26879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26883      # Going to short mode and back again did indeed matter. Since short mode is
26884      # case insensitive, let's make it lowercase to improve readability.
26885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26886      # Now convert it back to Unix-style (cygpath)
26887      input_path=`$CYGPATH -u "$shortmode_path"`
26888      new_path="$input_path"
26889    fi
26890  fi
26891
26892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26893  if test "x$test_cygdrive_prefix" = x; then
26894    # As a simple fix, exclude /usr/bin since it's not a real path.
26895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26897      # a path prefixed by /cygdrive for fixpath to work.
26898      new_path="$CYGWIN_ROOT_PATH$input_path"
26899    fi
26900  fi
26901
26902
26903  if test "x$path" != "x$new_path"; then
26904    BOOT_JDK="$new_path"
26905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26906$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26907  fi
26908
26909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26910
26911  path="$BOOT_JDK"
26912  has_colon=`$ECHO $path | $GREP ^.:`
26913  new_path="$path"
26914  if test "x$has_colon" = x; then
26915    # Not in mixed or Windows style, start by that.
26916    new_path=`cmd //c echo $path`
26917  fi
26918
26919
26920  input_path="$new_path"
26921  # Check if we need to convert this using DOS-style short mode. If the path
26922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26923  # take no chances and rewrite it.
26924  # Note: m4 eats our [], so we need to use [ and ] instead.
26925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26926  if test "x$has_forbidden_chars" != x; then
26927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26929  fi
26930
26931
26932  windows_path="$new_path"
26933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26934    unix_path=`$CYGPATH -u "$windows_path"`
26935    new_path="$unix_path"
26936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26938    new_path="$unix_path"
26939  fi
26940
26941  if test "x$path" != "x$new_path"; then
26942    BOOT_JDK="$new_path"
26943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26944$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26945  fi
26946
26947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26949
26950    else
26951      # We're on a unix platform. Hooray! :)
26952      path="$BOOT_JDK"
26953      has_space=`$ECHO "$path" | $GREP " "`
26954      if test "x$has_space" != x; then
26955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26957        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26958      fi
26959
26960      # Use eval to expand a potential ~
26961      eval path="$path"
26962      if test ! -f "$path" && test ! -d "$path"; then
26963        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26964      fi
26965
26966      if test -d "$path"; then
26967        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26968      else
26969        dir="`$DIRNAME "$path"`"
26970        base="`$BASENAME "$path"`"
26971        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26972      fi
26973    fi
26974  fi
26975
26976            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26977$as_echo_n "checking for Boot JDK... " >&6; }
26978            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26979$as_echo "$BOOT_JDK" >&6; }
26980            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26981$as_echo_n "checking Boot JDK version... " >&6; }
26982            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26983            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26984$as_echo "$BOOT_JDK_VERSION" >&6; }
26985          fi # end check jdk version
26986        fi # end check javac
26987      fi # end check java
26988    fi # end check boot jdk found
26989  fi
26990
26991
26992  if test "x$BOOT_JDK_FOUND" = xno; then
26993    # Now execute the test
26994
26995  if test "x$PROGRAMW6432" != x; then
26996    VIRTUAL_DIR="$PROGRAMW6432/Java"
26997
26998  windows_path="$VIRTUAL_DIR"
26999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27000    unix_path=`$CYGPATH -u "$windows_path"`
27001    VIRTUAL_DIR="$unix_path"
27002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27004    VIRTUAL_DIR="$unix_path"
27005  fi
27006
27007
27008  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27009  BOOT_JDK_SUFFIX=""
27010  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27011  if test "x$ALL_JDKS_FOUND" != x; then
27012    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27013
27014  if test "x$BOOT_JDK_FOUND" = xno; then
27015    # Now execute the test
27016
27017        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27018        if test -d "$BOOT_JDK"; then
27019          BOOT_JDK_FOUND=maybe
27020          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27021$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27022        fi
27023
27024
27025    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27026    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27027      # Do we have a bin/java?
27028      if test ! -x "$BOOT_JDK/bin/java"; then
27029        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27031        BOOT_JDK_FOUND=no
27032      else
27033        # Do we have a bin/javac?
27034        if test ! -x "$BOOT_JDK/bin/javac"; then
27035          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27037          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27038$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27039          BOOT_JDK_FOUND=no
27040        else
27041          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27042          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27043
27044          # Extra M4 quote needed to protect [] in grep expression.
27045          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27046          if test "x$FOUND_CORRECT_VERSION" = x; then
27047            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27049            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27050$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27051            BOOT_JDK_FOUND=no
27052          else
27053            # We're done! :-)
27054            BOOT_JDK_FOUND=yes
27055
27056  # Only process if variable expands to non-empty
27057
27058  if test "x$BOOT_JDK" != x; then
27059    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27060
27061  # Input might be given as Windows format, start by converting to
27062  # unix format.
27063  path="$BOOT_JDK"
27064  new_path=`$CYGPATH -u "$path"`
27065
27066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27069  # "foo.exe" is OK but "foo" is an error.
27070  #
27071  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27072  # It is also a way to make sure we got the proper file name for the real test later on.
27073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27074  if test "x$test_shortpath" = x; then
27075    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27076$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27077    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27078  fi
27079
27080  # Call helper function which possibly converts this using DOS-style short mode.
27081  # If so, the updated path is stored in $new_path.
27082
27083  input_path="$new_path"
27084  # Check if we need to convert this using DOS-style short mode. If the path
27085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27086  # take no chances and rewrite it.
27087  # Note: m4 eats our [], so we need to use [ and ] instead.
27088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27089  if test "x$has_forbidden_chars" != x; then
27090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27094      # Going to short mode and back again did indeed matter. Since short mode is
27095      # case insensitive, let's make it lowercase to improve readability.
27096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27097      # Now convert it back to Unix-style (cygpath)
27098      input_path=`$CYGPATH -u "$shortmode_path"`
27099      new_path="$input_path"
27100    fi
27101  fi
27102
27103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27104  if test "x$test_cygdrive_prefix" = x; then
27105    # As a simple fix, exclude /usr/bin since it's not a real path.
27106    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27108      # a path prefixed by /cygdrive for fixpath to work.
27109      new_path="$CYGWIN_ROOT_PATH$input_path"
27110    fi
27111  fi
27112
27113
27114  if test "x$path" != "x$new_path"; then
27115    BOOT_JDK="$new_path"
27116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27117$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27118  fi
27119
27120    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27121
27122  path="$BOOT_JDK"
27123  has_colon=`$ECHO $path | $GREP ^.:`
27124  new_path="$path"
27125  if test "x$has_colon" = x; then
27126    # Not in mixed or Windows style, start by that.
27127    new_path=`cmd //c echo $path`
27128  fi
27129
27130
27131  input_path="$new_path"
27132  # Check if we need to convert this using DOS-style short mode. If the path
27133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27134  # take no chances and rewrite it.
27135  # Note: m4 eats our [], so we need to use [ and ] instead.
27136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27137  if test "x$has_forbidden_chars" != x; then
27138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27140  fi
27141
27142
27143  windows_path="$new_path"
27144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27145    unix_path=`$CYGPATH -u "$windows_path"`
27146    new_path="$unix_path"
27147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27149    new_path="$unix_path"
27150  fi
27151
27152  if test "x$path" != "x$new_path"; then
27153    BOOT_JDK="$new_path"
27154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27155$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27156  fi
27157
27158  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27159  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27160
27161    else
27162      # We're on a unix platform. Hooray! :)
27163      path="$BOOT_JDK"
27164      has_space=`$ECHO "$path" | $GREP " "`
27165      if test "x$has_space" != x; then
27166        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27167$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27168        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27169      fi
27170
27171      # Use eval to expand a potential ~
27172      eval path="$path"
27173      if test ! -f "$path" && test ! -d "$path"; then
27174        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27175      fi
27176
27177      if test -d "$path"; then
27178        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27179      else
27180        dir="`$DIRNAME "$path"`"
27181        base="`$BASENAME "$path"`"
27182        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27183      fi
27184    fi
27185  fi
27186
27187            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27188$as_echo_n "checking for Boot JDK... " >&6; }
27189            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27190$as_echo "$BOOT_JDK" >&6; }
27191            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27192$as_echo_n "checking Boot JDK version... " >&6; }
27193            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27194            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27195$as_echo "$BOOT_JDK_VERSION" >&6; }
27196          fi # end check jdk version
27197        fi # end check javac
27198      fi # end check java
27199    fi # end check boot jdk found
27200  fi
27201
27202    done
27203  fi
27204
27205  fi
27206
27207
27208    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27209    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27210      # Do we have a bin/java?
27211      if test ! -x "$BOOT_JDK/bin/java"; then
27212        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27214        BOOT_JDK_FOUND=no
27215      else
27216        # Do we have a bin/javac?
27217        if test ! -x "$BOOT_JDK/bin/javac"; then
27218          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27220          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27221$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27222          BOOT_JDK_FOUND=no
27223        else
27224          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27225          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27226
27227          # Extra M4 quote needed to protect [] in grep expression.
27228          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27229          if test "x$FOUND_CORRECT_VERSION" = x; then
27230            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27232            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27233$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27234            BOOT_JDK_FOUND=no
27235          else
27236            # We're done! :-)
27237            BOOT_JDK_FOUND=yes
27238
27239  # Only process if variable expands to non-empty
27240
27241  if test "x$BOOT_JDK" != x; then
27242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27243
27244  # Input might be given as Windows format, start by converting to
27245  # unix format.
27246  path="$BOOT_JDK"
27247  new_path=`$CYGPATH -u "$path"`
27248
27249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27252  # "foo.exe" is OK but "foo" is an error.
27253  #
27254  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27255  # It is also a way to make sure we got the proper file name for the real test later on.
27256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27257  if test "x$test_shortpath" = x; then
27258    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27259$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27260    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27261  fi
27262
27263  # Call helper function which possibly converts this using DOS-style short mode.
27264  # If so, the updated path is stored in $new_path.
27265
27266  input_path="$new_path"
27267  # Check if we need to convert this using DOS-style short mode. If the path
27268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27269  # take no chances and rewrite it.
27270  # Note: m4 eats our [], so we need to use [ and ] instead.
27271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27272  if test "x$has_forbidden_chars" != x; then
27273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27277      # Going to short mode and back again did indeed matter. Since short mode is
27278      # case insensitive, let's make it lowercase to improve readability.
27279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27280      # Now convert it back to Unix-style (cygpath)
27281      input_path=`$CYGPATH -u "$shortmode_path"`
27282      new_path="$input_path"
27283    fi
27284  fi
27285
27286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27287  if test "x$test_cygdrive_prefix" = x; then
27288    # As a simple fix, exclude /usr/bin since it's not a real path.
27289    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27291      # a path prefixed by /cygdrive for fixpath to work.
27292      new_path="$CYGWIN_ROOT_PATH$input_path"
27293    fi
27294  fi
27295
27296
27297  if test "x$path" != "x$new_path"; then
27298    BOOT_JDK="$new_path"
27299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27300$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27301  fi
27302
27303    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27304
27305  path="$BOOT_JDK"
27306  has_colon=`$ECHO $path | $GREP ^.:`
27307  new_path="$path"
27308  if test "x$has_colon" = x; then
27309    # Not in mixed or Windows style, start by that.
27310    new_path=`cmd //c echo $path`
27311  fi
27312
27313
27314  input_path="$new_path"
27315  # Check if we need to convert this using DOS-style short mode. If the path
27316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27317  # take no chances and rewrite it.
27318  # Note: m4 eats our [], so we need to use [ and ] instead.
27319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27320  if test "x$has_forbidden_chars" != x; then
27321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27323  fi
27324
27325
27326  windows_path="$new_path"
27327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27328    unix_path=`$CYGPATH -u "$windows_path"`
27329    new_path="$unix_path"
27330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27332    new_path="$unix_path"
27333  fi
27334
27335  if test "x$path" != "x$new_path"; then
27336    BOOT_JDK="$new_path"
27337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27339  fi
27340
27341  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27342  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27343
27344    else
27345      # We're on a unix platform. Hooray! :)
27346      path="$BOOT_JDK"
27347      has_space=`$ECHO "$path" | $GREP " "`
27348      if test "x$has_space" != x; then
27349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27350$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27351        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27352      fi
27353
27354      # Use eval to expand a potential ~
27355      eval path="$path"
27356      if test ! -f "$path" && test ! -d "$path"; then
27357        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27358      fi
27359
27360      if test -d "$path"; then
27361        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27362      else
27363        dir="`$DIRNAME "$path"`"
27364        base="`$BASENAME "$path"`"
27365        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27366      fi
27367    fi
27368  fi
27369
27370            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27371$as_echo_n "checking for Boot JDK... " >&6; }
27372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27373$as_echo "$BOOT_JDK" >&6; }
27374            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27375$as_echo_n "checking Boot JDK version... " >&6; }
27376            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27378$as_echo "$BOOT_JDK_VERSION" >&6; }
27379          fi # end check jdk version
27380        fi # end check javac
27381      fi # end check java
27382    fi # end check boot jdk found
27383  fi
27384
27385
27386  if test "x$BOOT_JDK_FOUND" = xno; then
27387    # Now execute the test
27388
27389  if test "x$PROGRAMFILES" != x; then
27390    VIRTUAL_DIR="$PROGRAMFILES/Java"
27391
27392  windows_path="$VIRTUAL_DIR"
27393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27394    unix_path=`$CYGPATH -u "$windows_path"`
27395    VIRTUAL_DIR="$unix_path"
27396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27398    VIRTUAL_DIR="$unix_path"
27399  fi
27400
27401
27402  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27403  BOOT_JDK_SUFFIX=""
27404  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27405  if test "x$ALL_JDKS_FOUND" != x; then
27406    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27407
27408  if test "x$BOOT_JDK_FOUND" = xno; then
27409    # Now execute the test
27410
27411        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27412        if test -d "$BOOT_JDK"; then
27413          BOOT_JDK_FOUND=maybe
27414          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27415$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27416        fi
27417
27418
27419    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27420    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27421      # Do we have a bin/java?
27422      if test ! -x "$BOOT_JDK/bin/java"; then
27423        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27425        BOOT_JDK_FOUND=no
27426      else
27427        # Do we have a bin/javac?
27428        if test ! -x "$BOOT_JDK/bin/javac"; then
27429          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27430$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27431          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27432$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27433          BOOT_JDK_FOUND=no
27434        else
27435          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27436          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27437
27438          # Extra M4 quote needed to protect [] in grep expression.
27439          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27440          if test "x$FOUND_CORRECT_VERSION" = x; then
27441            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27442$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27443            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27444$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27445            BOOT_JDK_FOUND=no
27446          else
27447            # We're done! :-)
27448            BOOT_JDK_FOUND=yes
27449
27450  # Only process if variable expands to non-empty
27451
27452  if test "x$BOOT_JDK" != x; then
27453    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27454
27455  # Input might be given as Windows format, start by converting to
27456  # unix format.
27457  path="$BOOT_JDK"
27458  new_path=`$CYGPATH -u "$path"`
27459
27460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27463  # "foo.exe" is OK but "foo" is an error.
27464  #
27465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27466  # It is also a way to make sure we got the proper file name for the real test later on.
27467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27468  if test "x$test_shortpath" = x; then
27469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27470$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27471    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27472  fi
27473
27474  # Call helper function which possibly converts this using DOS-style short mode.
27475  # If so, the updated path is stored in $new_path.
27476
27477  input_path="$new_path"
27478  # Check if we need to convert this using DOS-style short mode. If the path
27479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27480  # take no chances and rewrite it.
27481  # Note: m4 eats our [], so we need to use [ and ] instead.
27482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27483  if test "x$has_forbidden_chars" != x; then
27484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27488      # Going to short mode and back again did indeed matter. Since short mode is
27489      # case insensitive, let's make it lowercase to improve readability.
27490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27491      # Now convert it back to Unix-style (cygpath)
27492      input_path=`$CYGPATH -u "$shortmode_path"`
27493      new_path="$input_path"
27494    fi
27495  fi
27496
27497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27498  if test "x$test_cygdrive_prefix" = x; then
27499    # As a simple fix, exclude /usr/bin since it's not a real path.
27500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27502      # a path prefixed by /cygdrive for fixpath to work.
27503      new_path="$CYGWIN_ROOT_PATH$input_path"
27504    fi
27505  fi
27506
27507
27508  if test "x$path" != "x$new_path"; then
27509    BOOT_JDK="$new_path"
27510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27511$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27512  fi
27513
27514    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27515
27516  path="$BOOT_JDK"
27517  has_colon=`$ECHO $path | $GREP ^.:`
27518  new_path="$path"
27519  if test "x$has_colon" = x; then
27520    # Not in mixed or Windows style, start by that.
27521    new_path=`cmd //c echo $path`
27522  fi
27523
27524
27525  input_path="$new_path"
27526  # Check if we need to convert this using DOS-style short mode. If the path
27527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27528  # take no chances and rewrite it.
27529  # Note: m4 eats our [], so we need to use [ and ] instead.
27530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27531  if test "x$has_forbidden_chars" != x; then
27532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27534  fi
27535
27536
27537  windows_path="$new_path"
27538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27539    unix_path=`$CYGPATH -u "$windows_path"`
27540    new_path="$unix_path"
27541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27543    new_path="$unix_path"
27544  fi
27545
27546  if test "x$path" != "x$new_path"; then
27547    BOOT_JDK="$new_path"
27548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27549$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27550  fi
27551
27552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27554
27555    else
27556      # We're on a unix platform. Hooray! :)
27557      path="$BOOT_JDK"
27558      has_space=`$ECHO "$path" | $GREP " "`
27559      if test "x$has_space" != x; then
27560        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27562        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27563      fi
27564
27565      # Use eval to expand a potential ~
27566      eval path="$path"
27567      if test ! -f "$path" && test ! -d "$path"; then
27568        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27569      fi
27570
27571      if test -d "$path"; then
27572        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27573      else
27574        dir="`$DIRNAME "$path"`"
27575        base="`$BASENAME "$path"`"
27576        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27577      fi
27578    fi
27579  fi
27580
27581            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27582$as_echo_n "checking for Boot JDK... " >&6; }
27583            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27584$as_echo "$BOOT_JDK" >&6; }
27585            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27586$as_echo_n "checking Boot JDK version... " >&6; }
27587            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27588            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27589$as_echo "$BOOT_JDK_VERSION" >&6; }
27590          fi # end check jdk version
27591        fi # end check javac
27592      fi # end check java
27593    fi # end check boot jdk found
27594  fi
27595
27596    done
27597  fi
27598
27599  fi
27600
27601
27602    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27603    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27604      # Do we have a bin/java?
27605      if test ! -x "$BOOT_JDK/bin/java"; then
27606        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27608        BOOT_JDK_FOUND=no
27609      else
27610        # Do we have a bin/javac?
27611        if test ! -x "$BOOT_JDK/bin/javac"; then
27612          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27614          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27615$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27616          BOOT_JDK_FOUND=no
27617        else
27618          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27619          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27620
27621          # Extra M4 quote needed to protect [] in grep expression.
27622          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27623          if test "x$FOUND_CORRECT_VERSION" = x; then
27624            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27626            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27627$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27628            BOOT_JDK_FOUND=no
27629          else
27630            # We're done! :-)
27631            BOOT_JDK_FOUND=yes
27632
27633  # Only process if variable expands to non-empty
27634
27635  if test "x$BOOT_JDK" != x; then
27636    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27637
27638  # Input might be given as Windows format, start by converting to
27639  # unix format.
27640  path="$BOOT_JDK"
27641  new_path=`$CYGPATH -u "$path"`
27642
27643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27646  # "foo.exe" is OK but "foo" is an error.
27647  #
27648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27649  # It is also a way to make sure we got the proper file name for the real test later on.
27650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27651  if test "x$test_shortpath" = x; then
27652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27653$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27654    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27655  fi
27656
27657  # Call helper function which possibly converts this using DOS-style short mode.
27658  # If so, the updated path is stored in $new_path.
27659
27660  input_path="$new_path"
27661  # Check if we need to convert this using DOS-style short mode. If the path
27662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27663  # take no chances and rewrite it.
27664  # Note: m4 eats our [], so we need to use [ and ] instead.
27665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27666  if test "x$has_forbidden_chars" != x; then
27667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27671      # Going to short mode and back again did indeed matter. Since short mode is
27672      # case insensitive, let's make it lowercase to improve readability.
27673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27674      # Now convert it back to Unix-style (cygpath)
27675      input_path=`$CYGPATH -u "$shortmode_path"`
27676      new_path="$input_path"
27677    fi
27678  fi
27679
27680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27681  if test "x$test_cygdrive_prefix" = x; then
27682    # As a simple fix, exclude /usr/bin since it's not a real path.
27683    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27685      # a path prefixed by /cygdrive for fixpath to work.
27686      new_path="$CYGWIN_ROOT_PATH$input_path"
27687    fi
27688  fi
27689
27690
27691  if test "x$path" != "x$new_path"; then
27692    BOOT_JDK="$new_path"
27693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27695  fi
27696
27697    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27698
27699  path="$BOOT_JDK"
27700  has_colon=`$ECHO $path | $GREP ^.:`
27701  new_path="$path"
27702  if test "x$has_colon" = x; then
27703    # Not in mixed or Windows style, start by that.
27704    new_path=`cmd //c echo $path`
27705  fi
27706
27707
27708  input_path="$new_path"
27709  # Check if we need to convert this using DOS-style short mode. If the path
27710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27711  # take no chances and rewrite it.
27712  # Note: m4 eats our [], so we need to use [ and ] instead.
27713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27714  if test "x$has_forbidden_chars" != x; then
27715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27717  fi
27718
27719
27720  windows_path="$new_path"
27721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27722    unix_path=`$CYGPATH -u "$windows_path"`
27723    new_path="$unix_path"
27724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27726    new_path="$unix_path"
27727  fi
27728
27729  if test "x$path" != "x$new_path"; then
27730    BOOT_JDK="$new_path"
27731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27732$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27733  fi
27734
27735  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27736  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27737
27738    else
27739      # We're on a unix platform. Hooray! :)
27740      path="$BOOT_JDK"
27741      has_space=`$ECHO "$path" | $GREP " "`
27742      if test "x$has_space" != x; then
27743        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27744$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27745        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27746      fi
27747
27748      # Use eval to expand a potential ~
27749      eval path="$path"
27750      if test ! -f "$path" && test ! -d "$path"; then
27751        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27752      fi
27753
27754      if test -d "$path"; then
27755        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27756      else
27757        dir="`$DIRNAME "$path"`"
27758        base="`$BASENAME "$path"`"
27759        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27760      fi
27761    fi
27762  fi
27763
27764            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27765$as_echo_n "checking for Boot JDK... " >&6; }
27766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27767$as_echo "$BOOT_JDK" >&6; }
27768            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27769$as_echo_n "checking Boot JDK version... " >&6; }
27770            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27772$as_echo "$BOOT_JDK_VERSION" >&6; }
27773          fi # end check jdk version
27774        fi # end check javac
27775      fi # end check java
27776    fi # end check boot jdk found
27777  fi
27778
27779
27780  if test "x$BOOT_JDK_FOUND" = xno; then
27781    # Now execute the test
27782
27783  if test "x$ProgramFiles" != x; then
27784    VIRTUAL_DIR="$ProgramFiles/Java"
27785
27786  windows_path="$VIRTUAL_DIR"
27787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27788    unix_path=`$CYGPATH -u "$windows_path"`
27789    VIRTUAL_DIR="$unix_path"
27790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27792    VIRTUAL_DIR="$unix_path"
27793  fi
27794
27795
27796  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27797  BOOT_JDK_SUFFIX=""
27798  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27799  if test "x$ALL_JDKS_FOUND" != x; then
27800    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27801
27802  if test "x$BOOT_JDK_FOUND" = xno; then
27803    # Now execute the test
27804
27805        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27806        if test -d "$BOOT_JDK"; then
27807          BOOT_JDK_FOUND=maybe
27808          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27809$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27810        fi
27811
27812
27813    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27814    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27815      # Do we have a bin/java?
27816      if test ! -x "$BOOT_JDK/bin/java"; then
27817        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27819        BOOT_JDK_FOUND=no
27820      else
27821        # Do we have a bin/javac?
27822        if test ! -x "$BOOT_JDK/bin/javac"; then
27823          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27825          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27826$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27827          BOOT_JDK_FOUND=no
27828        else
27829          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27830          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27831
27832          # Extra M4 quote needed to protect [] in grep expression.
27833          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27834          if test "x$FOUND_CORRECT_VERSION" = x; then
27835            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27837            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27838$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27839            BOOT_JDK_FOUND=no
27840          else
27841            # We're done! :-)
27842            BOOT_JDK_FOUND=yes
27843
27844  # Only process if variable expands to non-empty
27845
27846  if test "x$BOOT_JDK" != x; then
27847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27848
27849  # Input might be given as Windows format, start by converting to
27850  # unix format.
27851  path="$BOOT_JDK"
27852  new_path=`$CYGPATH -u "$path"`
27853
27854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27857  # "foo.exe" is OK but "foo" is an error.
27858  #
27859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27860  # It is also a way to make sure we got the proper file name for the real test later on.
27861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27862  if test "x$test_shortpath" = x; then
27863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27864$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27865    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27866  fi
27867
27868  # Call helper function which possibly converts this using DOS-style short mode.
27869  # If so, the updated path is stored in $new_path.
27870
27871  input_path="$new_path"
27872  # Check if we need to convert this using DOS-style short mode. If the path
27873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27874  # take no chances and rewrite it.
27875  # Note: m4 eats our [], so we need to use [ and ] instead.
27876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27877  if test "x$has_forbidden_chars" != x; then
27878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27882      # Going to short mode and back again did indeed matter. Since short mode is
27883      # case insensitive, let's make it lowercase to improve readability.
27884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27885      # Now convert it back to Unix-style (cygpath)
27886      input_path=`$CYGPATH -u "$shortmode_path"`
27887      new_path="$input_path"
27888    fi
27889  fi
27890
27891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27892  if test "x$test_cygdrive_prefix" = x; then
27893    # As a simple fix, exclude /usr/bin since it's not a real path.
27894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27896      # a path prefixed by /cygdrive for fixpath to work.
27897      new_path="$CYGWIN_ROOT_PATH$input_path"
27898    fi
27899  fi
27900
27901
27902  if test "x$path" != "x$new_path"; then
27903    BOOT_JDK="$new_path"
27904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27905$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27906  fi
27907
27908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27909
27910  path="$BOOT_JDK"
27911  has_colon=`$ECHO $path | $GREP ^.:`
27912  new_path="$path"
27913  if test "x$has_colon" = x; then
27914    # Not in mixed or Windows style, start by that.
27915    new_path=`cmd //c echo $path`
27916  fi
27917
27918
27919  input_path="$new_path"
27920  # Check if we need to convert this using DOS-style short mode. If the path
27921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27922  # take no chances and rewrite it.
27923  # Note: m4 eats our [], so we need to use [ and ] instead.
27924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27925  if test "x$has_forbidden_chars" != x; then
27926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27928  fi
27929
27930
27931  windows_path="$new_path"
27932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27933    unix_path=`$CYGPATH -u "$windows_path"`
27934    new_path="$unix_path"
27935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27937    new_path="$unix_path"
27938  fi
27939
27940  if test "x$path" != "x$new_path"; then
27941    BOOT_JDK="$new_path"
27942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27943$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27944  fi
27945
27946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27948
27949    else
27950      # We're on a unix platform. Hooray! :)
27951      path="$BOOT_JDK"
27952      has_space=`$ECHO "$path" | $GREP " "`
27953      if test "x$has_space" != x; then
27954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27955$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27956        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27957      fi
27958
27959      # Use eval to expand a potential ~
27960      eval path="$path"
27961      if test ! -f "$path" && test ! -d "$path"; then
27962        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27963      fi
27964
27965      if test -d "$path"; then
27966        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27967      else
27968        dir="`$DIRNAME "$path"`"
27969        base="`$BASENAME "$path"`"
27970        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27971      fi
27972    fi
27973  fi
27974
27975            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27976$as_echo_n "checking for Boot JDK... " >&6; }
27977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27978$as_echo "$BOOT_JDK" >&6; }
27979            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27980$as_echo_n "checking Boot JDK version... " >&6; }
27981            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27982            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27983$as_echo "$BOOT_JDK_VERSION" >&6; }
27984          fi # end check jdk version
27985        fi # end check javac
27986      fi # end check java
27987    fi # end check boot jdk found
27988  fi
27989
27990    done
27991  fi
27992
27993  fi
27994
27995
27996    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27997    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27998      # Do we have a bin/java?
27999      if test ! -x "$BOOT_JDK/bin/java"; then
28000        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28002        BOOT_JDK_FOUND=no
28003      else
28004        # Do we have a bin/javac?
28005        if test ! -x "$BOOT_JDK/bin/javac"; then
28006          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28008          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28009$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28010          BOOT_JDK_FOUND=no
28011        else
28012          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28013          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28014
28015          # Extra M4 quote needed to protect [] in grep expression.
28016          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28017          if test "x$FOUND_CORRECT_VERSION" = x; then
28018            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28020            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28021$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28022            BOOT_JDK_FOUND=no
28023          else
28024            # We're done! :-)
28025            BOOT_JDK_FOUND=yes
28026
28027  # Only process if variable expands to non-empty
28028
28029  if test "x$BOOT_JDK" != x; then
28030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28031
28032  # Input might be given as Windows format, start by converting to
28033  # unix format.
28034  path="$BOOT_JDK"
28035  new_path=`$CYGPATH -u "$path"`
28036
28037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28040  # "foo.exe" is OK but "foo" is an error.
28041  #
28042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28043  # It is also a way to make sure we got the proper file name for the real test later on.
28044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28045  if test "x$test_shortpath" = x; then
28046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28048    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28049  fi
28050
28051  # Call helper function which possibly converts this using DOS-style short mode.
28052  # If so, the updated path is stored in $new_path.
28053
28054  input_path="$new_path"
28055  # Check if we need to convert this using DOS-style short mode. If the path
28056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28057  # take no chances and rewrite it.
28058  # Note: m4 eats our [], so we need to use [ and ] instead.
28059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28060  if test "x$has_forbidden_chars" != x; then
28061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28065      # Going to short mode and back again did indeed matter. Since short mode is
28066      # case insensitive, let's make it lowercase to improve readability.
28067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28068      # Now convert it back to Unix-style (cygpath)
28069      input_path=`$CYGPATH -u "$shortmode_path"`
28070      new_path="$input_path"
28071    fi
28072  fi
28073
28074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28075  if test "x$test_cygdrive_prefix" = x; then
28076    # As a simple fix, exclude /usr/bin since it's not a real path.
28077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28079      # a path prefixed by /cygdrive for fixpath to work.
28080      new_path="$CYGWIN_ROOT_PATH$input_path"
28081    fi
28082  fi
28083
28084
28085  if test "x$path" != "x$new_path"; then
28086    BOOT_JDK="$new_path"
28087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28088$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28089  fi
28090
28091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28092
28093  path="$BOOT_JDK"
28094  has_colon=`$ECHO $path | $GREP ^.:`
28095  new_path="$path"
28096  if test "x$has_colon" = x; then
28097    # Not in mixed or Windows style, start by that.
28098    new_path=`cmd //c echo $path`
28099  fi
28100
28101
28102  input_path="$new_path"
28103  # Check if we need to convert this using DOS-style short mode. If the path
28104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28105  # take no chances and rewrite it.
28106  # Note: m4 eats our [], so we need to use [ and ] instead.
28107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28108  if test "x$has_forbidden_chars" != x; then
28109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28111  fi
28112
28113
28114  windows_path="$new_path"
28115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28116    unix_path=`$CYGPATH -u "$windows_path"`
28117    new_path="$unix_path"
28118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28120    new_path="$unix_path"
28121  fi
28122
28123  if test "x$path" != "x$new_path"; then
28124    BOOT_JDK="$new_path"
28125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28126$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28127  fi
28128
28129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28131
28132    else
28133      # We're on a unix platform. Hooray! :)
28134      path="$BOOT_JDK"
28135      has_space=`$ECHO "$path" | $GREP " "`
28136      if test "x$has_space" != x; then
28137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28139        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28140      fi
28141
28142      # Use eval to expand a potential ~
28143      eval path="$path"
28144      if test ! -f "$path" && test ! -d "$path"; then
28145        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28146      fi
28147
28148      if test -d "$path"; then
28149        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28150      else
28151        dir="`$DIRNAME "$path"`"
28152        base="`$BASENAME "$path"`"
28153        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28154      fi
28155    fi
28156  fi
28157
28158            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28159$as_echo_n "checking for Boot JDK... " >&6; }
28160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28161$as_echo "$BOOT_JDK" >&6; }
28162            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28163$as_echo_n "checking Boot JDK version... " >&6; }
28164            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28166$as_echo "$BOOT_JDK_VERSION" >&6; }
28167          fi # end check jdk version
28168        fi # end check javac
28169      fi # end check java
28170    fi # end check boot jdk found
28171  fi
28172
28173
28174  if test "x$BOOT_JDK_FOUND" = xno; then
28175    # Now execute the test
28176
28177  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28178  BOOT_JDK_SUFFIX=""
28179  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28180  if test "x$ALL_JDKS_FOUND" != x; then
28181    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28182
28183  if test "x$BOOT_JDK_FOUND" = xno; then
28184    # Now execute the test
28185
28186        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28187        if test -d "$BOOT_JDK"; then
28188          BOOT_JDK_FOUND=maybe
28189          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28190$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28191        fi
28192
28193
28194    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28195    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28196      # Do we have a bin/java?
28197      if test ! -x "$BOOT_JDK/bin/java"; then
28198        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28200        BOOT_JDK_FOUND=no
28201      else
28202        # Do we have a bin/javac?
28203        if test ! -x "$BOOT_JDK/bin/javac"; then
28204          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28206          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28207$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28208          BOOT_JDK_FOUND=no
28209        else
28210          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28211          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28212
28213          # Extra M4 quote needed to protect [] in grep expression.
28214          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28215          if test "x$FOUND_CORRECT_VERSION" = x; then
28216            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28218            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28219$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28220            BOOT_JDK_FOUND=no
28221          else
28222            # We're done! :-)
28223            BOOT_JDK_FOUND=yes
28224
28225  # Only process if variable expands to non-empty
28226
28227  if test "x$BOOT_JDK" != x; then
28228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28229
28230  # Input might be given as Windows format, start by converting to
28231  # unix format.
28232  path="$BOOT_JDK"
28233  new_path=`$CYGPATH -u "$path"`
28234
28235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28238  # "foo.exe" is OK but "foo" is an error.
28239  #
28240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28241  # It is also a way to make sure we got the proper file name for the real test later on.
28242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28243  if test "x$test_shortpath" = x; then
28244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28245$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28246    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28247  fi
28248
28249  # Call helper function which possibly converts this using DOS-style short mode.
28250  # If so, the updated path is stored in $new_path.
28251
28252  input_path="$new_path"
28253  # Check if we need to convert this using DOS-style short mode. If the path
28254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28255  # take no chances and rewrite it.
28256  # Note: m4 eats our [], so we need to use [ and ] instead.
28257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28258  if test "x$has_forbidden_chars" != x; then
28259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28263      # Going to short mode and back again did indeed matter. Since short mode is
28264      # case insensitive, let's make it lowercase to improve readability.
28265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28266      # Now convert it back to Unix-style (cygpath)
28267      input_path=`$CYGPATH -u "$shortmode_path"`
28268      new_path="$input_path"
28269    fi
28270  fi
28271
28272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28273  if test "x$test_cygdrive_prefix" = x; then
28274    # As a simple fix, exclude /usr/bin since it's not a real path.
28275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28277      # a path prefixed by /cygdrive for fixpath to work.
28278      new_path="$CYGWIN_ROOT_PATH$input_path"
28279    fi
28280  fi
28281
28282
28283  if test "x$path" != "x$new_path"; then
28284    BOOT_JDK="$new_path"
28285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28287  fi
28288
28289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28290
28291  path="$BOOT_JDK"
28292  has_colon=`$ECHO $path | $GREP ^.:`
28293  new_path="$path"
28294  if test "x$has_colon" = x; then
28295    # Not in mixed or Windows style, start by that.
28296    new_path=`cmd //c echo $path`
28297  fi
28298
28299
28300  input_path="$new_path"
28301  # Check if we need to convert this using DOS-style short mode. If the path
28302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28303  # take no chances and rewrite it.
28304  # Note: m4 eats our [], so we need to use [ and ] instead.
28305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28306  if test "x$has_forbidden_chars" != x; then
28307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28309  fi
28310
28311
28312  windows_path="$new_path"
28313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28314    unix_path=`$CYGPATH -u "$windows_path"`
28315    new_path="$unix_path"
28316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28318    new_path="$unix_path"
28319  fi
28320
28321  if test "x$path" != "x$new_path"; then
28322    BOOT_JDK="$new_path"
28323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28324$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28325  fi
28326
28327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28329
28330    else
28331      # We're on a unix platform. Hooray! :)
28332      path="$BOOT_JDK"
28333      has_space=`$ECHO "$path" | $GREP " "`
28334      if test "x$has_space" != x; then
28335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28337        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28338      fi
28339
28340      # Use eval to expand a potential ~
28341      eval path="$path"
28342      if test ! -f "$path" && test ! -d "$path"; then
28343        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28344      fi
28345
28346      if test -d "$path"; then
28347        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28348      else
28349        dir="`$DIRNAME "$path"`"
28350        base="`$BASENAME "$path"`"
28351        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28352      fi
28353    fi
28354  fi
28355
28356            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28357$as_echo_n "checking for Boot JDK... " >&6; }
28358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28359$as_echo "$BOOT_JDK" >&6; }
28360            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28361$as_echo_n "checking Boot JDK version... " >&6; }
28362            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28364$as_echo "$BOOT_JDK_VERSION" >&6; }
28365          fi # end check jdk version
28366        fi # end check javac
28367      fi # end check java
28368    fi # end check boot jdk found
28369  fi
28370
28371    done
28372  fi
28373
28374
28375    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28376    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28377      # Do we have a bin/java?
28378      if test ! -x "$BOOT_JDK/bin/java"; then
28379        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28381        BOOT_JDK_FOUND=no
28382      else
28383        # Do we have a bin/javac?
28384        if test ! -x "$BOOT_JDK/bin/javac"; then
28385          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28387          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28388$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28389          BOOT_JDK_FOUND=no
28390        else
28391          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28392          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28393
28394          # Extra M4 quote needed to protect [] in grep expression.
28395          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28396          if test "x$FOUND_CORRECT_VERSION" = x; then
28397            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28398$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28399            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28400$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28401            BOOT_JDK_FOUND=no
28402          else
28403            # We're done! :-)
28404            BOOT_JDK_FOUND=yes
28405
28406  # Only process if variable expands to non-empty
28407
28408  if test "x$BOOT_JDK" != x; then
28409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28410
28411  # Input might be given as Windows format, start by converting to
28412  # unix format.
28413  path="$BOOT_JDK"
28414  new_path=`$CYGPATH -u "$path"`
28415
28416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28419  # "foo.exe" is OK but "foo" is an error.
28420  #
28421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28422  # It is also a way to make sure we got the proper file name for the real test later on.
28423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28424  if test "x$test_shortpath" = x; then
28425    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28426$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28427    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28428  fi
28429
28430  # Call helper function which possibly converts this using DOS-style short mode.
28431  # If so, the updated path is stored in $new_path.
28432
28433  input_path="$new_path"
28434  # Check if we need to convert this using DOS-style short mode. If the path
28435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28436  # take no chances and rewrite it.
28437  # Note: m4 eats our [], so we need to use [ and ] instead.
28438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28439  if test "x$has_forbidden_chars" != x; then
28440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28444      # Going to short mode and back again did indeed matter. Since short mode is
28445      # case insensitive, let's make it lowercase to improve readability.
28446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28447      # Now convert it back to Unix-style (cygpath)
28448      input_path=`$CYGPATH -u "$shortmode_path"`
28449      new_path="$input_path"
28450    fi
28451  fi
28452
28453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28454  if test "x$test_cygdrive_prefix" = x; then
28455    # As a simple fix, exclude /usr/bin since it's not a real path.
28456    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28458      # a path prefixed by /cygdrive for fixpath to work.
28459      new_path="$CYGWIN_ROOT_PATH$input_path"
28460    fi
28461  fi
28462
28463
28464  if test "x$path" != "x$new_path"; then
28465    BOOT_JDK="$new_path"
28466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28467$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28468  fi
28469
28470    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28471
28472  path="$BOOT_JDK"
28473  has_colon=`$ECHO $path | $GREP ^.:`
28474  new_path="$path"
28475  if test "x$has_colon" = x; then
28476    # Not in mixed or Windows style, start by that.
28477    new_path=`cmd //c echo $path`
28478  fi
28479
28480
28481  input_path="$new_path"
28482  # Check if we need to convert this using DOS-style short mode. If the path
28483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28484  # take no chances and rewrite it.
28485  # Note: m4 eats our [], so we need to use [ and ] instead.
28486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28487  if test "x$has_forbidden_chars" != x; then
28488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28490  fi
28491
28492
28493  windows_path="$new_path"
28494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28495    unix_path=`$CYGPATH -u "$windows_path"`
28496    new_path="$unix_path"
28497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28499    new_path="$unix_path"
28500  fi
28501
28502  if test "x$path" != "x$new_path"; then
28503    BOOT_JDK="$new_path"
28504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28506  fi
28507
28508  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28509  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28510
28511    else
28512      # We're on a unix platform. Hooray! :)
28513      path="$BOOT_JDK"
28514      has_space=`$ECHO "$path" | $GREP " "`
28515      if test "x$has_space" != x; then
28516        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28517$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28518        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28519      fi
28520
28521      # Use eval to expand a potential ~
28522      eval path="$path"
28523      if test ! -f "$path" && test ! -d "$path"; then
28524        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28525      fi
28526
28527      if test -d "$path"; then
28528        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28529      else
28530        dir="`$DIRNAME "$path"`"
28531        base="`$BASENAME "$path"`"
28532        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28533      fi
28534    fi
28535  fi
28536
28537            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28538$as_echo_n "checking for Boot JDK... " >&6; }
28539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28540$as_echo "$BOOT_JDK" >&6; }
28541            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28542$as_echo_n "checking Boot JDK version... " >&6; }
28543            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28545$as_echo "$BOOT_JDK_VERSION" >&6; }
28546          fi # end check jdk version
28547        fi # end check javac
28548      fi # end check java
28549    fi # end check boot jdk found
28550  fi
28551
28552  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28553
28554  if test "x$BOOT_JDK_FOUND" = xno; then
28555    # Now execute the test
28556
28557  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28558  BOOT_JDK_SUFFIX="/Contents/Home"
28559  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28560  if test "x$ALL_JDKS_FOUND" != x; then
28561    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28562
28563  if test "x$BOOT_JDK_FOUND" = xno; then
28564    # Now execute the test
28565
28566        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28567        if test -d "$BOOT_JDK"; then
28568          BOOT_JDK_FOUND=maybe
28569          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28570$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28571        fi
28572
28573
28574    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28575    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28576      # Do we have a bin/java?
28577      if test ! -x "$BOOT_JDK/bin/java"; then
28578        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28580        BOOT_JDK_FOUND=no
28581      else
28582        # Do we have a bin/javac?
28583        if test ! -x "$BOOT_JDK/bin/javac"; then
28584          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28586          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28587$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28588          BOOT_JDK_FOUND=no
28589        else
28590          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28591          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28592
28593          # Extra M4 quote needed to protect [] in grep expression.
28594          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28595          if test "x$FOUND_CORRECT_VERSION" = x; then
28596            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28598            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28599$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28600            BOOT_JDK_FOUND=no
28601          else
28602            # We're done! :-)
28603            BOOT_JDK_FOUND=yes
28604
28605  # Only process if variable expands to non-empty
28606
28607  if test "x$BOOT_JDK" != x; then
28608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28609
28610  # Input might be given as Windows format, start by converting to
28611  # unix format.
28612  path="$BOOT_JDK"
28613  new_path=`$CYGPATH -u "$path"`
28614
28615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28618  # "foo.exe" is OK but "foo" is an error.
28619  #
28620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28621  # It is also a way to make sure we got the proper file name for the real test later on.
28622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28623  if test "x$test_shortpath" = x; then
28624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28625$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28626    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28627  fi
28628
28629  # Call helper function which possibly converts this using DOS-style short mode.
28630  # If so, the updated path is stored in $new_path.
28631
28632  input_path="$new_path"
28633  # Check if we need to convert this using DOS-style short mode. If the path
28634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28635  # take no chances and rewrite it.
28636  # Note: m4 eats our [], so we need to use [ and ] instead.
28637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28638  if test "x$has_forbidden_chars" != x; then
28639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28643      # Going to short mode and back again did indeed matter. Since short mode is
28644      # case insensitive, let's make it lowercase to improve readability.
28645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28646      # Now convert it back to Unix-style (cygpath)
28647      input_path=`$CYGPATH -u "$shortmode_path"`
28648      new_path="$input_path"
28649    fi
28650  fi
28651
28652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28653  if test "x$test_cygdrive_prefix" = x; then
28654    # As a simple fix, exclude /usr/bin since it's not a real path.
28655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28657      # a path prefixed by /cygdrive for fixpath to work.
28658      new_path="$CYGWIN_ROOT_PATH$input_path"
28659    fi
28660  fi
28661
28662
28663  if test "x$path" != "x$new_path"; then
28664    BOOT_JDK="$new_path"
28665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28666$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28667  fi
28668
28669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28670
28671  path="$BOOT_JDK"
28672  has_colon=`$ECHO $path | $GREP ^.:`
28673  new_path="$path"
28674  if test "x$has_colon" = x; then
28675    # Not in mixed or Windows style, start by that.
28676    new_path=`cmd //c echo $path`
28677  fi
28678
28679
28680  input_path="$new_path"
28681  # Check if we need to convert this using DOS-style short mode. If the path
28682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28683  # take no chances and rewrite it.
28684  # Note: m4 eats our [], so we need to use [ and ] instead.
28685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28686  if test "x$has_forbidden_chars" != x; then
28687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28689  fi
28690
28691
28692  windows_path="$new_path"
28693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28694    unix_path=`$CYGPATH -u "$windows_path"`
28695    new_path="$unix_path"
28696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28698    new_path="$unix_path"
28699  fi
28700
28701  if test "x$path" != "x$new_path"; then
28702    BOOT_JDK="$new_path"
28703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28704$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28705  fi
28706
28707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28709
28710    else
28711      # We're on a unix platform. Hooray! :)
28712      path="$BOOT_JDK"
28713      has_space=`$ECHO "$path" | $GREP " "`
28714      if test "x$has_space" != x; then
28715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28716$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28717        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28718      fi
28719
28720      # Use eval to expand a potential ~
28721      eval path="$path"
28722      if test ! -f "$path" && test ! -d "$path"; then
28723        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28724      fi
28725
28726      if test -d "$path"; then
28727        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28728      else
28729        dir="`$DIRNAME "$path"`"
28730        base="`$BASENAME "$path"`"
28731        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28732      fi
28733    fi
28734  fi
28735
28736            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28737$as_echo_n "checking for Boot JDK... " >&6; }
28738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28739$as_echo "$BOOT_JDK" >&6; }
28740            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28741$as_echo_n "checking Boot JDK version... " >&6; }
28742            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28743            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28744$as_echo "$BOOT_JDK_VERSION" >&6; }
28745          fi # end check jdk version
28746        fi # end check javac
28747      fi # end check java
28748    fi # end check boot jdk found
28749  fi
28750
28751    done
28752  fi
28753
28754
28755    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28756    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28757      # Do we have a bin/java?
28758      if test ! -x "$BOOT_JDK/bin/java"; then
28759        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28761        BOOT_JDK_FOUND=no
28762      else
28763        # Do we have a bin/javac?
28764        if test ! -x "$BOOT_JDK/bin/javac"; then
28765          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28767          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28768$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28769          BOOT_JDK_FOUND=no
28770        else
28771          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28772          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28773
28774          # Extra M4 quote needed to protect [] in grep expression.
28775          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28776          if test "x$FOUND_CORRECT_VERSION" = x; then
28777            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28779            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28780$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28781            BOOT_JDK_FOUND=no
28782          else
28783            # We're done! :-)
28784            BOOT_JDK_FOUND=yes
28785
28786  # Only process if variable expands to non-empty
28787
28788  if test "x$BOOT_JDK" != x; then
28789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28790
28791  # Input might be given as Windows format, start by converting to
28792  # unix format.
28793  path="$BOOT_JDK"
28794  new_path=`$CYGPATH -u "$path"`
28795
28796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28799  # "foo.exe" is OK but "foo" is an error.
28800  #
28801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28802  # It is also a way to make sure we got the proper file name for the real test later on.
28803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28804  if test "x$test_shortpath" = x; then
28805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28806$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28807    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28808  fi
28809
28810  # Call helper function which possibly converts this using DOS-style short mode.
28811  # If so, the updated path is stored in $new_path.
28812
28813  input_path="$new_path"
28814  # Check if we need to convert this using DOS-style short mode. If the path
28815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28816  # take no chances and rewrite it.
28817  # Note: m4 eats our [], so we need to use [ and ] instead.
28818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28819  if test "x$has_forbidden_chars" != x; then
28820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28824      # Going to short mode and back again did indeed matter. Since short mode is
28825      # case insensitive, let's make it lowercase to improve readability.
28826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28827      # Now convert it back to Unix-style (cygpath)
28828      input_path=`$CYGPATH -u "$shortmode_path"`
28829      new_path="$input_path"
28830    fi
28831  fi
28832
28833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28834  if test "x$test_cygdrive_prefix" = x; then
28835    # As a simple fix, exclude /usr/bin since it's not a real path.
28836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28838      # a path prefixed by /cygdrive for fixpath to work.
28839      new_path="$CYGWIN_ROOT_PATH$input_path"
28840    fi
28841  fi
28842
28843
28844  if test "x$path" != "x$new_path"; then
28845    BOOT_JDK="$new_path"
28846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28848  fi
28849
28850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28851
28852  path="$BOOT_JDK"
28853  has_colon=`$ECHO $path | $GREP ^.:`
28854  new_path="$path"
28855  if test "x$has_colon" = x; then
28856    # Not in mixed or Windows style, start by that.
28857    new_path=`cmd //c echo $path`
28858  fi
28859
28860
28861  input_path="$new_path"
28862  # Check if we need to convert this using DOS-style short mode. If the path
28863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28864  # take no chances and rewrite it.
28865  # Note: m4 eats our [], so we need to use [ and ] instead.
28866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28867  if test "x$has_forbidden_chars" != x; then
28868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28870  fi
28871
28872
28873  windows_path="$new_path"
28874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28875    unix_path=`$CYGPATH -u "$windows_path"`
28876    new_path="$unix_path"
28877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28879    new_path="$unix_path"
28880  fi
28881
28882  if test "x$path" != "x$new_path"; then
28883    BOOT_JDK="$new_path"
28884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28886  fi
28887
28888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28890
28891    else
28892      # We're on a unix platform. Hooray! :)
28893      path="$BOOT_JDK"
28894      has_space=`$ECHO "$path" | $GREP " "`
28895      if test "x$has_space" != x; then
28896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28898        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28899      fi
28900
28901      # Use eval to expand a potential ~
28902      eval path="$path"
28903      if test ! -f "$path" && test ! -d "$path"; then
28904        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28905      fi
28906
28907      if test -d "$path"; then
28908        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28909      else
28910        dir="`$DIRNAME "$path"`"
28911        base="`$BASENAME "$path"`"
28912        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28913      fi
28914    fi
28915  fi
28916
28917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28918$as_echo_n "checking for Boot JDK... " >&6; }
28919            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28920$as_echo "$BOOT_JDK" >&6; }
28921            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28922$as_echo_n "checking Boot JDK version... " >&6; }
28923            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28925$as_echo "$BOOT_JDK_VERSION" >&6; }
28926          fi # end check jdk version
28927        fi # end check javac
28928      fi # end check java
28929    fi # end check boot jdk found
28930  fi
28931
28932
28933  if test "x$BOOT_JDK_FOUND" = xno; then
28934    # Now execute the test
28935
28936  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28937  BOOT_JDK_SUFFIX="/Contents/Home"
28938  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28939  if test "x$ALL_JDKS_FOUND" != x; then
28940    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28941
28942  if test "x$BOOT_JDK_FOUND" = xno; then
28943    # Now execute the test
28944
28945        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28946        if test -d "$BOOT_JDK"; then
28947          BOOT_JDK_FOUND=maybe
28948          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28949$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28950        fi
28951
28952
28953    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28954    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28955      # Do we have a bin/java?
28956      if test ! -x "$BOOT_JDK/bin/java"; then
28957        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28959        BOOT_JDK_FOUND=no
28960      else
28961        # Do we have a bin/javac?
28962        if test ! -x "$BOOT_JDK/bin/javac"; then
28963          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28965          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28966$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28967          BOOT_JDK_FOUND=no
28968        else
28969          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28970          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28971
28972          # Extra M4 quote needed to protect [] in grep expression.
28973          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28974          if test "x$FOUND_CORRECT_VERSION" = x; then
28975            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28977            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28978$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28979            BOOT_JDK_FOUND=no
28980          else
28981            # We're done! :-)
28982            BOOT_JDK_FOUND=yes
28983
28984  # Only process if variable expands to non-empty
28985
28986  if test "x$BOOT_JDK" != x; then
28987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28988
28989  # Input might be given as Windows format, start by converting to
28990  # unix format.
28991  path="$BOOT_JDK"
28992  new_path=`$CYGPATH -u "$path"`
28993
28994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28997  # "foo.exe" is OK but "foo" is an error.
28998  #
28999  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29000  # It is also a way to make sure we got the proper file name for the real test later on.
29001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29002  if test "x$test_shortpath" = x; then
29003    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29005    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29006  fi
29007
29008  # Call helper function which possibly converts this using DOS-style short mode.
29009  # If so, the updated path is stored in $new_path.
29010
29011  input_path="$new_path"
29012  # Check if we need to convert this using DOS-style short mode. If the path
29013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29014  # take no chances and rewrite it.
29015  # Note: m4 eats our [], so we need to use [ and ] instead.
29016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29017  if test "x$has_forbidden_chars" != x; then
29018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29022      # Going to short mode and back again did indeed matter. Since short mode is
29023      # case insensitive, let's make it lowercase to improve readability.
29024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29025      # Now convert it back to Unix-style (cygpath)
29026      input_path=`$CYGPATH -u "$shortmode_path"`
29027      new_path="$input_path"
29028    fi
29029  fi
29030
29031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29032  if test "x$test_cygdrive_prefix" = x; then
29033    # As a simple fix, exclude /usr/bin since it's not a real path.
29034    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29036      # a path prefixed by /cygdrive for fixpath to work.
29037      new_path="$CYGWIN_ROOT_PATH$input_path"
29038    fi
29039  fi
29040
29041
29042  if test "x$path" != "x$new_path"; then
29043    BOOT_JDK="$new_path"
29044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29045$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29046  fi
29047
29048    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29049
29050  path="$BOOT_JDK"
29051  has_colon=`$ECHO $path | $GREP ^.:`
29052  new_path="$path"
29053  if test "x$has_colon" = x; then
29054    # Not in mixed or Windows style, start by that.
29055    new_path=`cmd //c echo $path`
29056  fi
29057
29058
29059  input_path="$new_path"
29060  # Check if we need to convert this using DOS-style short mode. If the path
29061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29062  # take no chances and rewrite it.
29063  # Note: m4 eats our [], so we need to use [ and ] instead.
29064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29065  if test "x$has_forbidden_chars" != x; then
29066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29068  fi
29069
29070
29071  windows_path="$new_path"
29072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29073    unix_path=`$CYGPATH -u "$windows_path"`
29074    new_path="$unix_path"
29075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29077    new_path="$unix_path"
29078  fi
29079
29080  if test "x$path" != "x$new_path"; then
29081    BOOT_JDK="$new_path"
29082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29083$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29084  fi
29085
29086  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29087  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29088
29089    else
29090      # We're on a unix platform. Hooray! :)
29091      path="$BOOT_JDK"
29092      has_space=`$ECHO "$path" | $GREP " "`
29093      if test "x$has_space" != x; then
29094        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29095$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29096        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29097      fi
29098
29099      # Use eval to expand a potential ~
29100      eval path="$path"
29101      if test ! -f "$path" && test ! -d "$path"; then
29102        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29103      fi
29104
29105      if test -d "$path"; then
29106        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29107      else
29108        dir="`$DIRNAME "$path"`"
29109        base="`$BASENAME "$path"`"
29110        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29111      fi
29112    fi
29113  fi
29114
29115            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29116$as_echo_n "checking for Boot JDK... " >&6; }
29117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29118$as_echo "$BOOT_JDK" >&6; }
29119            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29120$as_echo_n "checking Boot JDK version... " >&6; }
29121            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29122            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29123$as_echo "$BOOT_JDK_VERSION" >&6; }
29124          fi # end check jdk version
29125        fi # end check javac
29126      fi # end check java
29127    fi # end check boot jdk found
29128  fi
29129
29130    done
29131  fi
29132
29133
29134    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29135    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29136      # Do we have a bin/java?
29137      if test ! -x "$BOOT_JDK/bin/java"; then
29138        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29140        BOOT_JDK_FOUND=no
29141      else
29142        # Do we have a bin/javac?
29143        if test ! -x "$BOOT_JDK/bin/javac"; then
29144          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29146          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29147$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29148          BOOT_JDK_FOUND=no
29149        else
29150          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29151          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29152
29153          # Extra M4 quote needed to protect [] in grep expression.
29154          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29155          if test "x$FOUND_CORRECT_VERSION" = x; then
29156            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29158            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29159$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29160            BOOT_JDK_FOUND=no
29161          else
29162            # We're done! :-)
29163            BOOT_JDK_FOUND=yes
29164
29165  # Only process if variable expands to non-empty
29166
29167  if test "x$BOOT_JDK" != x; then
29168    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29169
29170  # Input might be given as Windows format, start by converting to
29171  # unix format.
29172  path="$BOOT_JDK"
29173  new_path=`$CYGPATH -u "$path"`
29174
29175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29178  # "foo.exe" is OK but "foo" is an error.
29179  #
29180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29181  # It is also a way to make sure we got the proper file name for the real test later on.
29182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29183  if test "x$test_shortpath" = x; then
29184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29185$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29186    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29187  fi
29188
29189  # Call helper function which possibly converts this using DOS-style short mode.
29190  # If so, the updated path is stored in $new_path.
29191
29192  input_path="$new_path"
29193  # Check if we need to convert this using DOS-style short mode. If the path
29194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29195  # take no chances and rewrite it.
29196  # Note: m4 eats our [], so we need to use [ and ] instead.
29197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29198  if test "x$has_forbidden_chars" != x; then
29199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29203      # Going to short mode and back again did indeed matter. Since short mode is
29204      # case insensitive, let's make it lowercase to improve readability.
29205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29206      # Now convert it back to Unix-style (cygpath)
29207      input_path=`$CYGPATH -u "$shortmode_path"`
29208      new_path="$input_path"
29209    fi
29210  fi
29211
29212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29213  if test "x$test_cygdrive_prefix" = x; then
29214    # As a simple fix, exclude /usr/bin since it's not a real path.
29215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29217      # a path prefixed by /cygdrive for fixpath to work.
29218      new_path="$CYGWIN_ROOT_PATH$input_path"
29219    fi
29220  fi
29221
29222
29223  if test "x$path" != "x$new_path"; then
29224    BOOT_JDK="$new_path"
29225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29226$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29227  fi
29228
29229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29230
29231  path="$BOOT_JDK"
29232  has_colon=`$ECHO $path | $GREP ^.:`
29233  new_path="$path"
29234  if test "x$has_colon" = x; then
29235    # Not in mixed or Windows style, start by that.
29236    new_path=`cmd //c echo $path`
29237  fi
29238
29239
29240  input_path="$new_path"
29241  # Check if we need to convert this using DOS-style short mode. If the path
29242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29243  # take no chances and rewrite it.
29244  # Note: m4 eats our [], so we need to use [ and ] instead.
29245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29246  if test "x$has_forbidden_chars" != x; then
29247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29249  fi
29250
29251
29252  windows_path="$new_path"
29253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29254    unix_path=`$CYGPATH -u "$windows_path"`
29255    new_path="$unix_path"
29256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29258    new_path="$unix_path"
29259  fi
29260
29261  if test "x$path" != "x$new_path"; then
29262    BOOT_JDK="$new_path"
29263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29264$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29265  fi
29266
29267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29269
29270    else
29271      # We're on a unix platform. Hooray! :)
29272      path="$BOOT_JDK"
29273      has_space=`$ECHO "$path" | $GREP " "`
29274      if test "x$has_space" != x; then
29275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29276$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29277        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29278      fi
29279
29280      # Use eval to expand a potential ~
29281      eval path="$path"
29282      if test ! -f "$path" && test ! -d "$path"; then
29283        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29284      fi
29285
29286      if test -d "$path"; then
29287        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29288      else
29289        dir="`$DIRNAME "$path"`"
29290        base="`$BASENAME "$path"`"
29291        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29292      fi
29293    fi
29294  fi
29295
29296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29297$as_echo_n "checking for Boot JDK... " >&6; }
29298            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29299$as_echo "$BOOT_JDK" >&6; }
29300            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29301$as_echo_n "checking Boot JDK version... " >&6; }
29302            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29304$as_echo "$BOOT_JDK_VERSION" >&6; }
29305          fi # end check jdk version
29306        fi # end check javac
29307      fi # end check java
29308    fi # end check boot jdk found
29309  fi
29310
29311  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29312
29313  if test "x$BOOT_JDK_FOUND" = xno; then
29314    # Now execute the test
29315
29316  BOOT_JDK_PREFIX="/usr/lib/jvm"
29317  BOOT_JDK_SUFFIX=""
29318  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29319  if test "x$ALL_JDKS_FOUND" != x; then
29320    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29321
29322  if test "x$BOOT_JDK_FOUND" = xno; then
29323    # Now execute the test
29324
29325        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29326        if test -d "$BOOT_JDK"; then
29327          BOOT_JDK_FOUND=maybe
29328          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29329$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29330        fi
29331
29332
29333    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29334    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29335      # Do we have a bin/java?
29336      if test ! -x "$BOOT_JDK/bin/java"; then
29337        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29339        BOOT_JDK_FOUND=no
29340      else
29341        # Do we have a bin/javac?
29342        if test ! -x "$BOOT_JDK/bin/javac"; then
29343          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29345          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29346$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29347          BOOT_JDK_FOUND=no
29348        else
29349          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29350          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29351
29352          # Extra M4 quote needed to protect [] in grep expression.
29353          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29354          if test "x$FOUND_CORRECT_VERSION" = x; then
29355            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29357            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29358$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29359            BOOT_JDK_FOUND=no
29360          else
29361            # We're done! :-)
29362            BOOT_JDK_FOUND=yes
29363
29364  # Only process if variable expands to non-empty
29365
29366  if test "x$BOOT_JDK" != x; then
29367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29368
29369  # Input might be given as Windows format, start by converting to
29370  # unix format.
29371  path="$BOOT_JDK"
29372  new_path=`$CYGPATH -u "$path"`
29373
29374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29377  # "foo.exe" is OK but "foo" is an error.
29378  #
29379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29380  # It is also a way to make sure we got the proper file name for the real test later on.
29381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29382  if test "x$test_shortpath" = x; then
29383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29385    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29386  fi
29387
29388  # Call helper function which possibly converts this using DOS-style short mode.
29389  # If so, the updated path is stored in $new_path.
29390
29391  input_path="$new_path"
29392  # Check if we need to convert this using DOS-style short mode. If the path
29393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29394  # take no chances and rewrite it.
29395  # Note: m4 eats our [], so we need to use [ and ] instead.
29396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29397  if test "x$has_forbidden_chars" != x; then
29398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29402      # Going to short mode and back again did indeed matter. Since short mode is
29403      # case insensitive, let's make it lowercase to improve readability.
29404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29405      # Now convert it back to Unix-style (cygpath)
29406      input_path=`$CYGPATH -u "$shortmode_path"`
29407      new_path="$input_path"
29408    fi
29409  fi
29410
29411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29412  if test "x$test_cygdrive_prefix" = x; then
29413    # As a simple fix, exclude /usr/bin since it's not a real path.
29414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29416      # a path prefixed by /cygdrive for fixpath to work.
29417      new_path="$CYGWIN_ROOT_PATH$input_path"
29418    fi
29419  fi
29420
29421
29422  if test "x$path" != "x$new_path"; then
29423    BOOT_JDK="$new_path"
29424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29426  fi
29427
29428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29429
29430  path="$BOOT_JDK"
29431  has_colon=`$ECHO $path | $GREP ^.:`
29432  new_path="$path"
29433  if test "x$has_colon" = x; then
29434    # Not in mixed or Windows style, start by that.
29435    new_path=`cmd //c echo $path`
29436  fi
29437
29438
29439  input_path="$new_path"
29440  # Check if we need to convert this using DOS-style short mode. If the path
29441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29442  # take no chances and rewrite it.
29443  # Note: m4 eats our [], so we need to use [ and ] instead.
29444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29445  if test "x$has_forbidden_chars" != x; then
29446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29448  fi
29449
29450
29451  windows_path="$new_path"
29452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29453    unix_path=`$CYGPATH -u "$windows_path"`
29454    new_path="$unix_path"
29455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29457    new_path="$unix_path"
29458  fi
29459
29460  if test "x$path" != "x$new_path"; then
29461    BOOT_JDK="$new_path"
29462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29464  fi
29465
29466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29468
29469    else
29470      # We're on a unix platform. Hooray! :)
29471      path="$BOOT_JDK"
29472      has_space=`$ECHO "$path" | $GREP " "`
29473      if test "x$has_space" != x; then
29474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29476        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29477      fi
29478
29479      # Use eval to expand a potential ~
29480      eval path="$path"
29481      if test ! -f "$path" && test ! -d "$path"; then
29482        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29483      fi
29484
29485      if test -d "$path"; then
29486        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29487      else
29488        dir="`$DIRNAME "$path"`"
29489        base="`$BASENAME "$path"`"
29490        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29491      fi
29492    fi
29493  fi
29494
29495            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29496$as_echo_n "checking for Boot JDK... " >&6; }
29497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29498$as_echo "$BOOT_JDK" >&6; }
29499            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29500$as_echo_n "checking Boot JDK version... " >&6; }
29501            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29502            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29503$as_echo "$BOOT_JDK_VERSION" >&6; }
29504          fi # end check jdk version
29505        fi # end check javac
29506      fi # end check java
29507    fi # end check boot jdk found
29508  fi
29509
29510    done
29511  fi
29512
29513
29514    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29515    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29516      # Do we have a bin/java?
29517      if test ! -x "$BOOT_JDK/bin/java"; then
29518        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29520        BOOT_JDK_FOUND=no
29521      else
29522        # Do we have a bin/javac?
29523        if test ! -x "$BOOT_JDK/bin/javac"; then
29524          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29526          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29527$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29528          BOOT_JDK_FOUND=no
29529        else
29530          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29531          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29532
29533          # Extra M4 quote needed to protect [] in grep expression.
29534          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29535          if test "x$FOUND_CORRECT_VERSION" = x; then
29536            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29537$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29538            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29539$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29540            BOOT_JDK_FOUND=no
29541          else
29542            # We're done! :-)
29543            BOOT_JDK_FOUND=yes
29544
29545  # Only process if variable expands to non-empty
29546
29547  if test "x$BOOT_JDK" != x; then
29548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29549
29550  # Input might be given as Windows format, start by converting to
29551  # unix format.
29552  path="$BOOT_JDK"
29553  new_path=`$CYGPATH -u "$path"`
29554
29555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29558  # "foo.exe" is OK but "foo" is an error.
29559  #
29560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29561  # It is also a way to make sure we got the proper file name for the real test later on.
29562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29563  if test "x$test_shortpath" = x; then
29564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29565$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29566    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29567  fi
29568
29569  # Call helper function which possibly converts this using DOS-style short mode.
29570  # If so, the updated path is stored in $new_path.
29571
29572  input_path="$new_path"
29573  # Check if we need to convert this using DOS-style short mode. If the path
29574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29575  # take no chances and rewrite it.
29576  # Note: m4 eats our [], so we need to use [ and ] instead.
29577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29578  if test "x$has_forbidden_chars" != x; then
29579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29583      # Going to short mode and back again did indeed matter. Since short mode is
29584      # case insensitive, let's make it lowercase to improve readability.
29585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29586      # Now convert it back to Unix-style (cygpath)
29587      input_path=`$CYGPATH -u "$shortmode_path"`
29588      new_path="$input_path"
29589    fi
29590  fi
29591
29592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29593  if test "x$test_cygdrive_prefix" = x; then
29594    # As a simple fix, exclude /usr/bin since it's not a real path.
29595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29597      # a path prefixed by /cygdrive for fixpath to work.
29598      new_path="$CYGWIN_ROOT_PATH$input_path"
29599    fi
29600  fi
29601
29602
29603  if test "x$path" != "x$new_path"; then
29604    BOOT_JDK="$new_path"
29605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29606$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29607  fi
29608
29609    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29610
29611  path="$BOOT_JDK"
29612  has_colon=`$ECHO $path | $GREP ^.:`
29613  new_path="$path"
29614  if test "x$has_colon" = x; then
29615    # Not in mixed or Windows style, start by that.
29616    new_path=`cmd //c echo $path`
29617  fi
29618
29619
29620  input_path="$new_path"
29621  # Check if we need to convert this using DOS-style short mode. If the path
29622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29623  # take no chances and rewrite it.
29624  # Note: m4 eats our [], so we need to use [ and ] instead.
29625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29626  if test "x$has_forbidden_chars" != x; then
29627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29629  fi
29630
29631
29632  windows_path="$new_path"
29633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29634    unix_path=`$CYGPATH -u "$windows_path"`
29635    new_path="$unix_path"
29636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29638    new_path="$unix_path"
29639  fi
29640
29641  if test "x$path" != "x$new_path"; then
29642    BOOT_JDK="$new_path"
29643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29644$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29645  fi
29646
29647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29649
29650    else
29651      # We're on a unix platform. Hooray! :)
29652      path="$BOOT_JDK"
29653      has_space=`$ECHO "$path" | $GREP " "`
29654      if test "x$has_space" != x; then
29655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29656$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29657        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29658      fi
29659
29660      # Use eval to expand a potential ~
29661      eval path="$path"
29662      if test ! -f "$path" && test ! -d "$path"; then
29663        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29664      fi
29665
29666      if test -d "$path"; then
29667        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29668      else
29669        dir="`$DIRNAME "$path"`"
29670        base="`$BASENAME "$path"`"
29671        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29672      fi
29673    fi
29674  fi
29675
29676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29677$as_echo_n "checking for Boot JDK... " >&6; }
29678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29679$as_echo "$BOOT_JDK" >&6; }
29680            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29681$as_echo_n "checking Boot JDK version... " >&6; }
29682            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29684$as_echo "$BOOT_JDK_VERSION" >&6; }
29685          fi # end check jdk version
29686        fi # end check javac
29687      fi # end check java
29688    fi # end check boot jdk found
29689  fi
29690
29691  fi
29692
29693
29694    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29695    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29696      # Do we have a bin/java?
29697      if test ! -x "$BOOT_JDK/bin/java"; then
29698        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29700        BOOT_JDK_FOUND=no
29701      else
29702        # Do we have a bin/javac?
29703        if test ! -x "$BOOT_JDK/bin/javac"; then
29704          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29706          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29707$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29708          BOOT_JDK_FOUND=no
29709        else
29710          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29711          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29712
29713          # Extra M4 quote needed to protect [] in grep expression.
29714          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29715          if test "x$FOUND_CORRECT_VERSION" = x; then
29716            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29718            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29719$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29720            BOOT_JDK_FOUND=no
29721          else
29722            # We're done! :-)
29723            BOOT_JDK_FOUND=yes
29724
29725  # Only process if variable expands to non-empty
29726
29727  if test "x$BOOT_JDK" != x; then
29728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29729
29730  # Input might be given as Windows format, start by converting to
29731  # unix format.
29732  path="$BOOT_JDK"
29733  new_path=`$CYGPATH -u "$path"`
29734
29735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29738  # "foo.exe" is OK but "foo" is an error.
29739  #
29740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29741  # It is also a way to make sure we got the proper file name for the real test later on.
29742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29743  if test "x$test_shortpath" = x; then
29744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29745$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29746    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29747  fi
29748
29749  # Call helper function which possibly converts this using DOS-style short mode.
29750  # If so, the updated path is stored in $new_path.
29751
29752  input_path="$new_path"
29753  # Check if we need to convert this using DOS-style short mode. If the path
29754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29755  # take no chances and rewrite it.
29756  # Note: m4 eats our [], so we need to use [ and ] instead.
29757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29758  if test "x$has_forbidden_chars" != x; then
29759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29763      # Going to short mode and back again did indeed matter. Since short mode is
29764      # case insensitive, let's make it lowercase to improve readability.
29765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29766      # Now convert it back to Unix-style (cygpath)
29767      input_path=`$CYGPATH -u "$shortmode_path"`
29768      new_path="$input_path"
29769    fi
29770  fi
29771
29772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29773  if test "x$test_cygdrive_prefix" = x; then
29774    # As a simple fix, exclude /usr/bin since it's not a real path.
29775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29777      # a path prefixed by /cygdrive for fixpath to work.
29778      new_path="$CYGWIN_ROOT_PATH$input_path"
29779    fi
29780  fi
29781
29782
29783  if test "x$path" != "x$new_path"; then
29784    BOOT_JDK="$new_path"
29785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29786$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29787  fi
29788
29789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29790
29791  path="$BOOT_JDK"
29792  has_colon=`$ECHO $path | $GREP ^.:`
29793  new_path="$path"
29794  if test "x$has_colon" = x; then
29795    # Not in mixed or Windows style, start by that.
29796    new_path=`cmd //c echo $path`
29797  fi
29798
29799
29800  input_path="$new_path"
29801  # Check if we need to convert this using DOS-style short mode. If the path
29802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29803  # take no chances and rewrite it.
29804  # Note: m4 eats our [], so we need to use [ and ] instead.
29805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29806  if test "x$has_forbidden_chars" != x; then
29807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29809  fi
29810
29811
29812  windows_path="$new_path"
29813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29814    unix_path=`$CYGPATH -u "$windows_path"`
29815    new_path="$unix_path"
29816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29818    new_path="$unix_path"
29819  fi
29820
29821  if test "x$path" != "x$new_path"; then
29822    BOOT_JDK="$new_path"
29823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29824$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29825  fi
29826
29827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29829
29830    else
29831      # We're on a unix platform. Hooray! :)
29832      path="$BOOT_JDK"
29833      has_space=`$ECHO "$path" | $GREP " "`
29834      if test "x$has_space" != x; then
29835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29837        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29838      fi
29839
29840      # Use eval to expand a potential ~
29841      eval path="$path"
29842      if test ! -f "$path" && test ! -d "$path"; then
29843        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29844      fi
29845
29846      if test -d "$path"; then
29847        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29848      else
29849        dir="`$DIRNAME "$path"`"
29850        base="`$BASENAME "$path"`"
29851        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29852      fi
29853    fi
29854  fi
29855
29856            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29857$as_echo_n "checking for Boot JDK... " >&6; }
29858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29859$as_echo "$BOOT_JDK" >&6; }
29860            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29861$as_echo_n "checking Boot JDK version... " >&6; }
29862            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29863            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29864$as_echo "$BOOT_JDK_VERSION" >&6; }
29865          fi # end check jdk version
29866        fi # end check javac
29867      fi # end check java
29868    fi # end check boot jdk found
29869  fi
29870
29871
29872  # If we haven't found anything yet, we've truly lost. Give up.
29873  if test "x$BOOT_JDK_FOUND" = xno; then
29874
29875  # Print a helpful message on how to acquire the necessary build dependency.
29876  # openjdk is the help tag: freetype, cups, alsa etc
29877  MISSING_DEPENDENCY=openjdk
29878
29879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29880    cygwin_help $MISSING_DEPENDENCY
29881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29882    msys_help $MISSING_DEPENDENCY
29883  else
29884    PKGHANDLER_COMMAND=
29885
29886    case $PKGHANDLER in
29887      apt-get)
29888        apt_help     $MISSING_DEPENDENCY ;;
29889      yum)
29890        yum_help     $MISSING_DEPENDENCY ;;
29891      port)
29892        port_help    $MISSING_DEPENDENCY ;;
29893      pkgutil)
29894        pkgutil_help $MISSING_DEPENDENCY ;;
29895      pkgadd)
29896        pkgadd_help  $MISSING_DEPENDENCY ;;
29897    esac
29898
29899    if test "x$PKGHANDLER_COMMAND" != x; then
29900      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29901    fi
29902  fi
29903
29904    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29905$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29906    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29907$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29908    as_fn_error $? "Cannot continue" "$LINENO" 5
29909  fi
29910
29911
29912
29913  # Setup tools from the Boot JDK.
29914
29915  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29916
29917  # Publish this variable in the help.
29918
29919
29920  if [ -z "${JAVA+x}" ]; then
29921    # The variable is not set by user, try to locate tool using the code snippet
29922
29923      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29924$as_echo_n "checking for java in Boot JDK... " >&6; }
29925      JAVA=$BOOT_JDK/bin/java
29926      if test ! -x $JAVA; then
29927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29928$as_echo "not found" >&6; }
29929        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29930$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29931        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29932      fi
29933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29934$as_echo "ok" >&6; }
29935
29936
29937  else
29938    # The variable is set, but is it from the command line or the environment?
29939
29940    # Try to remove the string !JAVA! from our list.
29941    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29942    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29943      # If it failed, the variable was not from the command line. Ignore it,
29944      # but warn the user (except for BASH, which is always set by the calling BASH).
29945      if test "xJAVA" != xBASH; then
29946        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29947$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29948      fi
29949      # Try to locate tool using the code snippet
29950
29951      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29952$as_echo_n "checking for java in Boot JDK... " >&6; }
29953      JAVA=$BOOT_JDK/bin/java
29954      if test ! -x $JAVA; then
29955        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29956$as_echo "not found" >&6; }
29957        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29958$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29959        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29960      fi
29961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29962$as_echo "ok" >&6; }
29963
29964
29965    else
29966      # If it succeeded, then it was overridden by the user. We will use it
29967      # for the tool.
29968
29969      # First remove it from the list of overridden variables, so we can test
29970      # for unknown variables in the end.
29971      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29972
29973      # Check if we try to supply an empty value
29974      if test "x$JAVA" = x; then
29975        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29976$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29978$as_echo_n "checking for JAVA... " >&6; }
29979        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29980$as_echo "disabled" >&6; }
29981      else
29982        # Check if the provided tool contains a complete path.
29983        tool_specified="$JAVA"
29984        tool_basename="${tool_specified##*/}"
29985        if test "x$tool_basename" = "x$tool_specified"; then
29986          # A command without a complete path is provided, search $PATH.
29987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29988$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29989          # Extract the first word of "$tool_basename", so it can be a program name with args.
29990set dummy $tool_basename; ac_word=$2
29991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29992$as_echo_n "checking for $ac_word... " >&6; }
29993if ${ac_cv_path_JAVA+:} false; then :
29994  $as_echo_n "(cached) " >&6
29995else
29996  case $JAVA in
29997  [\\/]* | ?:[\\/]*)
29998  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29999  ;;
30000  *)
30001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30002for as_dir in $PATH
30003do
30004  IFS=$as_save_IFS
30005  test -z "$as_dir" && as_dir=.
30006    for ac_exec_ext in '' $ac_executable_extensions; do
30007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30008    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30010    break 2
30011  fi
30012done
30013  done
30014IFS=$as_save_IFS
30015
30016  ;;
30017esac
30018fi
30019JAVA=$ac_cv_path_JAVA
30020if test -n "$JAVA"; then
30021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30022$as_echo "$JAVA" >&6; }
30023else
30024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30025$as_echo "no" >&6; }
30026fi
30027
30028
30029          if test "x$JAVA" = x; then
30030            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30031          fi
30032        else
30033          # Otherwise we believe it is a complete path. Use it as it is.
30034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30035$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30036          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30037$as_echo_n "checking for JAVA... " >&6; }
30038          if test ! -x "$tool_specified"; then
30039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30040$as_echo "not found" >&6; }
30041            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30042          fi
30043          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30044$as_echo "$tool_specified" >&6; }
30045        fi
30046      fi
30047    fi
30048
30049  fi
30050
30051
30052
30053  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30054
30055  # Publish this variable in the help.
30056
30057
30058  if [ -z "${JAVAC+x}" ]; then
30059    # The variable is not set by user, try to locate tool using the code snippet
30060
30061      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30062$as_echo_n "checking for javac in Boot JDK... " >&6; }
30063      JAVAC=$BOOT_JDK/bin/javac
30064      if test ! -x $JAVAC; then
30065        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30066$as_echo "not found" >&6; }
30067        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30068$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30069        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30070      fi
30071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30072$as_echo "ok" >&6; }
30073
30074
30075  else
30076    # The variable is set, but is it from the command line or the environment?
30077
30078    # Try to remove the string !JAVAC! from our list.
30079    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30080    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30081      # If it failed, the variable was not from the command line. Ignore it,
30082      # but warn the user (except for BASH, which is always set by the calling BASH).
30083      if test "xJAVAC" != xBASH; then
30084        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30085$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30086      fi
30087      # Try to locate tool using the code snippet
30088
30089      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30090$as_echo_n "checking for javac in Boot JDK... " >&6; }
30091      JAVAC=$BOOT_JDK/bin/javac
30092      if test ! -x $JAVAC; then
30093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30094$as_echo "not found" >&6; }
30095        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30096$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30097        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30098      fi
30099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30100$as_echo "ok" >&6; }
30101
30102
30103    else
30104      # If it succeeded, then it was overridden by the user. We will use it
30105      # for the tool.
30106
30107      # First remove it from the list of overridden variables, so we can test
30108      # for unknown variables in the end.
30109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30110
30111      # Check if we try to supply an empty value
30112      if test "x$JAVAC" = x; then
30113        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30114$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30115        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30116$as_echo_n "checking for JAVAC... " >&6; }
30117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30118$as_echo "disabled" >&6; }
30119      else
30120        # Check if the provided tool contains a complete path.
30121        tool_specified="$JAVAC"
30122        tool_basename="${tool_specified##*/}"
30123        if test "x$tool_basename" = "x$tool_specified"; then
30124          # A command without a complete path is provided, search $PATH.
30125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30126$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30127          # Extract the first word of "$tool_basename", so it can be a program name with args.
30128set dummy $tool_basename; ac_word=$2
30129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30130$as_echo_n "checking for $ac_word... " >&6; }
30131if ${ac_cv_path_JAVAC+:} false; then :
30132  $as_echo_n "(cached) " >&6
30133else
30134  case $JAVAC in
30135  [\\/]* | ?:[\\/]*)
30136  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30137  ;;
30138  *)
30139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30140for as_dir in $PATH
30141do
30142  IFS=$as_save_IFS
30143  test -z "$as_dir" && as_dir=.
30144    for ac_exec_ext in '' $ac_executable_extensions; do
30145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30146    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30148    break 2
30149  fi
30150done
30151  done
30152IFS=$as_save_IFS
30153
30154  ;;
30155esac
30156fi
30157JAVAC=$ac_cv_path_JAVAC
30158if test -n "$JAVAC"; then
30159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30160$as_echo "$JAVAC" >&6; }
30161else
30162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30163$as_echo "no" >&6; }
30164fi
30165
30166
30167          if test "x$JAVAC" = x; then
30168            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30169          fi
30170        else
30171          # Otherwise we believe it is a complete path. Use it as it is.
30172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30173$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30174          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30175$as_echo_n "checking for JAVAC... " >&6; }
30176          if test ! -x "$tool_specified"; then
30177            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30178$as_echo "not found" >&6; }
30179            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30180          fi
30181          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30182$as_echo "$tool_specified" >&6; }
30183        fi
30184      fi
30185    fi
30186
30187  fi
30188
30189
30190
30191  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30192
30193  # Publish this variable in the help.
30194
30195
30196  if [ -z "${JAVAH+x}" ]; then
30197    # The variable is not set by user, try to locate tool using the code snippet
30198
30199      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30200$as_echo_n "checking for javah in Boot JDK... " >&6; }
30201      JAVAH=$BOOT_JDK/bin/javah
30202      if test ! -x $JAVAH; then
30203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30204$as_echo "not found" >&6; }
30205        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30206$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30207        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30208      fi
30209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30210$as_echo "ok" >&6; }
30211
30212
30213  else
30214    # The variable is set, but is it from the command line or the environment?
30215
30216    # Try to remove the string !JAVAH! from our list.
30217    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30218    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30219      # If it failed, the variable was not from the command line. Ignore it,
30220      # but warn the user (except for BASH, which is always set by the calling BASH).
30221      if test "xJAVAH" != xBASH; then
30222        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30223$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30224      fi
30225      # Try to locate tool using the code snippet
30226
30227      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30228$as_echo_n "checking for javah in Boot JDK... " >&6; }
30229      JAVAH=$BOOT_JDK/bin/javah
30230      if test ! -x $JAVAH; then
30231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30232$as_echo "not found" >&6; }
30233        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30234$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30235        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30236      fi
30237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30238$as_echo "ok" >&6; }
30239
30240
30241    else
30242      # If it succeeded, then it was overridden by the user. We will use it
30243      # for the tool.
30244
30245      # First remove it from the list of overridden variables, so we can test
30246      # for unknown variables in the end.
30247      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30248
30249      # Check if we try to supply an empty value
30250      if test "x$JAVAH" = x; then
30251        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30252$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30254$as_echo_n "checking for JAVAH... " >&6; }
30255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30256$as_echo "disabled" >&6; }
30257      else
30258        # Check if the provided tool contains a complete path.
30259        tool_specified="$JAVAH"
30260        tool_basename="${tool_specified##*/}"
30261        if test "x$tool_basename" = "x$tool_specified"; then
30262          # A command without a complete path is provided, search $PATH.
30263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30264$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30265          # Extract the first word of "$tool_basename", so it can be a program name with args.
30266set dummy $tool_basename; ac_word=$2
30267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30268$as_echo_n "checking for $ac_word... " >&6; }
30269if ${ac_cv_path_JAVAH+:} false; then :
30270  $as_echo_n "(cached) " >&6
30271else
30272  case $JAVAH in
30273  [\\/]* | ?:[\\/]*)
30274  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30275  ;;
30276  *)
30277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30278for as_dir in $PATH
30279do
30280  IFS=$as_save_IFS
30281  test -z "$as_dir" && as_dir=.
30282    for ac_exec_ext in '' $ac_executable_extensions; do
30283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30284    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30286    break 2
30287  fi
30288done
30289  done
30290IFS=$as_save_IFS
30291
30292  ;;
30293esac
30294fi
30295JAVAH=$ac_cv_path_JAVAH
30296if test -n "$JAVAH"; then
30297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30298$as_echo "$JAVAH" >&6; }
30299else
30300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30301$as_echo "no" >&6; }
30302fi
30303
30304
30305          if test "x$JAVAH" = x; then
30306            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30307          fi
30308        else
30309          # Otherwise we believe it is a complete path. Use it as it is.
30310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30311$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30312          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30313$as_echo_n "checking for JAVAH... " >&6; }
30314          if test ! -x "$tool_specified"; then
30315            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30316$as_echo "not found" >&6; }
30317            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30318          fi
30319          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30320$as_echo "$tool_specified" >&6; }
30321        fi
30322      fi
30323    fi
30324
30325  fi
30326
30327
30328
30329  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30330
30331  # Publish this variable in the help.
30332
30333
30334  if [ -z "${JAR+x}" ]; then
30335    # The variable is not set by user, try to locate tool using the code snippet
30336
30337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30338$as_echo_n "checking for jar in Boot JDK... " >&6; }
30339      JAR=$BOOT_JDK/bin/jar
30340      if test ! -x $JAR; then
30341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30342$as_echo "not found" >&6; }
30343        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30344$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30345        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30346      fi
30347      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30348$as_echo "ok" >&6; }
30349
30350
30351  else
30352    # The variable is set, but is it from the command line or the environment?
30353
30354    # Try to remove the string !JAR! from our list.
30355    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30356    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30357      # If it failed, the variable was not from the command line. Ignore it,
30358      # but warn the user (except for BASH, which is always set by the calling BASH).
30359      if test "xJAR" != xBASH; then
30360        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30361$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30362      fi
30363      # Try to locate tool using the code snippet
30364
30365      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30366$as_echo_n "checking for jar in Boot JDK... " >&6; }
30367      JAR=$BOOT_JDK/bin/jar
30368      if test ! -x $JAR; then
30369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30370$as_echo "not found" >&6; }
30371        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30372$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30373        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30374      fi
30375      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30376$as_echo "ok" >&6; }
30377
30378
30379    else
30380      # If it succeeded, then it was overridden by the user. We will use it
30381      # for the tool.
30382
30383      # First remove it from the list of overridden variables, so we can test
30384      # for unknown variables in the end.
30385      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30386
30387      # Check if we try to supply an empty value
30388      if test "x$JAR" = x; then
30389        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30390$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30392$as_echo_n "checking for JAR... " >&6; }
30393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30394$as_echo "disabled" >&6; }
30395      else
30396        # Check if the provided tool contains a complete path.
30397        tool_specified="$JAR"
30398        tool_basename="${tool_specified##*/}"
30399        if test "x$tool_basename" = "x$tool_specified"; then
30400          # A command without a complete path is provided, search $PATH.
30401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30402$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30403          # Extract the first word of "$tool_basename", so it can be a program name with args.
30404set dummy $tool_basename; ac_word=$2
30405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30406$as_echo_n "checking for $ac_word... " >&6; }
30407if ${ac_cv_path_JAR+:} false; then :
30408  $as_echo_n "(cached) " >&6
30409else
30410  case $JAR in
30411  [\\/]* | ?:[\\/]*)
30412  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30413  ;;
30414  *)
30415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30416for as_dir in $PATH
30417do
30418  IFS=$as_save_IFS
30419  test -z "$as_dir" && as_dir=.
30420    for ac_exec_ext in '' $ac_executable_extensions; do
30421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30422    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30424    break 2
30425  fi
30426done
30427  done
30428IFS=$as_save_IFS
30429
30430  ;;
30431esac
30432fi
30433JAR=$ac_cv_path_JAR
30434if test -n "$JAR"; then
30435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30436$as_echo "$JAR" >&6; }
30437else
30438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30439$as_echo "no" >&6; }
30440fi
30441
30442
30443          if test "x$JAR" = x; then
30444            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30445          fi
30446        else
30447          # Otherwise we believe it is a complete path. Use it as it is.
30448          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30449$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30450          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30451$as_echo_n "checking for JAR... " >&6; }
30452          if test ! -x "$tool_specified"; then
30453            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30454$as_echo "not found" >&6; }
30455            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30456          fi
30457          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30458$as_echo "$tool_specified" >&6; }
30459        fi
30460      fi
30461    fi
30462
30463  fi
30464
30465
30466
30467  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30468
30469  # Publish this variable in the help.
30470
30471
30472  if [ -z "${JARSIGNER+x}" ]; then
30473    # The variable is not set by user, try to locate tool using the code snippet
30474
30475      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30476$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30477      JARSIGNER=$BOOT_JDK/bin/jarsigner
30478      if test ! -x $JARSIGNER; then
30479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30480$as_echo "not found" >&6; }
30481        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30482$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30483        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30484      fi
30485      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30486$as_echo "ok" >&6; }
30487
30488
30489  else
30490    # The variable is set, but is it from the command line or the environment?
30491
30492    # Try to remove the string !JARSIGNER! from our list.
30493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30495      # If it failed, the variable was not from the command line. Ignore it,
30496      # but warn the user (except for BASH, which is always set by the calling BASH).
30497      if test "xJARSIGNER" != xBASH; then
30498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30499$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30500      fi
30501      # Try to locate tool using the code snippet
30502
30503      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30504$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30505      JARSIGNER=$BOOT_JDK/bin/jarsigner
30506      if test ! -x $JARSIGNER; then
30507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30508$as_echo "not found" >&6; }
30509        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30510$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30511        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30512      fi
30513      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30514$as_echo "ok" >&6; }
30515
30516
30517    else
30518      # If it succeeded, then it was overridden by the user. We will use it
30519      # for the tool.
30520
30521      # First remove it from the list of overridden variables, so we can test
30522      # for unknown variables in the end.
30523      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30524
30525      # Check if we try to supply an empty value
30526      if test "x$JARSIGNER" = x; then
30527        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30528$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30529        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30530$as_echo_n "checking for JARSIGNER... " >&6; }
30531        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30532$as_echo "disabled" >&6; }
30533      else
30534        # Check if the provided tool contains a complete path.
30535        tool_specified="$JARSIGNER"
30536        tool_basename="${tool_specified##*/}"
30537        if test "x$tool_basename" = "x$tool_specified"; then
30538          # A command without a complete path is provided, search $PATH.
30539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30540$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30541          # Extract the first word of "$tool_basename", so it can be a program name with args.
30542set dummy $tool_basename; ac_word=$2
30543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30544$as_echo_n "checking for $ac_word... " >&6; }
30545if ${ac_cv_path_JARSIGNER+:} false; then :
30546  $as_echo_n "(cached) " >&6
30547else
30548  case $JARSIGNER in
30549  [\\/]* | ?:[\\/]*)
30550  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30551  ;;
30552  *)
30553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30554for as_dir in $PATH
30555do
30556  IFS=$as_save_IFS
30557  test -z "$as_dir" && as_dir=.
30558    for ac_exec_ext in '' $ac_executable_extensions; do
30559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30560    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30562    break 2
30563  fi
30564done
30565  done
30566IFS=$as_save_IFS
30567
30568  ;;
30569esac
30570fi
30571JARSIGNER=$ac_cv_path_JARSIGNER
30572if test -n "$JARSIGNER"; then
30573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30574$as_echo "$JARSIGNER" >&6; }
30575else
30576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30577$as_echo "no" >&6; }
30578fi
30579
30580
30581          if test "x$JARSIGNER" = x; then
30582            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30583          fi
30584        else
30585          # Otherwise we believe it is a complete path. Use it as it is.
30586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30587$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30588          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30589$as_echo_n "checking for JARSIGNER... " >&6; }
30590          if test ! -x "$tool_specified"; then
30591            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30592$as_echo "not found" >&6; }
30593            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30594          fi
30595          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30596$as_echo "$tool_specified" >&6; }
30597        fi
30598      fi
30599    fi
30600
30601  fi
30602
30603
30604
30605  # Finally, set some other options...
30606
30607  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30608  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30609
30610
30611
30612  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30613  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30614  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30615  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30616  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30617  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30618    dummy="$dummy -Xpatch:foo=bar"
30619    JVM_ARG_OK=true
30620  else
30621    $ECHO "Arg failed:" >&5
30622    $ECHO "$OUTPUT" >&5
30623    JVM_ARG_OK=false
30624  fi
30625
30626  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30627$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30628  if test "x$JVM_ARG_OK" = "xtrue"; then
30629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30630$as_echo "yes" >&6; }
30631    BOOT_JDK_MODULAR="true"
30632  else
30633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30634$as_echo "no" >&6; }
30635    BOOT_JDK_MODULAR="false"
30636  fi
30637
30638
30639
30640
30641  # Check if the boot jdk is 32 or 64 bit
30642  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30643    BOOT_JDK_BITS="64"
30644  else
30645    BOOT_JDK_BITS="32"
30646  fi
30647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30648$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30650$as_echo "$BOOT_JDK_BITS" >&6; }
30651
30652
30653
30654
30655# Check whether --with-build-jdk was given.
30656if test "${with_build_jdk+set}" = set; then :
30657  withval=$with_build_jdk;
30658fi
30659
30660
30661  CREATE_BUILDJDK=false
30662  EXTERNAL_BUILDJDK=false
30663  BUILD_JDK_FOUND="no"
30664  if test "x$with_build_jdk" != "x"; then
30665
30666  if test "x$BUILD_JDK_FOUND" = xno; then
30667    # Execute the test
30668
30669       if test "x$with_build_jdk" != x; then
30670         BUILD_JDK=$with_build_jdk
30671         BUILD_JDK_FOUND=maybe
30672         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30673$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30674       fi
30675
30676    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30677    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30678      # Do we have a bin/java?
30679      if test ! -x "$BUILD_JDK/bin/java"; then
30680        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30681$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30682        BUILD_JDK_FOUND=no
30683      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30684        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30685$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30686        BUILD_JDK_FOUND=no
30687      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30688        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30689$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30690        BUILD_JDK_FOUND=no
30691      elif test ! -x "$BUILD_JDK/bin/javac"; then
30692        # Do we have a bin/javac?
30693        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30694$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30695        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30696$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30697        BUILD_JDK_FOUND=no
30698      else
30699        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30700        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30701
30702        # Extra M4 quote needed to protect [] in grep expression.
30703        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30704        if test "x$FOUND_CORRECT_VERSION" = x; then
30705          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30706$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30707          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30708$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30709          BUILD_JDK_FOUND=no
30710        else
30711          # We're done!
30712          BUILD_JDK_FOUND=yes
30713
30714  # Only process if variable expands to non-empty
30715
30716  if test "x$BUILD_JDK" != x; then
30717    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30718
30719  # Input might be given as Windows format, start by converting to
30720  # unix format.
30721  path="$BUILD_JDK"
30722  new_path=`$CYGPATH -u "$path"`
30723
30724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30727  # "foo.exe" is OK but "foo" is an error.
30728  #
30729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30730  # It is also a way to make sure we got the proper file name for the real test later on.
30731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30732  if test "x$test_shortpath" = x; then
30733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30734$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30735    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30736  fi
30737
30738  # Call helper function which possibly converts this using DOS-style short mode.
30739  # If so, the updated path is stored in $new_path.
30740
30741  input_path="$new_path"
30742  # Check if we need to convert this using DOS-style short mode. If the path
30743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30744  # take no chances and rewrite it.
30745  # Note: m4 eats our [], so we need to use [ and ] instead.
30746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30747  if test "x$has_forbidden_chars" != x; then
30748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30752      # Going to short mode and back again did indeed matter. Since short mode is
30753      # case insensitive, let's make it lowercase to improve readability.
30754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30755      # Now convert it back to Unix-style (cygpath)
30756      input_path=`$CYGPATH -u "$shortmode_path"`
30757      new_path="$input_path"
30758    fi
30759  fi
30760
30761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30762  if test "x$test_cygdrive_prefix" = x; then
30763    # As a simple fix, exclude /usr/bin since it's not a real path.
30764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30766      # a path prefixed by /cygdrive for fixpath to work.
30767      new_path="$CYGWIN_ROOT_PATH$input_path"
30768    fi
30769  fi
30770
30771
30772  if test "x$path" != "x$new_path"; then
30773    BUILD_JDK="$new_path"
30774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30775$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30776  fi
30777
30778    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30779
30780  path="$BUILD_JDK"
30781  has_colon=`$ECHO $path | $GREP ^.:`
30782  new_path="$path"
30783  if test "x$has_colon" = x; then
30784    # Not in mixed or Windows style, start by that.
30785    new_path=`cmd //c echo $path`
30786  fi
30787
30788
30789  input_path="$new_path"
30790  # Check if we need to convert this using DOS-style short mode. If the path
30791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30792  # take no chances and rewrite it.
30793  # Note: m4 eats our [], so we need to use [ and ] instead.
30794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30795  if test "x$has_forbidden_chars" != x; then
30796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30798  fi
30799
30800
30801  windows_path="$new_path"
30802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30803    unix_path=`$CYGPATH -u "$windows_path"`
30804    new_path="$unix_path"
30805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30807    new_path="$unix_path"
30808  fi
30809
30810  if test "x$path" != "x$new_path"; then
30811    BUILD_JDK="$new_path"
30812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30813$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30814  fi
30815
30816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30818
30819    else
30820      # We're on a unix platform. Hooray! :)
30821      path="$BUILD_JDK"
30822      has_space=`$ECHO "$path" | $GREP " "`
30823      if test "x$has_space" != x; then
30824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30825$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30826        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30827      fi
30828
30829      # Use eval to expand a potential ~
30830      eval path="$path"
30831      if test ! -f "$path" && test ! -d "$path"; then
30832        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30833      fi
30834
30835      if test -d "$path"; then
30836        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30837      else
30838        dir="`$DIRNAME "$path"`"
30839        base="`$BASENAME "$path"`"
30840        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30841      fi
30842    fi
30843  fi
30844
30845          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30846$as_echo_n "checking for Build JDK... " >&6; }
30847          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30848$as_echo "$BUILD_JDK" >&6; }
30849          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30850$as_echo_n "checking Build JDK version... " >&6; }
30851          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30852          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30853$as_echo "$BUILD_JDK_VERSION" >&6; }
30854        fi # end check jdk version
30855      fi # end check java
30856    fi # end check build jdk found
30857  fi
30858
30859    EXTERNAL_BUILDJDK=true
30860  else
30861    if test "x$COMPILE_TYPE" = "xcross"; then
30862      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30863      BUILD_JDK_FOUND=yes
30864      CREATE_BUILDJDK=true
30865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30866$as_echo_n "checking for Build JDK... " >&6; }
30867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30868$as_echo "yes, will build it for the host platform" >&6; }
30869    else
30870      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30871      BUILD_JDK_FOUND=yes
30872      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30873$as_echo_n "checking for Build JDK... " >&6; }
30874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30875$as_echo "yes, will use output dir" >&6; }
30876    fi
30877  fi
30878
30879  JMOD="$BUILD_JDK/bin/jmod"
30880  JLINK="$BUILD_JDK/bin/jlink"
30881
30882
30883
30884  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30886$as_echo_n "checking for Build JDK... " >&6; }
30887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30888$as_echo "no" >&6; }
30889    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30890  fi
30891
30892
30893
30894
30895
30896
30897###############################################################################
30898#
30899# Configure the sources to use. We can add or override individual directories.
30900#
30901###############################################################################
30902
30903
30904  # Where are the sources.
30905  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30906  CORBA_TOPDIR="$SRC_ROOT/corba"
30907  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30908  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30909  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30910  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30911  JDK_TOPDIR="$SRC_ROOT/jdk"
30912
30913
30914
30915
30916
30917
30918
30919
30920
30921  # This feature is no longer supported.
30922
30923
30924
30925# Check whether --with-add-source-root was given.
30926if test "${with_add_source_root+set}" = set; then :
30927  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
30928$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30929fi
30930
30931
30932
30933
30934# Check whether --with-override-source-root was given.
30935if test "${with_override_source_root+set}" = set; then :
30936  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
30937$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30938fi
30939
30940
30941
30942
30943# Check whether --with-adds-and-overrides was given.
30944if test "${with_adds_and_overrides+set}" = set; then :
30945  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
30946$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30947fi
30948
30949
30950
30951
30952# Check whether --with-override-langtools was given.
30953if test "${with_override_langtools+set}" = set; then :
30954  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30955$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30956fi
30957
30958
30959
30960
30961# Check whether --with-override-corba was given.
30962if test "${with_override_corba+set}" = set; then :
30963  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30964$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30965fi
30966
30967
30968
30969
30970# Check whether --with-override-jaxp was given.
30971if test "${with_override_jaxp+set}" = set; then :
30972  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30973$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30974fi
30975
30976
30977
30978
30979# Check whether --with-override-jaxws was given.
30980if test "${with_override_jaxws+set}" = set; then :
30981  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30982$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30983fi
30984
30985
30986
30987
30988# Check whether --with-override-hotspot was given.
30989if test "${with_override_hotspot+set}" = set; then :
30990  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30991$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30992fi
30993
30994
30995
30996
30997# Check whether --with-override-nashorn was given.
30998if test "${with_override_nashorn+set}" = set; then :
30999  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31000$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31001fi
31002
31003
31004
31005
31006# Check whether --with-override-jdk was given.
31007if test "${with_override_jdk+set}" = set; then :
31008  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31009$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31010fi
31011
31012
31013
31014
31015  BUILD_OUTPUT="$OUTPUT_ROOT"
31016
31017
31018  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31019  BUILD_HOTSPOT=true
31020
31021
31022
31023# Check whether --with-import-hotspot was given.
31024if test "${with_import_hotspot+set}" = set; then :
31025  withval=$with_import_hotspot;
31026fi
31027
31028  if test "x$with_import_hotspot" != x; then
31029    CURDIR="$PWD"
31030    cd "$with_import_hotspot"
31031    HOTSPOT_DIST="`pwd`"
31032    cd "$CURDIR"
31033    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31034      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31035    fi
31036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31037$as_echo_n "checking if hotspot should be imported... " >&6; }
31038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31039$as_echo "yes from $HOTSPOT_DIST" >&6; }
31040    BUILD_HOTSPOT=false
31041  fi
31042
31043  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31044
31045
31046
31047
31048# Check whether --with-import-modules was given.
31049if test "${with_import_modules+set}" = set; then :
31050  withval=$with_import_modules;
31051fi
31052
31053
31054  if test "x$with_import_modules" != x \
31055      && test "x$with_import_modules" != "xno"; then
31056    if test -d "$with_import_modules"; then
31057      IMPORT_MODULES_TOPDIR="$with_import_modules"
31058
31059  # Only process if variable expands to non-empty
31060
31061  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31062    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31063
31064  # Input might be given as Windows format, start by converting to
31065  # unix format.
31066  path="$IMPORT_MODULES_TOPDIR"
31067  new_path=`$CYGPATH -u "$path"`
31068
31069  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31070  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31071  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31072  # "foo.exe" is OK but "foo" is an error.
31073  #
31074  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31075  # It is also a way to make sure we got the proper file name for the real test later on.
31076  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31077  if test "x$test_shortpath" = x; then
31078    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31079$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31080    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31081  fi
31082
31083  # Call helper function which possibly converts this using DOS-style short mode.
31084  # If so, the updated path is stored in $new_path.
31085
31086  input_path="$new_path"
31087  # Check if we need to convert this using DOS-style short mode. If the path
31088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31089  # take no chances and rewrite it.
31090  # Note: m4 eats our [], so we need to use [ and ] instead.
31091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31092  if test "x$has_forbidden_chars" != x; then
31093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31097      # Going to short mode and back again did indeed matter. Since short mode is
31098      # case insensitive, let's make it lowercase to improve readability.
31099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31100      # Now convert it back to Unix-style (cygpath)
31101      input_path=`$CYGPATH -u "$shortmode_path"`
31102      new_path="$input_path"
31103    fi
31104  fi
31105
31106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31107  if test "x$test_cygdrive_prefix" = x; then
31108    # As a simple fix, exclude /usr/bin since it's not a real path.
31109    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31111      # a path prefixed by /cygdrive for fixpath to work.
31112      new_path="$CYGWIN_ROOT_PATH$input_path"
31113    fi
31114  fi
31115
31116
31117  if test "x$path" != "x$new_path"; then
31118    IMPORT_MODULES_TOPDIR="$new_path"
31119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31120$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31121  fi
31122
31123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31124
31125  path="$IMPORT_MODULES_TOPDIR"
31126  has_colon=`$ECHO $path | $GREP ^.:`
31127  new_path="$path"
31128  if test "x$has_colon" = x; then
31129    # Not in mixed or Windows style, start by that.
31130    new_path=`cmd //c echo $path`
31131  fi
31132
31133
31134  input_path="$new_path"
31135  # Check if we need to convert this using DOS-style short mode. If the path
31136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31137  # take no chances and rewrite it.
31138  # Note: m4 eats our [], so we need to use [ and ] instead.
31139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31140  if test "x$has_forbidden_chars" != x; then
31141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31143  fi
31144
31145
31146  windows_path="$new_path"
31147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31148    unix_path=`$CYGPATH -u "$windows_path"`
31149    new_path="$unix_path"
31150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31152    new_path="$unix_path"
31153  fi
31154
31155  if test "x$path" != "x$new_path"; then
31156    IMPORT_MODULES_TOPDIR="$new_path"
31157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31158$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31159  fi
31160
31161  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31162  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31163
31164    else
31165      # We're on a unix platform. Hooray! :)
31166      path="$IMPORT_MODULES_TOPDIR"
31167      has_space=`$ECHO "$path" | $GREP " "`
31168      if test "x$has_space" != x; then
31169        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31170$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31171        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31172      fi
31173
31174      # Use eval to expand a potential ~
31175      eval path="$path"
31176      if test ! -f "$path" && test ! -d "$path"; then
31177        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31178      fi
31179
31180      if test -d "$path"; then
31181        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31182      else
31183        dir="`$DIRNAME "$path"`"
31184        base="`$BASENAME "$path"`"
31185        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31186      fi
31187    fi
31188  fi
31189
31190    elif test -e "$with_import_modules"; then
31191      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31192      $RM -rf "$IMPORT_MODULES_TOPDIR"
31193      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31194      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31195        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31196      fi
31197    else
31198      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31199    fi
31200  fi
31201
31202  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31203    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31204  fi
31205  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31206    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31207  fi
31208  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31209    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31210  fi
31211  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31212    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31213  fi
31214  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31215    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31216  fi
31217  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31218    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31219  fi
31220
31221
31222
31223
31224
31225
31226
31227
31228
31229###############################################################################
31230#
31231# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31232# native code.
31233#
31234###############################################################################
31235
31236# See if we are doing a complete static build or not
31237
31238  # Check whether --enable-static-build was given.
31239if test "${enable_static_build+set}" = set; then :
31240  enableval=$enable_static_build;
31241fi
31242
31243  STATIC_BUILD=false
31244  if test "x$enable_static_build" = "xyes"; then
31245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31246$as_echo_n "checking if static build is enabled... " >&6; }
31247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31248$as_echo "yes" >&6; }
31249    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31250      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31251    fi
31252    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31253    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31254    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31255    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31256    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31257    STATIC_BUILD=true
31258  elif test "x$enable_static_build" = "xno"; then
31259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31260$as_echo_n "checking if static build is enabled... " >&6; }
31261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31262$as_echo "no" >&6; }
31263  elif test "x$enable_static_build" != "x"; then
31264    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31265  fi
31266
31267
31268
31269
31270# First determine the toolchain type (compiler family)
31271
31272
31273# Check whether --with-toolchain-type was given.
31274if test "${with_toolchain_type+set}" = set; then :
31275  withval=$with_toolchain_type;
31276fi
31277
31278
31279  # Use indirect variable referencing
31280  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31281  VALID_TOOLCHAINS=${!toolchain_var_name}
31282
31283  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31284    if test -n "$XCODEBUILD"; then
31285      # On Mac OS X, default toolchain to clang after Xcode 5
31286      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31287      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31288      if test $? -ne 0; then
31289        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31290      fi
31291      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31292          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31293          $CUT -f 1 -d .`
31294      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31295$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31296      if test $XCODE_MAJOR_VERSION -ge 5; then
31297          DEFAULT_TOOLCHAIN="clang"
31298      else
31299          DEFAULT_TOOLCHAIN="gcc"
31300      fi
31301    else
31302      # If Xcode is not installed, but the command line tools are
31303      # then we can't run xcodebuild. On these systems we should
31304      # default to clang
31305      DEFAULT_TOOLCHAIN="clang"
31306    fi
31307  else
31308    # First toolchain type in the list is the default
31309    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31310  fi
31311
31312  if test "x$with_toolchain_type" = xlist; then
31313    # List all toolchains
31314    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31315$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31316    for toolchain in $VALID_TOOLCHAINS; do
31317      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31318      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31319      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31320    done
31321
31322    exit 0
31323  elif test "x$with_toolchain_type" != x; then
31324    # User override; check that it is valid
31325    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31326      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31327$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31328      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31329$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31330      as_fn_error $? "Cannot continue." "$LINENO" 5
31331    fi
31332    TOOLCHAIN_TYPE=$with_toolchain_type
31333  else
31334    # No flag given, use default
31335    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31336  fi
31337
31338
31339  TOOLCHAIN_CC_BINARY_clang="clang"
31340  TOOLCHAIN_CC_BINARY_gcc="gcc"
31341  TOOLCHAIN_CC_BINARY_microsoft="cl"
31342  TOOLCHAIN_CC_BINARY_solstudio="cc"
31343  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31344
31345  TOOLCHAIN_CXX_BINARY_clang="clang++"
31346  TOOLCHAIN_CXX_BINARY_gcc="g++"
31347  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31348  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31349  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31350
31351  # Use indirect variable referencing
31352  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31353  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31354  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31355  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31356  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31357  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31358  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31359  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31360
31361
31362  # Define filename patterns
31363  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31364    LIBRARY_PREFIX=
31365    SHARED_LIBRARY_SUFFIX='.dll'
31366    STATIC_LIBRARY_SUFFIX='.lib'
31367    SHARED_LIBRARY='$1.dll'
31368    STATIC_LIBRARY='$1.lib'
31369    OBJ_SUFFIX='.obj'
31370    EXE_SUFFIX='.exe'
31371  else
31372    LIBRARY_PREFIX=lib
31373    SHARED_LIBRARY_SUFFIX='.so'
31374    STATIC_LIBRARY_SUFFIX='.a'
31375    SHARED_LIBRARY='lib$1.so'
31376    STATIC_LIBRARY='lib$1.a'
31377    OBJ_SUFFIX='.o'
31378    EXE_SUFFIX=''
31379    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31380      # For full static builds, we're overloading the SHARED_LIBRARY
31381      # variables in order to limit the amount of changes required.
31382      # It would be better to remove SHARED and just use LIBRARY and
31383      # LIBRARY_SUFFIX for libraries that can be built either
31384      # shared or static and use STATIC_* for libraries that are
31385      # always built statically.
31386      if test "x$STATIC_BUILD" = xtrue; then
31387        SHARED_LIBRARY='lib$1.a'
31388        SHARED_LIBRARY_SUFFIX='.a'
31389      else
31390        SHARED_LIBRARY='lib$1.dylib'
31391        SHARED_LIBRARY_SUFFIX='.dylib'
31392      fi
31393    fi
31394  fi
31395
31396
31397
31398
31399
31400
31401
31402
31403
31404
31405  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31406    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31407$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31408  else
31409    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31410$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31411  fi
31412
31413
31414# User supplied flags should be used when configure detects compilers
31415
31416  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31417    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31418$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31419  fi
31420
31421  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31422    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31423$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31424  fi
31425
31426  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31427    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31428$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31429  fi
31430
31431
31432# Check whether --with-extra-cflags was given.
31433if test "${with_extra_cflags+set}" = set; then :
31434  withval=$with_extra_cflags;
31435fi
31436
31437
31438
31439# Check whether --with-extra-cxxflags was given.
31440if test "${with_extra_cxxflags+set}" = set; then :
31441  withval=$with_extra_cxxflags;
31442fi
31443
31444
31445
31446# Check whether --with-extra-ldflags was given.
31447if test "${with_extra_ldflags+set}" = set; then :
31448  withval=$with_extra_ldflags;
31449fi
31450
31451
31452  EXTRA_CFLAGS="$with_extra_cflags"
31453  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31454  EXTRA_LDFLAGS="$with_extra_ldflags"
31455
31456  # Hotspot needs these set in their legacy form
31457  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31458  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31459  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31460
31461
31462
31463
31464
31465
31466
31467
31468
31469  # The global CFLAGS and LDLAGS variables are used by configure tests and
31470  # should include the extra parameters
31471  CFLAGS="$EXTRA_CFLAGS"
31472  CXXFLAGS="$EXTRA_CXXFLAGS"
31473  LDFLAGS="$EXTRA_LDFLAGS"
31474  CPPFLAGS=""
31475
31476# The sysroot cflags are needed for configure to be able to run the compilers
31477
31478  if test "x$SYSROOT" != "x"; then
31479    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31480      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31481        # Solaris Studio does not have a concept of sysroot. Instead we must
31482        # make sure the default include and lib dirs are appended to each
31483        # compile and link command line. Must also add -I-xbuiltin to enable
31484        # inlining of system functions and intrinsics.
31485        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31486        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31487            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
31488            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
31489      fi
31490    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31491      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31492      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31493    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31494      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31495      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31496    fi
31497    # Propagate the sysroot args to hotspot
31498    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31499    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31500    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31501    # The global CFLAGS and LDFLAGS variables need these for configure to function
31502    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31503    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31504    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31505    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31506  fi
31507
31508  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31509    # We also need -iframework<path>/System/Library/Frameworks
31510    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31511    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31512    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31513    # set this here so it doesn't have to be peppered throughout the forest
31514    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31515    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31516  fi
31517
31518
31519
31520
31521
31522# Then detect the actual binaries needed
31523
31524  # FIXME: Is this needed?
31525  ac_ext=cpp
31526ac_cpp='$CXXCPP $CPPFLAGS'
31527ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31528ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31529ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31530
31531
31532  # Store the CFLAGS etc passed to the configure script.
31533  ORG_CFLAGS="$CFLAGS"
31534  ORG_CXXFLAGS="$CXXFLAGS"
31535
31536  # autoconf magic only relies on PATH, so update it if tools dir is specified
31537  OLD_PATH="$PATH"
31538
31539  # On Windows, we need to detect the visual studio installation first.
31540  # This will change the PATH, but we need to keep that new PATH even
31541  # after toolchain detection is done, since the compiler (on x86) uses
31542  # it for DLL resolution in runtime.
31543  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31544      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31545
31546  # Store path to cygwin link.exe to help excluding it when searching for
31547  # VS linker. This must be done before changing the PATH when looking for VS.
31548  # Extract the first word of "link", so it can be a program name with args.
31549set dummy link; ac_word=$2
31550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31551$as_echo_n "checking for $ac_word... " >&6; }
31552if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31553  $as_echo_n "(cached) " >&6
31554else
31555  case $CYGWIN_LINK in
31556  [\\/]* | ?:[\\/]*)
31557  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31558  ;;
31559  *)
31560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31561for as_dir in $PATH
31562do
31563  IFS=$as_save_IFS
31564  test -z "$as_dir" && as_dir=.
31565    for ac_exec_ext in '' $ac_executable_extensions; do
31566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31567    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31569    break 2
31570  fi
31571done
31572  done
31573IFS=$as_save_IFS
31574
31575  ;;
31576esac
31577fi
31578CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31579if test -n "$CYGWIN_LINK"; then
31580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31581$as_echo "$CYGWIN_LINK" >&6; }
31582else
31583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31584$as_echo "no" >&6; }
31585fi
31586
31587
31588  if test "x$CYGWIN_LINK" != x; then
31589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31590$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31591    "$CYGWIN_LINK" --version > /dev/null
31592    if test $? -eq 0 ; then
31593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31594$as_echo "yes" >&6; }
31595    else
31596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31597$as_echo "no" >&6; }
31598      # This might be the VS linker. Don't exclude it later on.
31599      CYGWIN_LINK=""
31600    fi
31601  fi
31602
31603  # First-hand choice is to locate and run the vsvars bat file.
31604
31605
31606# Check whether --with-toolchain-version was given.
31607if test "${with_toolchain_version+set}" = set; then :
31608  withval=$with_toolchain_version;
31609fi
31610
31611
31612  if test "x$with_toolchain_version" = xlist; then
31613    # List all toolchains
31614    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31615$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31616    for version in $VALID_VS_VERSIONS; do
31617      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31618      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31619    done
31620
31621    exit 0
31622  elif test "x$DEVKIT_VS_VERSION" != x; then
31623    VS_VERSION=$DEVKIT_VS_VERSION
31624    TOOLCHAIN_VERSION=$VS_VERSION
31625    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31626    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31627    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31628    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31629    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31630    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31631
31632    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31633    # can still be exported as INCLUDE for compiler invocations without
31634    # SYSROOT_CFLAGS
31635    OLDIFS="$IFS"
31636    IFS=";"
31637    for i in $DEVKIT_VS_INCLUDE; do
31638      ipath=$i
31639
31640  unix_path="$ipath"
31641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31642    windows_path=`$CYGPATH -m "$unix_path"`
31643    ipath="$windows_path"
31644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31645    windows_path=`cmd //c echo $unix_path`
31646    ipath="$windows_path"
31647  fi
31648
31649      VS_INCLUDE="$VS_INCLUDE;$ipath"
31650    done
31651    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31652    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31653    for i in $DEVKIT_VS_LIB; do
31654      libpath=$i
31655
31656  unix_path="$libpath"
31657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31658    windows_path=`$CYGPATH -m "$unix_path"`
31659    libpath="$windows_path"
31660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31661    windows_path=`cmd //c echo $unix_path`
31662    libpath="$windows_path"
31663  fi
31664
31665      VS_LIB="$VS_LIB;$libpath"
31666    done
31667    IFS="$OLDIFS"
31668
31669    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31670$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31671
31672  elif test "x$with_toolchain_version" != x; then
31673    # User override; check that it is valid
31674    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31675      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31676$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31677      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31678$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31679      as_fn_error $? "Cannot continue." "$LINENO" 5
31680    fi
31681    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31682  else
31683    # No flag given, use default
31684    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31685  fi
31686
31687  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31688
31689  VS_VERSION="$VS_VERSION"
31690  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31691  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31692  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31693  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31694
31695  # When using --with-tools-dir, assume it points to the correct and default
31696  # version of Visual Studio or that --with-toolchain-version was also set.
31697  if test "x$with_tools_dir" != x; then
31698
31699  if test "x$VS_ENV_CMD" = x; then
31700    VS_VERSION="${VS_VERSION}"
31701    VS_BASE="$with_tools_dir/../.."
31702    METHOD="--with-tools-dir"
31703
31704    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31705      VCVARSFILE="vc/bin/vcvars32.bat"
31706    else
31707      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31708    fi
31709
31710
31711  windows_path="$VS_BASE"
31712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31713    unix_path=`$CYGPATH -u "$windows_path"`
31714    VS_BASE="$unix_path"
31715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31717    VS_BASE="$unix_path"
31718  fi
31719
31720    if test -d "$VS_BASE"; then
31721      if test -f "$VS_BASE/$VCVARSFILE"; then
31722        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31723$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31724        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31725        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31726        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31727        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31728      else
31729        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31730$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31731        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31732$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31733      fi
31734    fi
31735  fi
31736
31737
31738  if test "x$VS_ENV_CMD" = x; then
31739    VS_VERSION="${VS_VERSION}"
31740    VS_BASE="$with_tools_dir/../../.."
31741    METHOD="--with-tools-dir"
31742
31743    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31744      VCVARSFILE="vc/bin/vcvars32.bat"
31745    else
31746      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31747    fi
31748
31749
31750  windows_path="$VS_BASE"
31751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31752    unix_path=`$CYGPATH -u "$windows_path"`
31753    VS_BASE="$unix_path"
31754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31756    VS_BASE="$unix_path"
31757  fi
31758
31759    if test -d "$VS_BASE"; then
31760      if test -f "$VS_BASE/$VCVARSFILE"; then
31761        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31762$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31763        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31764        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31765        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31766        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31767      else
31768        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31769$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31770        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31771$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31772      fi
31773    fi
31774  fi
31775
31776    if test "x$VS_ENV_CMD" = x; then
31777      # Having specified an argument which is incorrect will produce an instant failure;
31778      # we should not go on looking
31779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31780$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31781      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31782$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31783      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31784$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31785      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31786    fi
31787  fi
31788
31789  VS_ENV_CMD=""
31790  VS_ENV_ARGS=""
31791
31792  if test "x$VS_COMNTOOLS" != x; then
31793
31794  if test "x$VS_ENV_CMD" = x; then
31795    VS_VERSION="${VS_VERSION}"
31796    VS_BASE="$VS_COMNTOOLS/../.."
31797    METHOD="$VS_COMNTOOLS_VAR variable"
31798
31799    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31800      VCVARSFILE="vc/bin/vcvars32.bat"
31801    else
31802      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31803    fi
31804
31805
31806  windows_path="$VS_BASE"
31807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31808    unix_path=`$CYGPATH -u "$windows_path"`
31809    VS_BASE="$unix_path"
31810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31812    VS_BASE="$unix_path"
31813  fi
31814
31815    if test -d "$VS_BASE"; then
31816      if test -f "$VS_BASE/$VCVARSFILE"; then
31817        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31818$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31819        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31820        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31821        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31822        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31823      else
31824        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31825$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31826        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31827$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31828      fi
31829    fi
31830  fi
31831
31832  fi
31833  if test "x$PROGRAMFILES" != x; then
31834
31835  if test "x$VS_ENV_CMD" = x; then
31836    VS_VERSION="${VS_VERSION}"
31837    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31838    METHOD="well-known name"
31839
31840    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31841      VCVARSFILE="vc/bin/vcvars32.bat"
31842    else
31843      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31844    fi
31845
31846
31847  windows_path="$VS_BASE"
31848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31849    unix_path=`$CYGPATH -u "$windows_path"`
31850    VS_BASE="$unix_path"
31851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31853    VS_BASE="$unix_path"
31854  fi
31855
31856    if test -d "$VS_BASE"; then
31857      if test -f "$VS_BASE/$VCVARSFILE"; then
31858        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31859$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31860        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31861        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31862        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31863        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31864      else
31865        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31866$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31867        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31868$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31869      fi
31870    fi
31871  fi
31872
31873  fi
31874  # Work around the insanely named ProgramFiles(x86) env variable
31875  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31876  if test "x$PROGRAMFILES_X86" != x; then
31877
31878  if test "x$VS_ENV_CMD" = x; then
31879    VS_VERSION="${VS_VERSION}"
31880    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31881    METHOD="well-known name"
31882
31883    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31884      VCVARSFILE="vc/bin/vcvars32.bat"
31885    else
31886      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31887    fi
31888
31889
31890  windows_path="$VS_BASE"
31891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31892    unix_path=`$CYGPATH -u "$windows_path"`
31893    VS_BASE="$unix_path"
31894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31896    VS_BASE="$unix_path"
31897  fi
31898
31899    if test -d "$VS_BASE"; then
31900      if test -f "$VS_BASE/$VCVARSFILE"; then
31901        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31902$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31903        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31904        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31905        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31906        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31907      else
31908        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31909$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31910        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31911$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31912      fi
31913    fi
31914  fi
31915
31916  fi
31917
31918  if test "x$VS_ENV_CMD" = x; then
31919    VS_VERSION="${VS_VERSION}"
31920    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31921    METHOD="well-known name"
31922
31923    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31924      VCVARSFILE="vc/bin/vcvars32.bat"
31925    else
31926      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31927    fi
31928
31929
31930  windows_path="$VS_BASE"
31931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31932    unix_path=`$CYGPATH -u "$windows_path"`
31933    VS_BASE="$unix_path"
31934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31936    VS_BASE="$unix_path"
31937  fi
31938
31939    if test -d "$VS_BASE"; then
31940      if test -f "$VS_BASE/$VCVARSFILE"; then
31941        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31942$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31943        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31944        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31945        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31946        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31947      else
31948        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31949$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31950        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31951$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31952      fi
31953    fi
31954  fi
31955
31956
31957  if test "x$VS_ENV_CMD" = x; then
31958    VS_VERSION="${VS_VERSION}"
31959    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31960    METHOD="well-known name"
31961
31962    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31963      VCVARSFILE="vc/bin/vcvars32.bat"
31964    else
31965      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31966    fi
31967
31968
31969  windows_path="$VS_BASE"
31970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31971    unix_path=`$CYGPATH -u "$windows_path"`
31972    VS_BASE="$unix_path"
31973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31975    VS_BASE="$unix_path"
31976  fi
31977
31978    if test -d "$VS_BASE"; then
31979      if test -f "$VS_BASE/$VCVARSFILE"; then
31980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31981$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31982        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31983        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31984        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31985        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31986      else
31987        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31988$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31989        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31990$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31991      fi
31992    fi
31993  fi
31994
31995
31996  if test "x$SDK_INSTALL_DIR" != x; then
31997    if test "x$ProgramW6432" != x; then
31998
31999  if test "x$VS_ENV_CMD" = x; then
32000    VS_VERSION="${VS_VERSION}"
32001    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32002    METHOD="well-known name"
32003
32004  windows_path="$WIN_SDK_BASE"
32005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32006    unix_path=`$CYGPATH -u "$windows_path"`
32007    WIN_SDK_BASE="$unix_path"
32008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32010    WIN_SDK_BASE="$unix_path"
32011  fi
32012
32013    if test -d "$WIN_SDK_BASE"; then
32014      # There have been cases of partial or broken SDK installations. A missing
32015      # lib dir is not going to work.
32016      if test ! -d "$WIN_SDK_BASE/lib"; then
32017        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32018$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32019        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32020$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32021      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32022        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32023$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32024        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32025        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32026          VS_ENV_ARGS="/x86"
32027        else
32028          VS_ENV_ARGS="/x64"
32029        fi
32030        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32031        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32032        # TODO: improve detection for other versions of SDK
32033        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32034      else
32035        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32036$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32037        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32038$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32039      fi
32040    fi
32041  fi
32042
32043    fi
32044    if test "x$PROGRAMW6432" != x; then
32045
32046  if test "x$VS_ENV_CMD" = x; then
32047    VS_VERSION="${VS_VERSION}"
32048    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32049    METHOD="well-known name"
32050
32051  windows_path="$WIN_SDK_BASE"
32052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32053    unix_path=`$CYGPATH -u "$windows_path"`
32054    WIN_SDK_BASE="$unix_path"
32055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32057    WIN_SDK_BASE="$unix_path"
32058  fi
32059
32060    if test -d "$WIN_SDK_BASE"; then
32061      # There have been cases of partial or broken SDK installations. A missing
32062      # lib dir is not going to work.
32063      if test ! -d "$WIN_SDK_BASE/lib"; then
32064        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32065$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32066        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32067$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32068      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32069        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32070$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32071        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32072        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32073          VS_ENV_ARGS="/x86"
32074        else
32075          VS_ENV_ARGS="/x64"
32076        fi
32077        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32078        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32079        # TODO: improve detection for other versions of SDK
32080        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32081      else
32082        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32083$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32084        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32085$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32086      fi
32087    fi
32088  fi
32089
32090    fi
32091    if test "x$PROGRAMFILES" != x; then
32092
32093  if test "x$VS_ENV_CMD" = x; then
32094    VS_VERSION="${VS_VERSION}"
32095    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32096    METHOD="well-known name"
32097
32098  windows_path="$WIN_SDK_BASE"
32099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32100    unix_path=`$CYGPATH -u "$windows_path"`
32101    WIN_SDK_BASE="$unix_path"
32102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32104    WIN_SDK_BASE="$unix_path"
32105  fi
32106
32107    if test -d "$WIN_SDK_BASE"; then
32108      # There have been cases of partial or broken SDK installations. A missing
32109      # lib dir is not going to work.
32110      if test ! -d "$WIN_SDK_BASE/lib"; then
32111        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32112$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32113        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32114$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32115      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32116        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32117$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32118        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32119        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32120          VS_ENV_ARGS="/x86"
32121        else
32122          VS_ENV_ARGS="/x64"
32123        fi
32124        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32125        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32126        # TODO: improve detection for other versions of SDK
32127        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32128      else
32129        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32130$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32131        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32132$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32133      fi
32134    fi
32135  fi
32136
32137    fi
32138
32139  if test "x$VS_ENV_CMD" = x; then
32140    VS_VERSION="${VS_VERSION}"
32141    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32142    METHOD="well-known name"
32143
32144  windows_path="$WIN_SDK_BASE"
32145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32146    unix_path=`$CYGPATH -u "$windows_path"`
32147    WIN_SDK_BASE="$unix_path"
32148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32150    WIN_SDK_BASE="$unix_path"
32151  fi
32152
32153    if test -d "$WIN_SDK_BASE"; then
32154      # There have been cases of partial or broken SDK installations. A missing
32155      # lib dir is not going to work.
32156      if test ! -d "$WIN_SDK_BASE/lib"; then
32157        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32158$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32159        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32160$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32161      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32162        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32163$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32164        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32165        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32166          VS_ENV_ARGS="/x86"
32167        else
32168          VS_ENV_ARGS="/x64"
32169        fi
32170        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32171        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32172        # TODO: improve detection for other versions of SDK
32173        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32174      else
32175        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32176$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32177        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32178$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32179      fi
32180    fi
32181  fi
32182
32183
32184  if test "x$VS_ENV_CMD" = x; then
32185    VS_VERSION="${VS_VERSION}"
32186    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32187    METHOD="well-known name"
32188
32189  windows_path="$WIN_SDK_BASE"
32190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32191    unix_path=`$CYGPATH -u "$windows_path"`
32192    WIN_SDK_BASE="$unix_path"
32193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32195    WIN_SDK_BASE="$unix_path"
32196  fi
32197
32198    if test -d "$WIN_SDK_BASE"; then
32199      # There have been cases of partial or broken SDK installations. A missing
32200      # lib dir is not going to work.
32201      if test ! -d "$WIN_SDK_BASE/lib"; then
32202        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32203$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32204        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32205$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32206      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32207        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32208$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32209        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32210        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32211          VS_ENV_ARGS="/x86"
32212        else
32213          VS_ENV_ARGS="/x64"
32214        fi
32215        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32216        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32217        # TODO: improve detection for other versions of SDK
32218        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32219      else
32220        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32221$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32222        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32223$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32224      fi
32225    fi
32226  fi
32227
32228  fi
32229
32230    if test "x$VS_ENV_CMD" != x; then
32231      TOOLCHAIN_VERSION=$VS_VERSION
32232      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32233      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32234      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32235      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32236      # The rest of the variables are already evaled while probing
32237      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32238$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32239      break
32240    fi
32241  done
32242
32243
32244  # If we have a devkit, skip all of the below.
32245  if test "x$DEVKIT_VS_VERSION" = x; then
32246    if test "x$VS_ENV_CMD" != x; then
32247      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32248
32249  # Only process if variable expands to non-empty
32250
32251  if test "x$VS_ENV_CMD" != x; then
32252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32253
32254  # First separate the path from the arguments. This will split at the first
32255  # space.
32256  complete="$VS_ENV_CMD"
32257  path="${complete%% *}"
32258  tmp="$complete EOL"
32259  arguments="${tmp#* }"
32260
32261  # Input might be given as Windows format, start by converting to
32262  # unix format.
32263  new_path=`$CYGPATH -u "$path"`
32264
32265  # Now try to locate executable using which
32266  new_path=`$WHICH "$new_path" 2> /dev/null`
32267  # bat and cmd files are not always considered executable in cygwin causing which
32268  # to not find them
32269  if test "x$new_path" = x \
32270      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32271      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32272    new_path=`$CYGPATH -u "$path"`
32273  fi
32274  if test "x$new_path" = x; then
32275    # Oops. Which didn't find the executable.
32276    # The splitting of arguments from the executable at a space might have been incorrect,
32277    # since paths with space are more likely in Windows. Give it another try with the whole
32278    # argument.
32279    path="$complete"
32280    arguments="EOL"
32281    new_path=`$CYGPATH -u "$path"`
32282    new_path=`$WHICH "$new_path" 2> /dev/null`
32283    # bat and cmd files are not always considered executable in cygwin causing which
32284    # to not find them
32285    if test "x$new_path" = x \
32286        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32287        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32288      new_path=`$CYGPATH -u "$path"`
32289    fi
32290    if test "x$new_path" = x; then
32291      # It's still not found. Now this is an unrecoverable error.
32292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32293$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32294      has_space=`$ECHO "$complete" | $GREP " "`
32295      if test "x$has_space" != x; then
32296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32298      fi
32299      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32300    fi
32301  fi
32302
32303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32306  # "foo.exe" is OK but "foo" is an error.
32307  #
32308  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32309  # It is also a way to make sure we got the proper file name for the real test later on.
32310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32311  if test "x$test_shortpath" = x; then
32312    # Short path failed, file does not exist as specified.
32313    # Try adding .exe or .cmd
32314    if test -f "${new_path}.exe"; then
32315      input_to_shortpath="${new_path}.exe"
32316    elif test -f "${new_path}.cmd"; then
32317      input_to_shortpath="${new_path}.cmd"
32318    else
32319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32320$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32321      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32322$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32323      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32324    fi
32325  else
32326    input_to_shortpath="$new_path"
32327  fi
32328
32329  # Call helper function which possibly converts this using DOS-style short mode.
32330  # If so, the updated path is stored in $new_path.
32331  new_path="$input_to_shortpath"
32332
32333  input_path="$input_to_shortpath"
32334  # Check if we need to convert this using DOS-style short mode. If the path
32335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32336  # take no chances and rewrite it.
32337  # Note: m4 eats our [], so we need to use [ and ] instead.
32338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32339  if test "x$has_forbidden_chars" != x; then
32340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32344      # Going to short mode and back again did indeed matter. Since short mode is
32345      # case insensitive, let's make it lowercase to improve readability.
32346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32347      # Now convert it back to Unix-style (cygpath)
32348      input_path=`$CYGPATH -u "$shortmode_path"`
32349      new_path="$input_path"
32350    fi
32351  fi
32352
32353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32354  if test "x$test_cygdrive_prefix" = x; then
32355    # As a simple fix, exclude /usr/bin since it's not a real path.
32356    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32358      # a path prefixed by /cygdrive for fixpath to work.
32359      new_path="$CYGWIN_ROOT_PATH$input_path"
32360    fi
32361  fi
32362
32363  # remove trailing .exe if any
32364  new_path="${new_path/%.exe/}"
32365
32366    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32367
32368  # First separate the path from the arguments. This will split at the first
32369  # space.
32370  complete="$VS_ENV_CMD"
32371  path="${complete%% *}"
32372  tmp="$complete EOL"
32373  arguments="${tmp#* }"
32374
32375  # Input might be given as Windows format, start by converting to
32376  # unix format.
32377  new_path="$path"
32378
32379  windows_path="$new_path"
32380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32381    unix_path=`$CYGPATH -u "$windows_path"`
32382    new_path="$unix_path"
32383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32385    new_path="$unix_path"
32386  fi
32387
32388
32389  # Now try to locate executable using which
32390  new_path=`$WHICH "$new_path" 2> /dev/null`
32391
32392  if test "x$new_path" = x; then
32393    # Oops. Which didn't find the executable.
32394    # The splitting of arguments from the executable at a space might have been incorrect,
32395    # since paths with space are more likely in Windows. Give it another try with the whole
32396    # argument.
32397    path="$complete"
32398    arguments="EOL"
32399    new_path="$path"
32400
32401  windows_path="$new_path"
32402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32403    unix_path=`$CYGPATH -u "$windows_path"`
32404    new_path="$unix_path"
32405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32407    new_path="$unix_path"
32408  fi
32409
32410
32411    new_path=`$WHICH "$new_path" 2> /dev/null`
32412    # bat and cmd files are not always considered executable in MSYS causing which
32413    # to not find them
32414    if test "x$new_path" = x \
32415        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32416        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32417      new_path="$path"
32418
32419  windows_path="$new_path"
32420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32421    unix_path=`$CYGPATH -u "$windows_path"`
32422    new_path="$unix_path"
32423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32425    new_path="$unix_path"
32426  fi
32427
32428    fi
32429
32430    if test "x$new_path" = x; then
32431      # It's still not found. Now this is an unrecoverable error.
32432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32433$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32434      has_space=`$ECHO "$complete" | $GREP " "`
32435      if test "x$has_space" != x; then
32436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32438      fi
32439      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32440    fi
32441  fi
32442
32443  # Now new_path has a complete unix path to the binary
32444  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32445    # Keep paths in /bin as-is, but remove trailing .exe if any
32446    new_path="${new_path/%.exe/}"
32447    # Do not save /bin paths to all_fixpath_prefixes!
32448  else
32449    # Not in mixed or Windows style, start by that.
32450    new_path=`cmd //c echo $new_path`
32451
32452  input_path="$new_path"
32453  # Check if we need to convert this using DOS-style short mode. If the path
32454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32455  # take no chances and rewrite it.
32456  # Note: m4 eats our [], so we need to use [ and ] instead.
32457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32458  if test "x$has_forbidden_chars" != x; then
32459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32461  fi
32462
32463    # Output is in $new_path
32464
32465  windows_path="$new_path"
32466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32467    unix_path=`$CYGPATH -u "$windows_path"`
32468    new_path="$unix_path"
32469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32471    new_path="$unix_path"
32472  fi
32473
32474    # remove trailing .exe if any
32475    new_path="${new_path/%.exe/}"
32476
32477    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32478    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32479  fi
32480
32481    else
32482      # We're on a unix platform. Hooray! :)
32483      # First separate the path from the arguments. This will split at the first
32484      # space.
32485      complete="$VS_ENV_CMD"
32486      path="${complete%% *}"
32487      tmp="$complete EOL"
32488      arguments="${tmp#* }"
32489
32490      # Cannot rely on the command "which" here since it doesn't always work.
32491      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32492      if test -z "$is_absolute_path"; then
32493        # Path to executable is not absolute. Find it.
32494        IFS_save="$IFS"
32495        IFS=:
32496        for p in $PATH; do
32497          if test -f "$p/$path" && test -x "$p/$path"; then
32498            new_path="$p/$path"
32499            break
32500          fi
32501        done
32502        IFS="$IFS_save"
32503      else
32504        # This is an absolute path, we can use it without further modifications.
32505        new_path="$path"
32506      fi
32507
32508      if test "x$new_path" = x; then
32509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32510$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32511        has_space=`$ECHO "$complete" | $GREP " "`
32512        if test "x$has_space" != x; then
32513          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32514$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32515        fi
32516        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32517      fi
32518    fi
32519
32520    # Now join together the path and the arguments once again
32521    if test "x$arguments" != xEOL; then
32522      new_complete="$new_path ${arguments% *}"
32523    else
32524      new_complete="$new_path"
32525    fi
32526
32527    if test "x$complete" != "x$new_complete"; then
32528      VS_ENV_CMD="$new_complete"
32529      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32530$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32531    fi
32532  fi
32533
32534
32535      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32536      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32537$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32538
32539      # We need to create a couple of temporary files.
32540      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32541      $MKDIR -p $VS_ENV_TMP_DIR
32542
32543      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32544      # Instead create a shell script which will set the relevant variables when run.
32545      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32546
32547  unix_path="$WINPATH_VS_ENV_CMD"
32548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32549    windows_path=`$CYGPATH -m "$unix_path"`
32550    WINPATH_VS_ENV_CMD="$windows_path"
32551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32552    windows_path=`cmd //c echo $unix_path`
32553    WINPATH_VS_ENV_CMD="$windows_path"
32554  fi
32555
32556      WINPATH_BASH="$BASH"
32557
32558  unix_path="$WINPATH_BASH"
32559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32560    windows_path=`$CYGPATH -m "$unix_path"`
32561    WINPATH_BASH="$windows_path"
32562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32563    windows_path=`cmd //c echo $unix_path`
32564    WINPATH_BASH="$windows_path"
32565  fi
32566
32567
32568      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32569      # script (executable by bash) that will setup the important variables.
32570      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32571      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32572      # This will end up something like:
32573      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32574      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32575      # These will end up something like:
32576      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32577      # The trailing space for everyone except PATH is no typo, but is needed due
32578      # to trailing \ in the Windows paths. These will be stripped later.
32579      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32580          >> $EXTRACT_VC_ENV_BAT_FILE
32581      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32582          >> $EXTRACT_VC_ENV_BAT_FILE
32583      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32584          >> $EXTRACT_VC_ENV_BAT_FILE
32585      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32586          >> $EXTRACT_VC_ENV_BAT_FILE
32587      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32588          >> $EXTRACT_VC_ENV_BAT_FILE
32589      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32590          >> $EXTRACT_VC_ENV_BAT_FILE
32591
32592      # Now execute the newly created bat file.
32593      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32594      # Change directory so we don't need to mess with Windows paths in redirects.
32595      cd $VS_ENV_TMP_DIR
32596      cmd /c extract-vs-env.bat | $CAT
32597      cd $CURDIR
32598
32599      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32600        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32601$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32602        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32603$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32604        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32605$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32606        as_fn_error $? "Cannot continue" "$LINENO" 5
32607      fi
32608
32609      # Now set all paths and other env variables. This will allow the rest of
32610      # the configure script to find and run the compiler in the proper way.
32611      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32612$as_echo "$as_me: Setting extracted environment variables" >&6;}
32613      . $VS_ENV_TMP_DIR/set-vs-env.sh
32614      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32615      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32616    else
32617      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32618      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32619$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32620    fi
32621  fi
32622
32623  # At this point, we should have correct variables in the environment, or we can't continue.
32624  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32625$as_echo_n "checking for Visual Studio variables... " >&6; }
32626
32627  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32628      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32629    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32630      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32631$as_echo "present but broken" >&6; }
32632      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32633    else
32634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32635$as_echo "ok" >&6; }
32636      # Remove any trailing "\" ";" and " " from the variables.
32637      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32638      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32639      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32640      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32641      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32642      # Remove any paths containing # (typically F#) as that messes up make. This
32643      # is needed if visual studio was installed with F# support.
32644      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32645
32646
32647
32648
32649
32650      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32651      OLDIFS="$IFS"
32652      IFS=";"
32653      for i in $VS_INCLUDE; do
32654        ipath=$i
32655        # Only process non-empty elements
32656        if test "x$ipath" != x; then
32657          IFS="$OLDIFS"
32658          # Check that directory exists before calling fixup_path
32659          testpath=$ipath
32660
32661  windows_path="$testpath"
32662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32663    unix_path=`$CYGPATH -u "$windows_path"`
32664    testpath="$unix_path"
32665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32667    testpath="$unix_path"
32668  fi
32669
32670          if test -d "$testpath"; then
32671
32672  # Only process if variable expands to non-empty
32673
32674  if test "x$ipath" != x; then
32675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32676
32677  # Input might be given as Windows format, start by converting to
32678  # unix format.
32679  path="$ipath"
32680  new_path=`$CYGPATH -u "$path"`
32681
32682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32685  # "foo.exe" is OK but "foo" is an error.
32686  #
32687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32688  # It is also a way to make sure we got the proper file name for the real test later on.
32689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32690  if test "x$test_shortpath" = x; then
32691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32692$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32693    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32694  fi
32695
32696  # Call helper function which possibly converts this using DOS-style short mode.
32697  # If so, the updated path is stored in $new_path.
32698
32699  input_path="$new_path"
32700  # Check if we need to convert this using DOS-style short mode. If the path
32701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32702  # take no chances and rewrite it.
32703  # Note: m4 eats our [], so we need to use [ and ] instead.
32704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32705  if test "x$has_forbidden_chars" != x; then
32706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32710      # Going to short mode and back again did indeed matter. Since short mode is
32711      # case insensitive, let's make it lowercase to improve readability.
32712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32713      # Now convert it back to Unix-style (cygpath)
32714      input_path=`$CYGPATH -u "$shortmode_path"`
32715      new_path="$input_path"
32716    fi
32717  fi
32718
32719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32720  if test "x$test_cygdrive_prefix" = x; then
32721    # As a simple fix, exclude /usr/bin since it's not a real path.
32722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32724      # a path prefixed by /cygdrive for fixpath to work.
32725      new_path="$CYGWIN_ROOT_PATH$input_path"
32726    fi
32727  fi
32728
32729
32730  if test "x$path" != "x$new_path"; then
32731    ipath="$new_path"
32732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32733$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32734  fi
32735
32736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32737
32738  path="$ipath"
32739  has_colon=`$ECHO $path | $GREP ^.:`
32740  new_path="$path"
32741  if test "x$has_colon" = x; then
32742    # Not in mixed or Windows style, start by that.
32743    new_path=`cmd //c echo $path`
32744  fi
32745
32746
32747  input_path="$new_path"
32748  # Check if we need to convert this using DOS-style short mode. If the path
32749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32750  # take no chances and rewrite it.
32751  # Note: m4 eats our [], so we need to use [ and ] instead.
32752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32753  if test "x$has_forbidden_chars" != x; then
32754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32756  fi
32757
32758
32759  windows_path="$new_path"
32760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32761    unix_path=`$CYGPATH -u "$windows_path"`
32762    new_path="$unix_path"
32763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32765    new_path="$unix_path"
32766  fi
32767
32768  if test "x$path" != "x$new_path"; then
32769    ipath="$new_path"
32770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32771$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32772  fi
32773
32774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32776
32777    else
32778      # We're on a unix platform. Hooray! :)
32779      path="$ipath"
32780      has_space=`$ECHO "$path" | $GREP " "`
32781      if test "x$has_space" != x; then
32782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32783$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32784        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32785      fi
32786
32787      # Use eval to expand a potential ~
32788      eval path="$path"
32789      if test ! -f "$path" && test ! -d "$path"; then
32790        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32791      fi
32792
32793      if test -d "$path"; then
32794        ipath="`cd "$path"; $THEPWDCMD -L`"
32795      else
32796        dir="`$DIRNAME "$path"`"
32797        base="`$BASENAME "$path"`"
32798        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32799      fi
32800    fi
32801  fi
32802
32803            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32804          fi
32805          IFS=";"
32806        fi
32807      done
32808      # Convert VS_LIB into SYSROOT_LDFLAGS
32809      for i in $VS_LIB; do
32810        libpath=$i
32811        # Only process non-empty elements
32812        if test "x$libpath" != x; then
32813          IFS="$OLDIFS"
32814          # Check that directory exists before calling fixup_path
32815          testpath=$libpath
32816
32817  windows_path="$testpath"
32818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32819    unix_path=`$CYGPATH -u "$windows_path"`
32820    testpath="$unix_path"
32821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32823    testpath="$unix_path"
32824  fi
32825
32826          if test -d "$testpath"; then
32827
32828  # Only process if variable expands to non-empty
32829
32830  if test "x$libpath" != x; then
32831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32832
32833  # Input might be given as Windows format, start by converting to
32834  # unix format.
32835  path="$libpath"
32836  new_path=`$CYGPATH -u "$path"`
32837
32838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32841  # "foo.exe" is OK but "foo" is an error.
32842  #
32843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32844  # It is also a way to make sure we got the proper file name for the real test later on.
32845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32846  if test "x$test_shortpath" = x; then
32847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32848$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32849    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32850  fi
32851
32852  # Call helper function which possibly converts this using DOS-style short mode.
32853  # If so, the updated path is stored in $new_path.
32854
32855  input_path="$new_path"
32856  # Check if we need to convert this using DOS-style short mode. If the path
32857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32858  # take no chances and rewrite it.
32859  # Note: m4 eats our [], so we need to use [ and ] instead.
32860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32861  if test "x$has_forbidden_chars" != x; then
32862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32866      # Going to short mode and back again did indeed matter. Since short mode is
32867      # case insensitive, let's make it lowercase to improve readability.
32868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32869      # Now convert it back to Unix-style (cygpath)
32870      input_path=`$CYGPATH -u "$shortmode_path"`
32871      new_path="$input_path"
32872    fi
32873  fi
32874
32875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32876  if test "x$test_cygdrive_prefix" = x; then
32877    # As a simple fix, exclude /usr/bin since it's not a real path.
32878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32880      # a path prefixed by /cygdrive for fixpath to work.
32881      new_path="$CYGWIN_ROOT_PATH$input_path"
32882    fi
32883  fi
32884
32885
32886  if test "x$path" != "x$new_path"; then
32887    libpath="$new_path"
32888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32889$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32890  fi
32891
32892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32893
32894  path="$libpath"
32895  has_colon=`$ECHO $path | $GREP ^.:`
32896  new_path="$path"
32897  if test "x$has_colon" = x; then
32898    # Not in mixed or Windows style, start by that.
32899    new_path=`cmd //c echo $path`
32900  fi
32901
32902
32903  input_path="$new_path"
32904  # Check if we need to convert this using DOS-style short mode. If the path
32905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32906  # take no chances and rewrite it.
32907  # Note: m4 eats our [], so we need to use [ and ] instead.
32908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32909  if test "x$has_forbidden_chars" != x; then
32910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32912  fi
32913
32914
32915  windows_path="$new_path"
32916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32917    unix_path=`$CYGPATH -u "$windows_path"`
32918    new_path="$unix_path"
32919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32921    new_path="$unix_path"
32922  fi
32923
32924  if test "x$path" != "x$new_path"; then
32925    libpath="$new_path"
32926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32927$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32928  fi
32929
32930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32932
32933    else
32934      # We're on a unix platform. Hooray! :)
32935      path="$libpath"
32936      has_space=`$ECHO "$path" | $GREP " "`
32937      if test "x$has_space" != x; then
32938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32939$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32940        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32941      fi
32942
32943      # Use eval to expand a potential ~
32944      eval path="$path"
32945      if test ! -f "$path" && test ! -d "$path"; then
32946        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32947      fi
32948
32949      if test -d "$path"; then
32950        libpath="`cd "$path"; $THEPWDCMD -L`"
32951      else
32952        dir="`$DIRNAME "$path"`"
32953        base="`$BASENAME "$path"`"
32954        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32955      fi
32956    fi
32957  fi
32958
32959            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32960          fi
32961          IFS=";"
32962        fi
32963      done
32964      IFS="$OLDIFS"
32965    fi
32966  else
32967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32968$as_echo "not found" >&6; }
32969
32970    if test "x$VS_ENV_CMD" = x; then
32971      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32972$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32973      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32974$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32975    else
32976      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32977$as_echo "$as_me: Running the extraction script failed." >&6;}
32978    fi
32979    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32980$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32981    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32982$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32983    as_fn_error $? "Cannot continue" "$LINENO" 5
32984  fi
32985
32986    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32987    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32988    PATH="$VS_PATH"
32989    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32990    export INCLUDE="$VS_INCLUDE"
32991    export LIB="$VS_LIB"
32992  else
32993    if test "x$XCODE_VERSION_OUTPUT" != x; then
32994      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32995      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32996      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32997    else
32998      # Currently we do not define this for other toolchains. This might change as the need arise.
32999      TOOLCHAIN_VERSION=
33000    fi
33001  fi
33002
33003
33004  # For solaris we really need solaris tools, and not the GNU equivalent.
33005  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
33006  # so add that to path before starting to probe.
33007  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
33008  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
33009    PATH="/usr/ccs/bin:$PATH"
33010  fi
33011
33012  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33013  # override all other locations.
33014  if test "x$TOOLCHAIN_PATH" != x; then
33015    PATH=$TOOLCHAIN_PATH:$PATH
33016  fi
33017
33018
33019  #
33020  # Setup the compilers (CC and CXX)
33021  #
33022
33023  COMPILER_NAME=C
33024  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33025
33026  if test "x$CC" != x; then
33027    # User has supplied compiler name already, always let that override.
33028    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33029$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33030    if test "x`basename $CC`" = "x$CC"; then
33031      # A command without a complete path is provided, search $PATH.
33032
33033      for ac_prog in $CC
33034do
33035  # Extract the first word of "$ac_prog", so it can be a program name with args.
33036set dummy $ac_prog; ac_word=$2
33037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33038$as_echo_n "checking for $ac_word... " >&6; }
33039if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33040  $as_echo_n "(cached) " >&6
33041else
33042  case $POTENTIAL_CC in
33043  [\\/]* | ?:[\\/]*)
33044  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33045  ;;
33046  *)
33047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33048for as_dir in $PATH
33049do
33050  IFS=$as_save_IFS
33051  test -z "$as_dir" && as_dir=.
33052    for ac_exec_ext in '' $ac_executable_extensions; do
33053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33054    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33056    break 2
33057  fi
33058done
33059  done
33060IFS=$as_save_IFS
33061
33062  ;;
33063esac
33064fi
33065POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33066if test -n "$POTENTIAL_CC"; then
33067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33068$as_echo "$POTENTIAL_CC" >&6; }
33069else
33070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33071$as_echo "no" >&6; }
33072fi
33073
33074
33075  test -n "$POTENTIAL_CC" && break
33076done
33077
33078      if test "x$POTENTIAL_CC" != x; then
33079        CC=$POTENTIAL_CC
33080      else
33081        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33082      fi
33083    else
33084      # Otherwise it might already be a complete path
33085      if test ! -x "$CC"; then
33086        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33087      fi
33088    fi
33089  else
33090    # No user supplied value. Locate compiler ourselves.
33091
33092    # If we are cross compiling, assume cross compilation tools follows the
33093    # cross compilation standard where they are prefixed with the autoconf
33094    # standard name for the target. For example the binary
33095    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33096    # If we are not cross compiling, then the default compiler name will be
33097    # used.
33098
33099    CC=
33100    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33101    # before checking the rest of the PATH.
33102    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33103    # step, this should not be necessary.
33104    if test -n "$TOOLCHAIN_PATH"; then
33105      PATH_save="$PATH"
33106      PATH="$TOOLCHAIN_PATH"
33107      for ac_prog in $SEARCH_LIST
33108do
33109  # Extract the first word of "$ac_prog", so it can be a program name with args.
33110set dummy $ac_prog; ac_word=$2
33111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33112$as_echo_n "checking for $ac_word... " >&6; }
33113if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33114  $as_echo_n "(cached) " >&6
33115else
33116  case $TOOLCHAIN_PATH_CC in
33117  [\\/]* | ?:[\\/]*)
33118  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33119  ;;
33120  *)
33121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33122for as_dir in $PATH
33123do
33124  IFS=$as_save_IFS
33125  test -z "$as_dir" && as_dir=.
33126    for ac_exec_ext in '' $ac_executable_extensions; do
33127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33128    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33130    break 2
33131  fi
33132done
33133  done
33134IFS=$as_save_IFS
33135
33136  ;;
33137esac
33138fi
33139TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33140if test -n "$TOOLCHAIN_PATH_CC"; then
33141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33142$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33143else
33144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33145$as_echo "no" >&6; }
33146fi
33147
33148
33149  test -n "$TOOLCHAIN_PATH_CC" && break
33150done
33151
33152      CC=$TOOLCHAIN_PATH_CC
33153      PATH="$PATH_save"
33154    fi
33155
33156    # AC_PATH_PROGS can't be run multiple times with the same variable,
33157    # so create a new name for this run.
33158    if test "x$CC" = x; then
33159      for ac_prog in $SEARCH_LIST
33160do
33161  # Extract the first word of "$ac_prog", so it can be a program name with args.
33162set dummy $ac_prog; ac_word=$2
33163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33164$as_echo_n "checking for $ac_word... " >&6; }
33165if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33166  $as_echo_n "(cached) " >&6
33167else
33168  case $POTENTIAL_CC in
33169  [\\/]* | ?:[\\/]*)
33170  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33171  ;;
33172  *)
33173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33174for as_dir in $PATH
33175do
33176  IFS=$as_save_IFS
33177  test -z "$as_dir" && as_dir=.
33178    for ac_exec_ext in '' $ac_executable_extensions; do
33179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33180    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33182    break 2
33183  fi
33184done
33185  done
33186IFS=$as_save_IFS
33187
33188  ;;
33189esac
33190fi
33191POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33192if test -n "$POTENTIAL_CC"; then
33193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33194$as_echo "$POTENTIAL_CC" >&6; }
33195else
33196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33197$as_echo "no" >&6; }
33198fi
33199
33200
33201  test -n "$POTENTIAL_CC" && break
33202done
33203
33204      CC=$POTENTIAL_CC
33205    fi
33206
33207    if test "x$CC" = x; then
33208
33209  # Print a helpful message on how to acquire the necessary build dependency.
33210  # devkit is the help tag: freetype, cups, alsa etc
33211  MISSING_DEPENDENCY=devkit
33212
33213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33214    cygwin_help $MISSING_DEPENDENCY
33215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33216    msys_help $MISSING_DEPENDENCY
33217  else
33218    PKGHANDLER_COMMAND=
33219
33220    case $PKGHANDLER in
33221      apt-get)
33222        apt_help     $MISSING_DEPENDENCY ;;
33223      yum)
33224        yum_help     $MISSING_DEPENDENCY ;;
33225      port)
33226        port_help    $MISSING_DEPENDENCY ;;
33227      pkgutil)
33228        pkgutil_help $MISSING_DEPENDENCY ;;
33229      pkgadd)
33230        pkgadd_help  $MISSING_DEPENDENCY ;;
33231    esac
33232
33233    if test "x$PKGHANDLER_COMMAND" != x; then
33234      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33235    fi
33236  fi
33237
33238      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33239    fi
33240  fi
33241
33242  # Now we have a compiler binary in CC. Make sure it's okay.
33243
33244  # Only process if variable expands to non-empty
33245
33246  if test "x$CC" != x; then
33247    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33248
33249  # First separate the path from the arguments. This will split at the first
33250  # space.
33251  complete="$CC"
33252  path="${complete%% *}"
33253  tmp="$complete EOL"
33254  arguments="${tmp#* }"
33255
33256  # Input might be given as Windows format, start by converting to
33257  # unix format.
33258  new_path=`$CYGPATH -u "$path"`
33259
33260  # Now try to locate executable using which
33261  new_path=`$WHICH "$new_path" 2> /dev/null`
33262  # bat and cmd files are not always considered executable in cygwin causing which
33263  # to not find them
33264  if test "x$new_path" = x \
33265      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33266      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33267    new_path=`$CYGPATH -u "$path"`
33268  fi
33269  if test "x$new_path" = x; then
33270    # Oops. Which didn't find the executable.
33271    # The splitting of arguments from the executable at a space might have been incorrect,
33272    # since paths with space are more likely in Windows. Give it another try with the whole
33273    # argument.
33274    path="$complete"
33275    arguments="EOL"
33276    new_path=`$CYGPATH -u "$path"`
33277    new_path=`$WHICH "$new_path" 2> /dev/null`
33278    # bat and cmd files are not always considered executable in cygwin causing which
33279    # to not find them
33280    if test "x$new_path" = x \
33281        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33282        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33283      new_path=`$CYGPATH -u "$path"`
33284    fi
33285    if test "x$new_path" = x; then
33286      # It's still not found. Now this is an unrecoverable error.
33287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33288$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33289      has_space=`$ECHO "$complete" | $GREP " "`
33290      if test "x$has_space" != x; then
33291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33293      fi
33294      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33295    fi
33296  fi
33297
33298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33301  # "foo.exe" is OK but "foo" is an error.
33302  #
33303  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33304  # It is also a way to make sure we got the proper file name for the real test later on.
33305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33306  if test "x$test_shortpath" = x; then
33307    # Short path failed, file does not exist as specified.
33308    # Try adding .exe or .cmd
33309    if test -f "${new_path}.exe"; then
33310      input_to_shortpath="${new_path}.exe"
33311    elif test -f "${new_path}.cmd"; then
33312      input_to_shortpath="${new_path}.cmd"
33313    else
33314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33315$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33316      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33317$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33318      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33319    fi
33320  else
33321    input_to_shortpath="$new_path"
33322  fi
33323
33324  # Call helper function which possibly converts this using DOS-style short mode.
33325  # If so, the updated path is stored in $new_path.
33326  new_path="$input_to_shortpath"
33327
33328  input_path="$input_to_shortpath"
33329  # Check if we need to convert this using DOS-style short mode. If the path
33330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33331  # take no chances and rewrite it.
33332  # Note: m4 eats our [], so we need to use [ and ] instead.
33333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33334  if test "x$has_forbidden_chars" != x; then
33335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33339      # Going to short mode and back again did indeed matter. Since short mode is
33340      # case insensitive, let's make it lowercase to improve readability.
33341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33342      # Now convert it back to Unix-style (cygpath)
33343      input_path=`$CYGPATH -u "$shortmode_path"`
33344      new_path="$input_path"
33345    fi
33346  fi
33347
33348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33349  if test "x$test_cygdrive_prefix" = x; then
33350    # As a simple fix, exclude /usr/bin since it's not a real path.
33351    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33353      # a path prefixed by /cygdrive for fixpath to work.
33354      new_path="$CYGWIN_ROOT_PATH$input_path"
33355    fi
33356  fi
33357
33358  # remove trailing .exe if any
33359  new_path="${new_path/%.exe/}"
33360
33361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33362
33363  # First separate the path from the arguments. This will split at the first
33364  # space.
33365  complete="$CC"
33366  path="${complete%% *}"
33367  tmp="$complete EOL"
33368  arguments="${tmp#* }"
33369
33370  # Input might be given as Windows format, start by converting to
33371  # unix format.
33372  new_path="$path"
33373
33374  windows_path="$new_path"
33375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33376    unix_path=`$CYGPATH -u "$windows_path"`
33377    new_path="$unix_path"
33378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33380    new_path="$unix_path"
33381  fi
33382
33383
33384  # Now try to locate executable using which
33385  new_path=`$WHICH "$new_path" 2> /dev/null`
33386
33387  if test "x$new_path" = x; then
33388    # Oops. Which didn't find the executable.
33389    # The splitting of arguments from the executable at a space might have been incorrect,
33390    # since paths with space are more likely in Windows. Give it another try with the whole
33391    # argument.
33392    path="$complete"
33393    arguments="EOL"
33394    new_path="$path"
33395
33396  windows_path="$new_path"
33397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33398    unix_path=`$CYGPATH -u "$windows_path"`
33399    new_path="$unix_path"
33400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33402    new_path="$unix_path"
33403  fi
33404
33405
33406    new_path=`$WHICH "$new_path" 2> /dev/null`
33407    # bat and cmd files are not always considered executable in MSYS causing which
33408    # to not find them
33409    if test "x$new_path" = x \
33410        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33411        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33412      new_path="$path"
33413
33414  windows_path="$new_path"
33415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33416    unix_path=`$CYGPATH -u "$windows_path"`
33417    new_path="$unix_path"
33418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33420    new_path="$unix_path"
33421  fi
33422
33423    fi
33424
33425    if test "x$new_path" = x; then
33426      # It's still not found. Now this is an unrecoverable error.
33427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33428$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33429      has_space=`$ECHO "$complete" | $GREP " "`
33430      if test "x$has_space" != x; then
33431        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33432$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33433      fi
33434      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33435    fi
33436  fi
33437
33438  # Now new_path has a complete unix path to the binary
33439  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33440    # Keep paths in /bin as-is, but remove trailing .exe if any
33441    new_path="${new_path/%.exe/}"
33442    # Do not save /bin paths to all_fixpath_prefixes!
33443  else
33444    # Not in mixed or Windows style, start by that.
33445    new_path=`cmd //c echo $new_path`
33446
33447  input_path="$new_path"
33448  # Check if we need to convert this using DOS-style short mode. If the path
33449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33450  # take no chances and rewrite it.
33451  # Note: m4 eats our [], so we need to use [ and ] instead.
33452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33453  if test "x$has_forbidden_chars" != x; then
33454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33456  fi
33457
33458    # Output is in $new_path
33459
33460  windows_path="$new_path"
33461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33462    unix_path=`$CYGPATH -u "$windows_path"`
33463    new_path="$unix_path"
33464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33466    new_path="$unix_path"
33467  fi
33468
33469    # remove trailing .exe if any
33470    new_path="${new_path/%.exe/}"
33471
33472    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33473    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33474  fi
33475
33476    else
33477      # We're on a unix platform. Hooray! :)
33478      # First separate the path from the arguments. This will split at the first
33479      # space.
33480      complete="$CC"
33481      path="${complete%% *}"
33482      tmp="$complete EOL"
33483      arguments="${tmp#* }"
33484
33485      # Cannot rely on the command "which" here since it doesn't always work.
33486      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33487      if test -z "$is_absolute_path"; then
33488        # Path to executable is not absolute. Find it.
33489        IFS_save="$IFS"
33490        IFS=:
33491        for p in $PATH; do
33492          if test -f "$p/$path" && test -x "$p/$path"; then
33493            new_path="$p/$path"
33494            break
33495          fi
33496        done
33497        IFS="$IFS_save"
33498      else
33499        # This is an absolute path, we can use it without further modifications.
33500        new_path="$path"
33501      fi
33502
33503      if test "x$new_path" = x; then
33504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33505$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33506        has_space=`$ECHO "$complete" | $GREP " "`
33507        if test "x$has_space" != x; then
33508          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33509$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33510        fi
33511        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33512      fi
33513    fi
33514
33515    # Now join together the path and the arguments once again
33516    if test "x$arguments" != xEOL; then
33517      new_complete="$new_path ${arguments% *}"
33518    else
33519      new_complete="$new_path"
33520    fi
33521
33522    if test "x$complete" != "x$new_complete"; then
33523      CC="$new_complete"
33524      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33525$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33526    fi
33527  fi
33528
33529  TEST_COMPILER="$CC"
33530
33531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33532$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33533  SYMLINK_ORIGINAL="$TEST_COMPILER"
33534
33535  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33536    # Follow a chain of symbolic links. Use readlink
33537    # where it exists, else fall back to horribly
33538    # complicated shell code.
33539    if test "x$READLINK_TESTED" != yes; then
33540      # On MacOSX there is a readlink tool with a different
33541      # purpose than the GNU readlink tool. Check the found readlink.
33542      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33543      if test "x$ISGNU" = x; then
33544        # A readlink that we do not know how to use.
33545        # Are there other non-GNU readlinks out there?
33546        READLINK_TESTED=yes
33547        READLINK=
33548      fi
33549    fi
33550
33551    if test "x$READLINK" != x; then
33552      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33553    else
33554      # Save the current directory for restoring afterwards
33555      STARTDIR=$PWD
33556      COUNTER=0
33557      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33558      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33559      cd $sym_link_dir
33560      # Use -P flag to resolve symlinks in directories.
33561      cd `$THEPWDCMD -P`
33562      sym_link_dir=`$THEPWDCMD -P`
33563      # Resolve file symlinks
33564      while test $COUNTER -lt 20; do
33565        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33566        if test "x$ISLINK" == x; then
33567          # This is not a symbolic link! We are done!
33568          break
33569        fi
33570        # Again resolve directory symlinks since the target of the just found
33571        # link could be in a different directory
33572        cd `$DIRNAME $ISLINK`
33573        sym_link_dir=`$THEPWDCMD -P`
33574        sym_link_file=`$BASENAME $ISLINK`
33575        let COUNTER=COUNTER+1
33576      done
33577      cd $STARTDIR
33578      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33579    fi
33580  fi
33581
33582  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33584$as_echo "no symlink" >&6; }
33585  else
33586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33587$as_echo "$SYMLINK_ORIGINAL" >&6; }
33588
33589    # We can't handle ccache by gcc wrappers, since we need to know if we're
33590    # using ccache. Instead ccache usage must be controlled by a configure option.
33591    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33592    if test "x$COMPILER_BASENAME" = "xccache"; then
33593      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33594$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33595      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33596    fi
33597  fi
33598
33599
33600  COMPILER=$CC
33601  COMPILER_NAME=$COMPILER_NAME
33602
33603  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33604    # cc -V output typically looks like
33605    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33606    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33607    # Check that this is likely to be the Solaris Studio cc.
33608    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33609    if test $? -ne 0; then
33610      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33611      { $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
33612$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33613      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33614$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33615      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33616$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33617      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33618    fi
33619    # Remove usage instructions (if present), and
33620    # collapse compiler output into a single line
33621    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33622        $SED -e 's/ *[Uu]sage:.*//'`
33623    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33624        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33625  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33626    # xlc -qversion output typically looks like
33627    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33628    #     Version: 11.01.0000.0015
33629    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33630    # Check that this is likely to be the IBM XL C compiler.
33631    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33632    if test $? -ne 0; then
33633      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33634      { $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
33635$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33636      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33637$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33638      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33639$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33640      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33641    fi
33642    # Collapse compiler output into a single line
33643    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33644    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33645        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33646  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33647    # There is no specific version flag, but all output starts with a version string.
33648    # First line typically looks something like:
33649    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33650    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33651    # Check that this is likely to be Microsoft CL.EXE.
33652    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33653    if test $? -ne 0; then
33654      { $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
33655$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33656      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33657$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33658      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33659    fi
33660    # Collapse compiler output into a single line
33661    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33662    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33663        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33664  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33665    # gcc --version output typically looks like
33666    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33667    #     Copyright (C) 2013 Free Software Foundation, Inc.
33668    #     This is free software; see the source for copying conditions.  There is NO
33669    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33670    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33671    # Check that this is likely to be GCC.
33672    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33673    if test $? -ne 0; then
33674      { $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
33675$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33676      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33677$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33678      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33679    fi
33680    # Remove Copyright and legalese from version string, and
33681    # collapse into a single line
33682    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33683        $SED -e 's/ *Copyright .*//'`
33684    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33685        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33686  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33687    # clang --version output typically looks like
33688    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33689    #    clang version 3.3 (tags/RELEASE_33/final)
33690    # or
33691    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33692    #    Target: x86_64-pc-linux-gnu
33693    #    Thread model: posix
33694    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33695    # Check that this is likely to be clang
33696    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33697    if test $? -ne 0; then
33698      { $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
33699$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33700      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33701$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33702      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33703    fi
33704    # Collapse compiler output into a single line
33705    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33706    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33707        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33708  else
33709      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33710  fi
33711  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33712  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33713  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33714  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33715
33716  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33717$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33718
33719
33720  # Now that we have resolved CC ourself, let autoconf have its go at it
33721  ac_ext=c
33722ac_cpp='$CPP $CPPFLAGS'
33723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33725ac_compiler_gnu=$ac_cv_c_compiler_gnu
33726if test -n "$ac_tool_prefix"; then
33727  for ac_prog in $CC
33728  do
33729    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33730set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33732$as_echo_n "checking for $ac_word... " >&6; }
33733if ${ac_cv_prog_CC+:} false; then :
33734  $as_echo_n "(cached) " >&6
33735else
33736  if test -n "$CC"; then
33737  ac_cv_prog_CC="$CC" # Let the user override the test.
33738else
33739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33740for as_dir in $PATH
33741do
33742  IFS=$as_save_IFS
33743  test -z "$as_dir" && as_dir=.
33744    for ac_exec_ext in '' $ac_executable_extensions; do
33745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33746    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33748    break 2
33749  fi
33750done
33751  done
33752IFS=$as_save_IFS
33753
33754fi
33755fi
33756CC=$ac_cv_prog_CC
33757if test -n "$CC"; then
33758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33759$as_echo "$CC" >&6; }
33760else
33761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33762$as_echo "no" >&6; }
33763fi
33764
33765
33766    test -n "$CC" && break
33767  done
33768fi
33769if test -z "$CC"; then
33770  ac_ct_CC=$CC
33771  for ac_prog in $CC
33772do
33773  # Extract the first word of "$ac_prog", so it can be a program name with args.
33774set dummy $ac_prog; ac_word=$2
33775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33776$as_echo_n "checking for $ac_word... " >&6; }
33777if ${ac_cv_prog_ac_ct_CC+:} false; then :
33778  $as_echo_n "(cached) " >&6
33779else
33780  if test -n "$ac_ct_CC"; then
33781  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33782else
33783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33784for as_dir in $PATH
33785do
33786  IFS=$as_save_IFS
33787  test -z "$as_dir" && as_dir=.
33788    for ac_exec_ext in '' $ac_executable_extensions; do
33789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33790    ac_cv_prog_ac_ct_CC="$ac_prog"
33791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33792    break 2
33793  fi
33794done
33795  done
33796IFS=$as_save_IFS
33797
33798fi
33799fi
33800ac_ct_CC=$ac_cv_prog_ac_ct_CC
33801if test -n "$ac_ct_CC"; then
33802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33803$as_echo "$ac_ct_CC" >&6; }
33804else
33805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33806$as_echo "no" >&6; }
33807fi
33808
33809
33810  test -n "$ac_ct_CC" && break
33811done
33812
33813  if test "x$ac_ct_CC" = x; then
33814    CC=""
33815  else
33816    case $cross_compiling:$ac_tool_warned in
33817yes:)
33818{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33819$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33820ac_tool_warned=yes ;;
33821esac
33822    CC=$ac_ct_CC
33823  fi
33824fi
33825
33826
33827test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33829as_fn_error $? "no acceptable C compiler found in \$PATH
33830See \`config.log' for more details" "$LINENO" 5; }
33831
33832# Provide some information about the compiler.
33833$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33834set X $ac_compile
33835ac_compiler=$2
33836for ac_option in --version -v -V -qversion; do
33837  { { ac_try="$ac_compiler $ac_option >&5"
33838case "(($ac_try" in
33839  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33840  *) ac_try_echo=$ac_try;;
33841esac
33842eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33843$as_echo "$ac_try_echo"; } >&5
33844  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33845  ac_status=$?
33846  if test -s conftest.err; then
33847    sed '10a\
33848... rest of stderr output deleted ...
33849         10q' conftest.err >conftest.er1
33850    cat conftest.er1 >&5
33851  fi
33852  rm -f conftest.er1 conftest.err
33853  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33854  test $ac_status = 0; }
33855done
33856
33857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33858/* end confdefs.h.  */
33859
33860int
33861main ()
33862{
33863
33864  ;
33865  return 0;
33866}
33867_ACEOF
33868ac_clean_files_save=$ac_clean_files
33869ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33870# Try to create an executable without -o first, disregard a.out.
33871# It will help us diagnose broken compilers, and finding out an intuition
33872# of exeext.
33873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33874$as_echo_n "checking whether the C compiler works... " >&6; }
33875ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33876
33877# The possible output files:
33878ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33879
33880ac_rmfiles=
33881for ac_file in $ac_files
33882do
33883  case $ac_file in
33884    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33885    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33886  esac
33887done
33888rm -f $ac_rmfiles
33889
33890if { { ac_try="$ac_link_default"
33891case "(($ac_try" in
33892  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33893  *) ac_try_echo=$ac_try;;
33894esac
33895eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33896$as_echo "$ac_try_echo"; } >&5
33897  (eval "$ac_link_default") 2>&5
33898  ac_status=$?
33899  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33900  test $ac_status = 0; }; then :
33901  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33902# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33903# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33904# so that the user can short-circuit this test for compilers unknown to
33905# Autoconf.
33906for ac_file in $ac_files ''
33907do
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	;;
33912    [ab].out )
33913	# We found the default executable, but exeext='' is most
33914	# certainly right.
33915	break;;
33916    *.* )
33917	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33918	then :; else
33919	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33920	fi
33921	# We set ac_cv_exeext here because the later test for it is not
33922	# safe: cross compilers may not add the suffix if given an `-o'
33923	# argument, so we may need to know it at that point already.
33924	# Even if this section looks crufty: it has the advantage of
33925	# actually working.
33926	break;;
33927    * )
33928	break;;
33929  esac
33930done
33931test "$ac_cv_exeext" = no && ac_cv_exeext=
33932
33933else
33934  ac_file=''
33935fi
33936if test -z "$ac_file"; then :
33937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33938$as_echo "no" >&6; }
33939$as_echo "$as_me: failed program was:" >&5
33940sed 's/^/| /' conftest.$ac_ext >&5
33941
33942{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33944as_fn_error 77 "C compiler cannot create executables
33945See \`config.log' for more details" "$LINENO" 5; }
33946else
33947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33948$as_echo "yes" >&6; }
33949fi
33950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33951$as_echo_n "checking for C compiler default output file name... " >&6; }
33952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33953$as_echo "$ac_file" >&6; }
33954ac_exeext=$ac_cv_exeext
33955
33956rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33957ac_clean_files=$ac_clean_files_save
33958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33959$as_echo_n "checking for suffix of executables... " >&6; }
33960if { { ac_try="$ac_link"
33961case "(($ac_try" in
33962  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33963  *) ac_try_echo=$ac_try;;
33964esac
33965eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33966$as_echo "$ac_try_echo"; } >&5
33967  (eval "$ac_link") 2>&5
33968  ac_status=$?
33969  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33970  test $ac_status = 0; }; then :
33971  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33972# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33973# work properly (i.e., refer to `conftest.exe'), while it won't with
33974# `rm'.
33975for ac_file in conftest.exe conftest conftest.*; do
33976  test -f "$ac_file" || continue
33977  case $ac_file in
33978    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33979    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33980	  break;;
33981    * ) break;;
33982  esac
33983done
33984else
33985  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33986$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33987as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33988See \`config.log' for more details" "$LINENO" 5; }
33989fi
33990rm -f conftest conftest$ac_cv_exeext
33991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33992$as_echo "$ac_cv_exeext" >&6; }
33993
33994rm -f conftest.$ac_ext
33995EXEEXT=$ac_cv_exeext
33996ac_exeext=$EXEEXT
33997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33998/* end confdefs.h.  */
33999#include <stdio.h>
34000int
34001main ()
34002{
34003FILE *f = fopen ("conftest.out", "w");
34004 return ferror (f) || fclose (f) != 0;
34005
34006  ;
34007  return 0;
34008}
34009_ACEOF
34010ac_clean_files="$ac_clean_files conftest.out"
34011# Check that the compiler produces executables we can run.  If not, either
34012# the compiler is broken, or we cross compile.
34013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34014$as_echo_n "checking whether we are cross compiling... " >&6; }
34015if test "$cross_compiling" != yes; then
34016  { { ac_try="$ac_link"
34017case "(($ac_try" in
34018  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34019  *) ac_try_echo=$ac_try;;
34020esac
34021eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34022$as_echo "$ac_try_echo"; } >&5
34023  (eval "$ac_link") 2>&5
34024  ac_status=$?
34025  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34026  test $ac_status = 0; }
34027  if { ac_try='./conftest$ac_cv_exeext'
34028  { { case "(($ac_try" in
34029  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34030  *) ac_try_echo=$ac_try;;
34031esac
34032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34033$as_echo "$ac_try_echo"; } >&5
34034  (eval "$ac_try") 2>&5
34035  ac_status=$?
34036  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34037  test $ac_status = 0; }; }; then
34038    cross_compiling=no
34039  else
34040    if test "$cross_compiling" = maybe; then
34041	cross_compiling=yes
34042    else
34043	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34044$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34045as_fn_error $? "cannot run C compiled programs.
34046If you meant to cross compile, use \`--host'.
34047See \`config.log' for more details" "$LINENO" 5; }
34048    fi
34049  fi
34050fi
34051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34052$as_echo "$cross_compiling" >&6; }
34053
34054rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34055ac_clean_files=$ac_clean_files_save
34056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34057$as_echo_n "checking for suffix of object files... " >&6; }
34058if ${ac_cv_objext+:} false; then :
34059  $as_echo_n "(cached) " >&6
34060else
34061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34062/* end confdefs.h.  */
34063
34064int
34065main ()
34066{
34067
34068  ;
34069  return 0;
34070}
34071_ACEOF
34072rm -f conftest.o conftest.obj
34073if { { ac_try="$ac_compile"
34074case "(($ac_try" in
34075  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34076  *) ac_try_echo=$ac_try;;
34077esac
34078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34079$as_echo "$ac_try_echo"; } >&5
34080  (eval "$ac_compile") 2>&5
34081  ac_status=$?
34082  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34083  test $ac_status = 0; }; then :
34084  for ac_file in conftest.o conftest.obj conftest.*; do
34085  test -f "$ac_file" || continue;
34086  case $ac_file in
34087    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34088    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34089       break;;
34090  esac
34091done
34092else
34093  $as_echo "$as_me: failed program was:" >&5
34094sed 's/^/| /' conftest.$ac_ext >&5
34095
34096{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34098as_fn_error $? "cannot compute suffix of object files: cannot compile
34099See \`config.log' for more details" "$LINENO" 5; }
34100fi
34101rm -f conftest.$ac_cv_objext conftest.$ac_ext
34102fi
34103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34104$as_echo "$ac_cv_objext" >&6; }
34105OBJEXT=$ac_cv_objext
34106ac_objext=$OBJEXT
34107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34108$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34109if ${ac_cv_c_compiler_gnu+:} false; then :
34110  $as_echo_n "(cached) " >&6
34111else
34112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34113/* end confdefs.h.  */
34114
34115int
34116main ()
34117{
34118#ifndef __GNUC__
34119       choke me
34120#endif
34121
34122  ;
34123  return 0;
34124}
34125_ACEOF
34126if ac_fn_c_try_compile "$LINENO"; then :
34127  ac_compiler_gnu=yes
34128else
34129  ac_compiler_gnu=no
34130fi
34131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34132ac_cv_c_compiler_gnu=$ac_compiler_gnu
34133
34134fi
34135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34136$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34137if test $ac_compiler_gnu = yes; then
34138  GCC=yes
34139else
34140  GCC=
34141fi
34142ac_test_CFLAGS=${CFLAGS+set}
34143ac_save_CFLAGS=$CFLAGS
34144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34145$as_echo_n "checking whether $CC accepts -g... " >&6; }
34146if ${ac_cv_prog_cc_g+:} false; then :
34147  $as_echo_n "(cached) " >&6
34148else
34149  ac_save_c_werror_flag=$ac_c_werror_flag
34150   ac_c_werror_flag=yes
34151   ac_cv_prog_cc_g=no
34152   CFLAGS="-g"
34153   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34154/* end confdefs.h.  */
34155
34156int
34157main ()
34158{
34159
34160  ;
34161  return 0;
34162}
34163_ACEOF
34164if ac_fn_c_try_compile "$LINENO"; then :
34165  ac_cv_prog_cc_g=yes
34166else
34167  CFLAGS=""
34168      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34169/* end confdefs.h.  */
34170
34171int
34172main ()
34173{
34174
34175  ;
34176  return 0;
34177}
34178_ACEOF
34179if ac_fn_c_try_compile "$LINENO"; then :
34180
34181else
34182  ac_c_werror_flag=$ac_save_c_werror_flag
34183	 CFLAGS="-g"
34184	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34185/* end confdefs.h.  */
34186
34187int
34188main ()
34189{
34190
34191  ;
34192  return 0;
34193}
34194_ACEOF
34195if ac_fn_c_try_compile "$LINENO"; then :
34196  ac_cv_prog_cc_g=yes
34197fi
34198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34199fi
34200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34201fi
34202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34203   ac_c_werror_flag=$ac_save_c_werror_flag
34204fi
34205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34206$as_echo "$ac_cv_prog_cc_g" >&6; }
34207if test "$ac_test_CFLAGS" = set; then
34208  CFLAGS=$ac_save_CFLAGS
34209elif test $ac_cv_prog_cc_g = yes; then
34210  if test "$GCC" = yes; then
34211    CFLAGS="-g -O2"
34212  else
34213    CFLAGS="-g"
34214  fi
34215else
34216  if test "$GCC" = yes; then
34217    CFLAGS="-O2"
34218  else
34219    CFLAGS=
34220  fi
34221fi
34222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34223$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34224if ${ac_cv_prog_cc_c89+:} false; then :
34225  $as_echo_n "(cached) " >&6
34226else
34227  ac_cv_prog_cc_c89=no
34228ac_save_CC=$CC
34229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34230/* end confdefs.h.  */
34231#include <stdarg.h>
34232#include <stdio.h>
34233struct stat;
34234/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34235struct buf { int x; };
34236FILE * (*rcsopen) (struct buf *, struct stat *, int);
34237static char *e (p, i)
34238     char **p;
34239     int i;
34240{
34241  return p[i];
34242}
34243static char *f (char * (*g) (char **, int), char **p, ...)
34244{
34245  char *s;
34246  va_list v;
34247  va_start (v,p);
34248  s = g (p, va_arg (v,int));
34249  va_end (v);
34250  return s;
34251}
34252
34253/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34254   function prototypes and stuff, but not '\xHH' hex character constants.
34255   These don't provoke an error unfortunately, instead are silently treated
34256   as 'x'.  The following induces an error, until -std is added to get
34257   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34258   array size at least.  It's necessary to write '\x00'==0 to get something
34259   that's true only with -std.  */
34260int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34261
34262/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34263   inside strings and character constants.  */
34264#define FOO(x) 'x'
34265int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34266
34267int test (int i, double x);
34268struct s1 {int (*f) (int a);};
34269struct s2 {int (*f) (double a);};
34270int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34271int argc;
34272char **argv;
34273int
34274main ()
34275{
34276return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34277  ;
34278  return 0;
34279}
34280_ACEOF
34281for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34282	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34283do
34284  CC="$ac_save_CC $ac_arg"
34285  if ac_fn_c_try_compile "$LINENO"; then :
34286  ac_cv_prog_cc_c89=$ac_arg
34287fi
34288rm -f core conftest.err conftest.$ac_objext
34289  test "x$ac_cv_prog_cc_c89" != "xno" && break
34290done
34291rm -f conftest.$ac_ext
34292CC=$ac_save_CC
34293
34294fi
34295# AC_CACHE_VAL
34296case "x$ac_cv_prog_cc_c89" in
34297  x)
34298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34299$as_echo "none needed" >&6; } ;;
34300  xno)
34301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34302$as_echo "unsupported" >&6; } ;;
34303  *)
34304    CC="$CC $ac_cv_prog_cc_c89"
34305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34306$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34307esac
34308if test "x$ac_cv_prog_cc_c89" != xno; then :
34309
34310fi
34311
34312ac_ext=cpp
34313ac_cpp='$CXXCPP $CPPFLAGS'
34314ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34315ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34316ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34317
34318
34319
34320  COMPILER_NAME=C++
34321  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34322
34323  if test "x$CXX" != x; then
34324    # User has supplied compiler name already, always let that override.
34325    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34326$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34327    if test "x`basename $CXX`" = "x$CXX"; then
34328      # A command without a complete path is provided, search $PATH.
34329
34330      for ac_prog in $CXX
34331do
34332  # Extract the first word of "$ac_prog", so it can be a program name with args.
34333set dummy $ac_prog; ac_word=$2
34334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34335$as_echo_n "checking for $ac_word... " >&6; }
34336if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34337  $as_echo_n "(cached) " >&6
34338else
34339  case $POTENTIAL_CXX in
34340  [\\/]* | ?:[\\/]*)
34341  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34342  ;;
34343  *)
34344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34345for as_dir in $PATH
34346do
34347  IFS=$as_save_IFS
34348  test -z "$as_dir" && as_dir=.
34349    for ac_exec_ext in '' $ac_executable_extensions; do
34350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34351    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34353    break 2
34354  fi
34355done
34356  done
34357IFS=$as_save_IFS
34358
34359  ;;
34360esac
34361fi
34362POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34363if test -n "$POTENTIAL_CXX"; then
34364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34365$as_echo "$POTENTIAL_CXX" >&6; }
34366else
34367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34368$as_echo "no" >&6; }
34369fi
34370
34371
34372  test -n "$POTENTIAL_CXX" && break
34373done
34374
34375      if test "x$POTENTIAL_CXX" != x; then
34376        CXX=$POTENTIAL_CXX
34377      else
34378        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34379      fi
34380    else
34381      # Otherwise it might already be a complete path
34382      if test ! -x "$CXX"; then
34383        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34384      fi
34385    fi
34386  else
34387    # No user supplied value. Locate compiler ourselves.
34388
34389    # If we are cross compiling, assume cross compilation tools follows the
34390    # cross compilation standard where they are prefixed with the autoconf
34391    # standard name for the target. For example the binary
34392    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34393    # If we are not cross compiling, then the default compiler name will be
34394    # used.
34395
34396    CXX=
34397    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34398    # before checking the rest of the PATH.
34399    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34400    # step, this should not be necessary.
34401    if test -n "$TOOLCHAIN_PATH"; then
34402      PATH_save="$PATH"
34403      PATH="$TOOLCHAIN_PATH"
34404      for ac_prog in $SEARCH_LIST
34405do
34406  # Extract the first word of "$ac_prog", so it can be a program name with args.
34407set dummy $ac_prog; ac_word=$2
34408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34409$as_echo_n "checking for $ac_word... " >&6; }
34410if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34411  $as_echo_n "(cached) " >&6
34412else
34413  case $TOOLCHAIN_PATH_CXX in
34414  [\\/]* | ?:[\\/]*)
34415  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34416  ;;
34417  *)
34418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34419for as_dir in $PATH
34420do
34421  IFS=$as_save_IFS
34422  test -z "$as_dir" && as_dir=.
34423    for ac_exec_ext in '' $ac_executable_extensions; do
34424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34425    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34427    break 2
34428  fi
34429done
34430  done
34431IFS=$as_save_IFS
34432
34433  ;;
34434esac
34435fi
34436TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34437if test -n "$TOOLCHAIN_PATH_CXX"; then
34438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34439$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34440else
34441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34442$as_echo "no" >&6; }
34443fi
34444
34445
34446  test -n "$TOOLCHAIN_PATH_CXX" && break
34447done
34448
34449      CXX=$TOOLCHAIN_PATH_CXX
34450      PATH="$PATH_save"
34451    fi
34452
34453    # AC_PATH_PROGS can't be run multiple times with the same variable,
34454    # so create a new name for this run.
34455    if test "x$CXX" = x; then
34456      for ac_prog in $SEARCH_LIST
34457do
34458  # Extract the first word of "$ac_prog", so it can be a program name with args.
34459set dummy $ac_prog; ac_word=$2
34460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34461$as_echo_n "checking for $ac_word... " >&6; }
34462if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34463  $as_echo_n "(cached) " >&6
34464else
34465  case $POTENTIAL_CXX in
34466  [\\/]* | ?:[\\/]*)
34467  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34468  ;;
34469  *)
34470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34471for as_dir in $PATH
34472do
34473  IFS=$as_save_IFS
34474  test -z "$as_dir" && as_dir=.
34475    for ac_exec_ext in '' $ac_executable_extensions; do
34476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34477    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34479    break 2
34480  fi
34481done
34482  done
34483IFS=$as_save_IFS
34484
34485  ;;
34486esac
34487fi
34488POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34489if test -n "$POTENTIAL_CXX"; then
34490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34491$as_echo "$POTENTIAL_CXX" >&6; }
34492else
34493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34494$as_echo "no" >&6; }
34495fi
34496
34497
34498  test -n "$POTENTIAL_CXX" && break
34499done
34500
34501      CXX=$POTENTIAL_CXX
34502    fi
34503
34504    if test "x$CXX" = x; then
34505
34506  # Print a helpful message on how to acquire the necessary build dependency.
34507  # devkit is the help tag: freetype, cups, alsa etc
34508  MISSING_DEPENDENCY=devkit
34509
34510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34511    cygwin_help $MISSING_DEPENDENCY
34512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34513    msys_help $MISSING_DEPENDENCY
34514  else
34515    PKGHANDLER_COMMAND=
34516
34517    case $PKGHANDLER in
34518      apt-get)
34519        apt_help     $MISSING_DEPENDENCY ;;
34520      yum)
34521        yum_help     $MISSING_DEPENDENCY ;;
34522      port)
34523        port_help    $MISSING_DEPENDENCY ;;
34524      pkgutil)
34525        pkgutil_help $MISSING_DEPENDENCY ;;
34526      pkgadd)
34527        pkgadd_help  $MISSING_DEPENDENCY ;;
34528    esac
34529
34530    if test "x$PKGHANDLER_COMMAND" != x; then
34531      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34532    fi
34533  fi
34534
34535      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34536    fi
34537  fi
34538
34539  # Now we have a compiler binary in CXX. Make sure it's okay.
34540
34541  # Only process if variable expands to non-empty
34542
34543  if test "x$CXX" != x; then
34544    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34545
34546  # First separate the path from the arguments. This will split at the first
34547  # space.
34548  complete="$CXX"
34549  path="${complete%% *}"
34550  tmp="$complete EOL"
34551  arguments="${tmp#* }"
34552
34553  # Input might be given as Windows format, start by converting to
34554  # unix format.
34555  new_path=`$CYGPATH -u "$path"`
34556
34557  # Now try to locate executable using which
34558  new_path=`$WHICH "$new_path" 2> /dev/null`
34559  # bat and cmd files are not always considered executable in cygwin causing which
34560  # to not find them
34561  if test "x$new_path" = x \
34562      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34563      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34564    new_path=`$CYGPATH -u "$path"`
34565  fi
34566  if test "x$new_path" = x; then
34567    # Oops. Which didn't find the executable.
34568    # The splitting of arguments from the executable at a space might have been incorrect,
34569    # since paths with space are more likely in Windows. Give it another try with the whole
34570    # argument.
34571    path="$complete"
34572    arguments="EOL"
34573    new_path=`$CYGPATH -u "$path"`
34574    new_path=`$WHICH "$new_path" 2> /dev/null`
34575    # bat and cmd files are not always considered executable in cygwin causing which
34576    # to not find them
34577    if test "x$new_path" = x \
34578        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34579        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34580      new_path=`$CYGPATH -u "$path"`
34581    fi
34582    if test "x$new_path" = x; then
34583      # It's still not found. Now this is an unrecoverable error.
34584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34585$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34586      has_space=`$ECHO "$complete" | $GREP " "`
34587      if test "x$has_space" != x; then
34588        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34589$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34590      fi
34591      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34592    fi
34593  fi
34594
34595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34598  # "foo.exe" is OK but "foo" is an error.
34599  #
34600  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34601  # It is also a way to make sure we got the proper file name for the real test later on.
34602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34603  if test "x$test_shortpath" = x; then
34604    # Short path failed, file does not exist as specified.
34605    # Try adding .exe or .cmd
34606    if test -f "${new_path}.exe"; then
34607      input_to_shortpath="${new_path}.exe"
34608    elif test -f "${new_path}.cmd"; then
34609      input_to_shortpath="${new_path}.cmd"
34610    else
34611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34612$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34613      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34614$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34615      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34616    fi
34617  else
34618    input_to_shortpath="$new_path"
34619  fi
34620
34621  # Call helper function which possibly converts this using DOS-style short mode.
34622  # If so, the updated path is stored in $new_path.
34623  new_path="$input_to_shortpath"
34624
34625  input_path="$input_to_shortpath"
34626  # Check if we need to convert this using DOS-style short mode. If the path
34627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34628  # take no chances and rewrite it.
34629  # Note: m4 eats our [], so we need to use [ and ] instead.
34630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34631  if test "x$has_forbidden_chars" != x; then
34632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34633    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34634    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34635    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34636      # Going to short mode and back again did indeed matter. Since short mode is
34637      # case insensitive, let's make it lowercase to improve readability.
34638      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34639      # Now convert it back to Unix-style (cygpath)
34640      input_path=`$CYGPATH -u "$shortmode_path"`
34641      new_path="$input_path"
34642    fi
34643  fi
34644
34645  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34646  if test "x$test_cygdrive_prefix" = x; then
34647    # As a simple fix, exclude /usr/bin since it's not a real path.
34648    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34649      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34650      # a path prefixed by /cygdrive for fixpath to work.
34651      new_path="$CYGWIN_ROOT_PATH$input_path"
34652    fi
34653  fi
34654
34655  # remove trailing .exe if any
34656  new_path="${new_path/%.exe/}"
34657
34658    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34659
34660  # First separate the path from the arguments. This will split at the first
34661  # space.
34662  complete="$CXX"
34663  path="${complete%% *}"
34664  tmp="$complete EOL"
34665  arguments="${tmp#* }"
34666
34667  # Input might be given as Windows format, start by converting to
34668  # unix format.
34669  new_path="$path"
34670
34671  windows_path="$new_path"
34672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34673    unix_path=`$CYGPATH -u "$windows_path"`
34674    new_path="$unix_path"
34675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34677    new_path="$unix_path"
34678  fi
34679
34680
34681  # Now try to locate executable using which
34682  new_path=`$WHICH "$new_path" 2> /dev/null`
34683
34684  if test "x$new_path" = x; then
34685    # Oops. Which didn't find the executable.
34686    # The splitting of arguments from the executable at a space might have been incorrect,
34687    # since paths with space are more likely in Windows. Give it another try with the whole
34688    # argument.
34689    path="$complete"
34690    arguments="EOL"
34691    new_path="$path"
34692
34693  windows_path="$new_path"
34694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34695    unix_path=`$CYGPATH -u "$windows_path"`
34696    new_path="$unix_path"
34697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34699    new_path="$unix_path"
34700  fi
34701
34702
34703    new_path=`$WHICH "$new_path" 2> /dev/null`
34704    # bat and cmd files are not always considered executable in MSYS causing which
34705    # to not find them
34706    if test "x$new_path" = x \
34707        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34708        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34709      new_path="$path"
34710
34711  windows_path="$new_path"
34712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34713    unix_path=`$CYGPATH -u "$windows_path"`
34714    new_path="$unix_path"
34715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34717    new_path="$unix_path"
34718  fi
34719
34720    fi
34721
34722    if test "x$new_path" = x; then
34723      # It's still not found. Now this is an unrecoverable error.
34724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34725$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34726      has_space=`$ECHO "$complete" | $GREP " "`
34727      if test "x$has_space" != x; then
34728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34730      fi
34731      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34732    fi
34733  fi
34734
34735  # Now new_path has a complete unix path to the binary
34736  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34737    # Keep paths in /bin as-is, but remove trailing .exe if any
34738    new_path="${new_path/%.exe/}"
34739    # Do not save /bin paths to all_fixpath_prefixes!
34740  else
34741    # Not in mixed or Windows style, start by that.
34742    new_path=`cmd //c echo $new_path`
34743
34744  input_path="$new_path"
34745  # Check if we need to convert this using DOS-style short mode. If the path
34746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34747  # take no chances and rewrite it.
34748  # Note: m4 eats our [], so we need to use [ and ] instead.
34749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34750  if test "x$has_forbidden_chars" != x; then
34751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34753  fi
34754
34755    # Output is in $new_path
34756
34757  windows_path="$new_path"
34758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34759    unix_path=`$CYGPATH -u "$windows_path"`
34760    new_path="$unix_path"
34761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34763    new_path="$unix_path"
34764  fi
34765
34766    # remove trailing .exe if any
34767    new_path="${new_path/%.exe/}"
34768
34769    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34770    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34771  fi
34772
34773    else
34774      # We're on a unix platform. Hooray! :)
34775      # First separate the path from the arguments. This will split at the first
34776      # space.
34777      complete="$CXX"
34778      path="${complete%% *}"
34779      tmp="$complete EOL"
34780      arguments="${tmp#* }"
34781
34782      # Cannot rely on the command "which" here since it doesn't always work.
34783      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34784      if test -z "$is_absolute_path"; then
34785        # Path to executable is not absolute. Find it.
34786        IFS_save="$IFS"
34787        IFS=:
34788        for p in $PATH; do
34789          if test -f "$p/$path" && test -x "$p/$path"; then
34790            new_path="$p/$path"
34791            break
34792          fi
34793        done
34794        IFS="$IFS_save"
34795      else
34796        # This is an absolute path, we can use it without further modifications.
34797        new_path="$path"
34798      fi
34799
34800      if test "x$new_path" = x; then
34801        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34802$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34803        has_space=`$ECHO "$complete" | $GREP " "`
34804        if test "x$has_space" != x; then
34805          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34806$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34807        fi
34808        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34809      fi
34810    fi
34811
34812    # Now join together the path and the arguments once again
34813    if test "x$arguments" != xEOL; then
34814      new_complete="$new_path ${arguments% *}"
34815    else
34816      new_complete="$new_path"
34817    fi
34818
34819    if test "x$complete" != "x$new_complete"; then
34820      CXX="$new_complete"
34821      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34822$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34823    fi
34824  fi
34825
34826  TEST_COMPILER="$CXX"
34827
34828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34829$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34830  SYMLINK_ORIGINAL="$TEST_COMPILER"
34831
34832  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34833    # Follow a chain of symbolic links. Use readlink
34834    # where it exists, else fall back to horribly
34835    # complicated shell code.
34836    if test "x$READLINK_TESTED" != yes; then
34837      # On MacOSX there is a readlink tool with a different
34838      # purpose than the GNU readlink tool. Check the found readlink.
34839      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34840      if test "x$ISGNU" = x; then
34841        # A readlink that we do not know how to use.
34842        # Are there other non-GNU readlinks out there?
34843        READLINK_TESTED=yes
34844        READLINK=
34845      fi
34846    fi
34847
34848    if test "x$READLINK" != x; then
34849      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34850    else
34851      # Save the current directory for restoring afterwards
34852      STARTDIR=$PWD
34853      COUNTER=0
34854      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34855      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34856      cd $sym_link_dir
34857      # Use -P flag to resolve symlinks in directories.
34858      cd `$THEPWDCMD -P`
34859      sym_link_dir=`$THEPWDCMD -P`
34860      # Resolve file symlinks
34861      while test $COUNTER -lt 20; do
34862        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34863        if test "x$ISLINK" == x; then
34864          # This is not a symbolic link! We are done!
34865          break
34866        fi
34867        # Again resolve directory symlinks since the target of the just found
34868        # link could be in a different directory
34869        cd `$DIRNAME $ISLINK`
34870        sym_link_dir=`$THEPWDCMD -P`
34871        sym_link_file=`$BASENAME $ISLINK`
34872        let COUNTER=COUNTER+1
34873      done
34874      cd $STARTDIR
34875      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34876    fi
34877  fi
34878
34879  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34881$as_echo "no symlink" >&6; }
34882  else
34883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34884$as_echo "$SYMLINK_ORIGINAL" >&6; }
34885
34886    # We can't handle ccache by gcc wrappers, since we need to know if we're
34887    # using ccache. Instead ccache usage must be controlled by a configure option.
34888    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34889    if test "x$COMPILER_BASENAME" = "xccache"; then
34890      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34891$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34892      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34893    fi
34894  fi
34895
34896
34897  COMPILER=$CXX
34898  COMPILER_NAME=$COMPILER_NAME
34899
34900  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34901    # cc -V output typically looks like
34902    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34903    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34904    # Check that this is likely to be the Solaris Studio cc.
34905    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34906    if test $? -ne 0; then
34907      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34908      { $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
34909$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34910      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34911$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34912      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34913$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34914      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34915    fi
34916    # Remove usage instructions (if present), and
34917    # collapse compiler output into a single line
34918    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34919        $SED -e 's/ *[Uu]sage:.*//'`
34920    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34921        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34922  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34923    # xlc -qversion output typically looks like
34924    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34925    #     Version: 11.01.0000.0015
34926    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34927    # Check that this is likely to be the IBM XL C compiler.
34928    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34929    if test $? -ne 0; then
34930      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34931      { $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
34932$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34933      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34934$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34935      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34936$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34937      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34938    fi
34939    # Collapse compiler output into a single line
34940    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34941    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34942        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34943  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34944    # There is no specific version flag, but all output starts with a version string.
34945    # First line typically looks something like:
34946    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34947    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34948    # Check that this is likely to be Microsoft CL.EXE.
34949    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34950    if test $? -ne 0; then
34951      { $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
34952$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34953      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34954$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34955      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34956    fi
34957    # Collapse compiler output into a single line
34958    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34959    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34960        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34961  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34962    # gcc --version output typically looks like
34963    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34964    #     Copyright (C) 2013 Free Software Foundation, Inc.
34965    #     This is free software; see the source for copying conditions.  There is NO
34966    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34967    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34968    # Check that this is likely to be GCC.
34969    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34970    if test $? -ne 0; then
34971      { $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
34972$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34973      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34974$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34975      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34976    fi
34977    # Remove Copyright and legalese from version string, and
34978    # collapse into a single line
34979    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34980        $SED -e 's/ *Copyright .*//'`
34981    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34982        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34983  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34984    # clang --version output typically looks like
34985    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34986    #    clang version 3.3 (tags/RELEASE_33/final)
34987    # or
34988    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34989    #    Target: x86_64-pc-linux-gnu
34990    #    Thread model: posix
34991    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34992    # Check that this is likely to be clang
34993    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34994    if test $? -ne 0; then
34995      { $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
34996$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34997      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34998$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34999      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35000    fi
35001    # Collapse compiler output into a single line
35002    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35003    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35004        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35005  else
35006      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35007  fi
35008  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35009  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35010  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35011  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35012
35013  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35014$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35015
35016
35017  # Now that we have resolved CXX ourself, let autoconf have its go at it
35018  ac_ext=cpp
35019ac_cpp='$CXXCPP $CPPFLAGS'
35020ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35021ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35022ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35023if test -z "$CXX"; then
35024  if test -n "$CCC"; then
35025    CXX=$CCC
35026  else
35027    if test -n "$ac_tool_prefix"; then
35028  for ac_prog in $CXX
35029  do
35030    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35031set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35033$as_echo_n "checking for $ac_word... " >&6; }
35034if ${ac_cv_prog_CXX+:} false; then :
35035  $as_echo_n "(cached) " >&6
35036else
35037  if test -n "$CXX"; then
35038  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35039else
35040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35041for as_dir in $PATH
35042do
35043  IFS=$as_save_IFS
35044  test -z "$as_dir" && as_dir=.
35045    for ac_exec_ext in '' $ac_executable_extensions; do
35046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35047    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35049    break 2
35050  fi
35051done
35052  done
35053IFS=$as_save_IFS
35054
35055fi
35056fi
35057CXX=$ac_cv_prog_CXX
35058if test -n "$CXX"; then
35059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35060$as_echo "$CXX" >&6; }
35061else
35062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35063$as_echo "no" >&6; }
35064fi
35065
35066
35067    test -n "$CXX" && break
35068  done
35069fi
35070if test -z "$CXX"; then
35071  ac_ct_CXX=$CXX
35072  for ac_prog in $CXX
35073do
35074  # Extract the first word of "$ac_prog", so it can be a program name with args.
35075set dummy $ac_prog; ac_word=$2
35076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35077$as_echo_n "checking for $ac_word... " >&6; }
35078if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35079  $as_echo_n "(cached) " >&6
35080else
35081  if test -n "$ac_ct_CXX"; then
35082  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35083else
35084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35085for as_dir in $PATH
35086do
35087  IFS=$as_save_IFS
35088  test -z "$as_dir" && as_dir=.
35089    for ac_exec_ext in '' $ac_executable_extensions; do
35090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35091    ac_cv_prog_ac_ct_CXX="$ac_prog"
35092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35093    break 2
35094  fi
35095done
35096  done
35097IFS=$as_save_IFS
35098
35099fi
35100fi
35101ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35102if test -n "$ac_ct_CXX"; then
35103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35104$as_echo "$ac_ct_CXX" >&6; }
35105else
35106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35107$as_echo "no" >&6; }
35108fi
35109
35110
35111  test -n "$ac_ct_CXX" && break
35112done
35113
35114  if test "x$ac_ct_CXX" = x; then
35115    CXX="g++"
35116  else
35117    case $cross_compiling:$ac_tool_warned in
35118yes:)
35119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35121ac_tool_warned=yes ;;
35122esac
35123    CXX=$ac_ct_CXX
35124  fi
35125fi
35126
35127  fi
35128fi
35129# Provide some information about the compiler.
35130$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35131set X $ac_compile
35132ac_compiler=$2
35133for ac_option in --version -v -V -qversion; do
35134  { { ac_try="$ac_compiler $ac_option >&5"
35135case "(($ac_try" in
35136  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35137  *) ac_try_echo=$ac_try;;
35138esac
35139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35140$as_echo "$ac_try_echo"; } >&5
35141  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35142  ac_status=$?
35143  if test -s conftest.err; then
35144    sed '10a\
35145... rest of stderr output deleted ...
35146         10q' conftest.err >conftest.er1
35147    cat conftest.er1 >&5
35148  fi
35149  rm -f conftest.er1 conftest.err
35150  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35151  test $ac_status = 0; }
35152done
35153
35154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35155$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35156if ${ac_cv_cxx_compiler_gnu+:} false; then :
35157  $as_echo_n "(cached) " >&6
35158else
35159  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35160/* end confdefs.h.  */
35161
35162int
35163main ()
35164{
35165#ifndef __GNUC__
35166       choke me
35167#endif
35168
35169  ;
35170  return 0;
35171}
35172_ACEOF
35173if ac_fn_cxx_try_compile "$LINENO"; then :
35174  ac_compiler_gnu=yes
35175else
35176  ac_compiler_gnu=no
35177fi
35178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35179ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35180
35181fi
35182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35183$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35184if test $ac_compiler_gnu = yes; then
35185  GXX=yes
35186else
35187  GXX=
35188fi
35189ac_test_CXXFLAGS=${CXXFLAGS+set}
35190ac_save_CXXFLAGS=$CXXFLAGS
35191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35192$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35193if ${ac_cv_prog_cxx_g+:} false; then :
35194  $as_echo_n "(cached) " >&6
35195else
35196  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35197   ac_cxx_werror_flag=yes
35198   ac_cv_prog_cxx_g=no
35199   CXXFLAGS="-g"
35200   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35201/* end confdefs.h.  */
35202
35203int
35204main ()
35205{
35206
35207  ;
35208  return 0;
35209}
35210_ACEOF
35211if ac_fn_cxx_try_compile "$LINENO"; then :
35212  ac_cv_prog_cxx_g=yes
35213else
35214  CXXFLAGS=""
35215      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35216/* end confdefs.h.  */
35217
35218int
35219main ()
35220{
35221
35222  ;
35223  return 0;
35224}
35225_ACEOF
35226if ac_fn_cxx_try_compile "$LINENO"; then :
35227
35228else
35229  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35230	 CXXFLAGS="-g"
35231	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35232/* end confdefs.h.  */
35233
35234int
35235main ()
35236{
35237
35238  ;
35239  return 0;
35240}
35241_ACEOF
35242if ac_fn_cxx_try_compile "$LINENO"; then :
35243  ac_cv_prog_cxx_g=yes
35244fi
35245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35246fi
35247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35248fi
35249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35250   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35251fi
35252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35253$as_echo "$ac_cv_prog_cxx_g" >&6; }
35254if test "$ac_test_CXXFLAGS" = set; then
35255  CXXFLAGS=$ac_save_CXXFLAGS
35256elif test $ac_cv_prog_cxx_g = yes; then
35257  if test "$GXX" = yes; then
35258    CXXFLAGS="-g -O2"
35259  else
35260    CXXFLAGS="-g"
35261  fi
35262else
35263  if test "$GXX" = yes; then
35264    CXXFLAGS="-O2"
35265  else
35266    CXXFLAGS=
35267  fi
35268fi
35269ac_ext=cpp
35270ac_cpp='$CXXCPP $CPPFLAGS'
35271ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35272ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35273ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35274
35275
35276  # This is the compiler version number on the form X.Y[.Z]
35277
35278
35279
35280
35281  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35282    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35283$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35284    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35285$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35286  fi
35287
35288  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35289  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35290    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35291$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35292  fi
35293
35294  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35295    { $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
35296$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35297  fi
35298
35299  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35300
35301
35302  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352    # Execute function body
35353
35354  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35355  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35356
35357  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35358    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35359  fi
35360
35361  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35362    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35363  fi
35364
35365  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35366  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35367
35368  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35369    :
35370
35371  else
35372    :
35373
35374          { $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
35375$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35376
35377
35378  fi
35379
35380
35381
35382
35383
35384
35385
35386
35387
35388
35389
35390
35391
35392
35393  fi
35394
35395  #
35396  # Setup the preprocessor (CPP and CXXCPP)
35397  #
35398  ac_ext=c
35399ac_cpp='$CPP $CPPFLAGS'
35400ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35401ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35402ac_compiler_gnu=$ac_cv_c_compiler_gnu
35403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35404$as_echo_n "checking how to run the C preprocessor... " >&6; }
35405# On Suns, sometimes $CPP names a directory.
35406if test -n "$CPP" && test -d "$CPP"; then
35407  CPP=
35408fi
35409if test -z "$CPP"; then
35410  if ${ac_cv_prog_CPP+:} false; then :
35411  $as_echo_n "(cached) " >&6
35412else
35413      # Double quotes because CPP needs to be expanded
35414    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35415    do
35416      ac_preproc_ok=false
35417for ac_c_preproc_warn_flag in '' yes
35418do
35419  # Use a header file that comes with gcc, so configuring glibc
35420  # with a fresh cross-compiler works.
35421  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35422  # <limits.h> exists even on freestanding compilers.
35423  # On the NeXT, cc -E runs the code through the compiler's parser,
35424  # not just through cpp. "Syntax error" is here to catch this case.
35425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35426/* end confdefs.h.  */
35427#ifdef __STDC__
35428# include <limits.h>
35429#else
35430# include <assert.h>
35431#endif
35432		     Syntax error
35433_ACEOF
35434if ac_fn_c_try_cpp "$LINENO"; then :
35435
35436else
35437  # Broken: fails on valid input.
35438continue
35439fi
35440rm -f conftest.err conftest.i conftest.$ac_ext
35441
35442  # OK, works on sane cases.  Now check whether nonexistent headers
35443  # can be detected and how.
35444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35445/* end confdefs.h.  */
35446#include <ac_nonexistent.h>
35447_ACEOF
35448if ac_fn_c_try_cpp "$LINENO"; then :
35449  # Broken: success on invalid input.
35450continue
35451else
35452  # Passes both tests.
35453ac_preproc_ok=:
35454break
35455fi
35456rm -f conftest.err conftest.i conftest.$ac_ext
35457
35458done
35459# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35460rm -f conftest.i conftest.err conftest.$ac_ext
35461if $ac_preproc_ok; then :
35462  break
35463fi
35464
35465    done
35466    ac_cv_prog_CPP=$CPP
35467
35468fi
35469  CPP=$ac_cv_prog_CPP
35470else
35471  ac_cv_prog_CPP=$CPP
35472fi
35473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35474$as_echo "$CPP" >&6; }
35475ac_preproc_ok=false
35476for ac_c_preproc_warn_flag in '' yes
35477do
35478  # Use a header file that comes with gcc, so configuring glibc
35479  # with a fresh cross-compiler works.
35480  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35481  # <limits.h> exists even on freestanding compilers.
35482  # On the NeXT, cc -E runs the code through the compiler's parser,
35483  # not just through cpp. "Syntax error" is here to catch this case.
35484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35485/* end confdefs.h.  */
35486#ifdef __STDC__
35487# include <limits.h>
35488#else
35489# include <assert.h>
35490#endif
35491		     Syntax error
35492_ACEOF
35493if ac_fn_c_try_cpp "$LINENO"; then :
35494
35495else
35496  # Broken: fails on valid input.
35497continue
35498fi
35499rm -f conftest.err conftest.i conftest.$ac_ext
35500
35501  # OK, works on sane cases.  Now check whether nonexistent headers
35502  # can be detected and how.
35503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35504/* end confdefs.h.  */
35505#include <ac_nonexistent.h>
35506_ACEOF
35507if ac_fn_c_try_cpp "$LINENO"; then :
35508  # Broken: success on invalid input.
35509continue
35510else
35511  # Passes both tests.
35512ac_preproc_ok=:
35513break
35514fi
35515rm -f conftest.err conftest.i conftest.$ac_ext
35516
35517done
35518# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35519rm -f conftest.i conftest.err conftest.$ac_ext
35520if $ac_preproc_ok; then :
35521
35522else
35523  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35524$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35525as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35526See \`config.log' for more details" "$LINENO" 5; }
35527fi
35528
35529ac_ext=cpp
35530ac_cpp='$CXXCPP $CPPFLAGS'
35531ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35532ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35533ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35534
35535
35536  # Only process if variable expands to non-empty
35537
35538  if test "x$CPP" != x; then
35539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35540
35541  # First separate the path from the arguments. This will split at the first
35542  # space.
35543  complete="$CPP"
35544  path="${complete%% *}"
35545  tmp="$complete EOL"
35546  arguments="${tmp#* }"
35547
35548  # Input might be given as Windows format, start by converting to
35549  # unix format.
35550  new_path=`$CYGPATH -u "$path"`
35551
35552  # Now try to locate executable using which
35553  new_path=`$WHICH "$new_path" 2> /dev/null`
35554  # bat and cmd files are not always considered executable in cygwin causing which
35555  # to not find them
35556  if test "x$new_path" = x \
35557      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35558      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35559    new_path=`$CYGPATH -u "$path"`
35560  fi
35561  if test "x$new_path" = x; then
35562    # Oops. Which didn't find the executable.
35563    # The splitting of arguments from the executable at a space might have been incorrect,
35564    # since paths with space are more likely in Windows. Give it another try with the whole
35565    # argument.
35566    path="$complete"
35567    arguments="EOL"
35568    new_path=`$CYGPATH -u "$path"`
35569    new_path=`$WHICH "$new_path" 2> /dev/null`
35570    # bat and cmd files are not always considered executable in cygwin causing which
35571    # to not find them
35572    if test "x$new_path" = x \
35573        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35574        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35575      new_path=`$CYGPATH -u "$path"`
35576    fi
35577    if test "x$new_path" = x; then
35578      # It's still not found. Now this is an unrecoverable error.
35579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35580$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35581      has_space=`$ECHO "$complete" | $GREP " "`
35582      if test "x$has_space" != x; then
35583        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35584$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35585      fi
35586      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35587    fi
35588  fi
35589
35590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35593  # "foo.exe" is OK but "foo" is an error.
35594  #
35595  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35596  # It is also a way to make sure we got the proper file name for the real test later on.
35597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35598  if test "x$test_shortpath" = x; then
35599    # Short path failed, file does not exist as specified.
35600    # Try adding .exe or .cmd
35601    if test -f "${new_path}.exe"; then
35602      input_to_shortpath="${new_path}.exe"
35603    elif test -f "${new_path}.cmd"; then
35604      input_to_shortpath="${new_path}.cmd"
35605    else
35606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35607$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35608      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35609$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35610      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35611    fi
35612  else
35613    input_to_shortpath="$new_path"
35614  fi
35615
35616  # Call helper function which possibly converts this using DOS-style short mode.
35617  # If so, the updated path is stored in $new_path.
35618  new_path="$input_to_shortpath"
35619
35620  input_path="$input_to_shortpath"
35621  # Check if we need to convert this using DOS-style short mode. If the path
35622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35623  # take no chances and rewrite it.
35624  # Note: m4 eats our [], so we need to use [ and ] instead.
35625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35626  if test "x$has_forbidden_chars" != x; then
35627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35631      # Going to short mode and back again did indeed matter. Since short mode is
35632      # case insensitive, let's make it lowercase to improve readability.
35633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35634      # Now convert it back to Unix-style (cygpath)
35635      input_path=`$CYGPATH -u "$shortmode_path"`
35636      new_path="$input_path"
35637    fi
35638  fi
35639
35640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35641  if test "x$test_cygdrive_prefix" = x; then
35642    # As a simple fix, exclude /usr/bin since it's not a real path.
35643    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35645      # a path prefixed by /cygdrive for fixpath to work.
35646      new_path="$CYGWIN_ROOT_PATH$input_path"
35647    fi
35648  fi
35649
35650  # remove trailing .exe if any
35651  new_path="${new_path/%.exe/}"
35652
35653    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35654
35655  # First separate the path from the arguments. This will split at the first
35656  # space.
35657  complete="$CPP"
35658  path="${complete%% *}"
35659  tmp="$complete EOL"
35660  arguments="${tmp#* }"
35661
35662  # Input might be given as Windows format, start by converting to
35663  # unix format.
35664  new_path="$path"
35665
35666  windows_path="$new_path"
35667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35668    unix_path=`$CYGPATH -u "$windows_path"`
35669    new_path="$unix_path"
35670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35672    new_path="$unix_path"
35673  fi
35674
35675
35676  # Now try to locate executable using which
35677  new_path=`$WHICH "$new_path" 2> /dev/null`
35678
35679  if test "x$new_path" = x; then
35680    # Oops. Which didn't find the executable.
35681    # The splitting of arguments from the executable at a space might have been incorrect,
35682    # since paths with space are more likely in Windows. Give it another try with the whole
35683    # argument.
35684    path="$complete"
35685    arguments="EOL"
35686    new_path="$path"
35687
35688  windows_path="$new_path"
35689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35690    unix_path=`$CYGPATH -u "$windows_path"`
35691    new_path="$unix_path"
35692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35694    new_path="$unix_path"
35695  fi
35696
35697
35698    new_path=`$WHICH "$new_path" 2> /dev/null`
35699    # bat and cmd files are not always considered executable in MSYS causing which
35700    # to not find them
35701    if test "x$new_path" = x \
35702        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35703        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35704      new_path="$path"
35705
35706  windows_path="$new_path"
35707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35708    unix_path=`$CYGPATH -u "$windows_path"`
35709    new_path="$unix_path"
35710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35712    new_path="$unix_path"
35713  fi
35714
35715    fi
35716
35717    if test "x$new_path" = x; then
35718      # It's still not found. Now this is an unrecoverable error.
35719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35720$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35721      has_space=`$ECHO "$complete" | $GREP " "`
35722      if test "x$has_space" != x; then
35723        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35724$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35725      fi
35726      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35727    fi
35728  fi
35729
35730  # Now new_path has a complete unix path to the binary
35731  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35732    # Keep paths in /bin as-is, but remove trailing .exe if any
35733    new_path="${new_path/%.exe/}"
35734    # Do not save /bin paths to all_fixpath_prefixes!
35735  else
35736    # Not in mixed or Windows style, start by that.
35737    new_path=`cmd //c echo $new_path`
35738
35739  input_path="$new_path"
35740  # Check if we need to convert this using DOS-style short mode. If the path
35741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35742  # take no chances and rewrite it.
35743  # Note: m4 eats our [], so we need to use [ and ] instead.
35744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35745  if test "x$has_forbidden_chars" != x; then
35746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35748  fi
35749
35750    # Output is in $new_path
35751
35752  windows_path="$new_path"
35753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35754    unix_path=`$CYGPATH -u "$windows_path"`
35755    new_path="$unix_path"
35756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35758    new_path="$unix_path"
35759  fi
35760
35761    # remove trailing .exe if any
35762    new_path="${new_path/%.exe/}"
35763
35764    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35765    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35766  fi
35767
35768    else
35769      # We're on a unix platform. Hooray! :)
35770      # First separate the path from the arguments. This will split at the first
35771      # space.
35772      complete="$CPP"
35773      path="${complete%% *}"
35774      tmp="$complete EOL"
35775      arguments="${tmp#* }"
35776
35777      # Cannot rely on the command "which" here since it doesn't always work.
35778      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35779      if test -z "$is_absolute_path"; then
35780        # Path to executable is not absolute. Find it.
35781        IFS_save="$IFS"
35782        IFS=:
35783        for p in $PATH; do
35784          if test -f "$p/$path" && test -x "$p/$path"; then
35785            new_path="$p/$path"
35786            break
35787          fi
35788        done
35789        IFS="$IFS_save"
35790      else
35791        # This is an absolute path, we can use it without further modifications.
35792        new_path="$path"
35793      fi
35794
35795      if test "x$new_path" = x; then
35796        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35797$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35798        has_space=`$ECHO "$complete" | $GREP " "`
35799        if test "x$has_space" != x; then
35800          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35801$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35802        fi
35803        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35804      fi
35805    fi
35806
35807    # Now join together the path and the arguments once again
35808    if test "x$arguments" != xEOL; then
35809      new_complete="$new_path ${arguments% *}"
35810    else
35811      new_complete="$new_path"
35812    fi
35813
35814    if test "x$complete" != "x$new_complete"; then
35815      CPP="$new_complete"
35816      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35817$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35818    fi
35819  fi
35820
35821  ac_ext=cpp
35822ac_cpp='$CXXCPP $CPPFLAGS'
35823ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35824ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35825ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35827$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35828if test -z "$CXXCPP"; then
35829  if ${ac_cv_prog_CXXCPP+:} false; then :
35830  $as_echo_n "(cached) " >&6
35831else
35832      # Double quotes because CXXCPP needs to be expanded
35833    for CXXCPP in "$CXX -E" "/lib/cpp"
35834    do
35835      ac_preproc_ok=false
35836for ac_cxx_preproc_warn_flag in '' yes
35837do
35838  # Use a header file that comes with gcc, so configuring glibc
35839  # with a fresh cross-compiler works.
35840  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35841  # <limits.h> exists even on freestanding compilers.
35842  # On the NeXT, cc -E runs the code through the compiler's parser,
35843  # not just through cpp. "Syntax error" is here to catch this case.
35844  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35845/* end confdefs.h.  */
35846#ifdef __STDC__
35847# include <limits.h>
35848#else
35849# include <assert.h>
35850#endif
35851		     Syntax error
35852_ACEOF
35853if ac_fn_cxx_try_cpp "$LINENO"; then :
35854
35855else
35856  # Broken: fails on valid input.
35857continue
35858fi
35859rm -f conftest.err conftest.i conftest.$ac_ext
35860
35861  # OK, works on sane cases.  Now check whether nonexistent headers
35862  # can be detected and how.
35863  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35864/* end confdefs.h.  */
35865#include <ac_nonexistent.h>
35866_ACEOF
35867if ac_fn_cxx_try_cpp "$LINENO"; then :
35868  # Broken: success on invalid input.
35869continue
35870else
35871  # Passes both tests.
35872ac_preproc_ok=:
35873break
35874fi
35875rm -f conftest.err conftest.i conftest.$ac_ext
35876
35877done
35878# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35879rm -f conftest.i conftest.err conftest.$ac_ext
35880if $ac_preproc_ok; then :
35881  break
35882fi
35883
35884    done
35885    ac_cv_prog_CXXCPP=$CXXCPP
35886
35887fi
35888  CXXCPP=$ac_cv_prog_CXXCPP
35889else
35890  ac_cv_prog_CXXCPP=$CXXCPP
35891fi
35892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35893$as_echo "$CXXCPP" >&6; }
35894ac_preproc_ok=false
35895for ac_cxx_preproc_warn_flag in '' yes
35896do
35897  # Use a header file that comes with gcc, so configuring glibc
35898  # with a fresh cross-compiler works.
35899  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35900  # <limits.h> exists even on freestanding compilers.
35901  # On the NeXT, cc -E runs the code through the compiler's parser,
35902  # not just through cpp. "Syntax error" is here to catch this case.
35903  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35904/* end confdefs.h.  */
35905#ifdef __STDC__
35906# include <limits.h>
35907#else
35908# include <assert.h>
35909#endif
35910		     Syntax error
35911_ACEOF
35912if ac_fn_cxx_try_cpp "$LINENO"; then :
35913
35914else
35915  # Broken: fails on valid input.
35916continue
35917fi
35918rm -f conftest.err conftest.i conftest.$ac_ext
35919
35920  # OK, works on sane cases.  Now check whether nonexistent headers
35921  # can be detected and how.
35922  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35923/* end confdefs.h.  */
35924#include <ac_nonexistent.h>
35925_ACEOF
35926if ac_fn_cxx_try_cpp "$LINENO"; then :
35927  # Broken: success on invalid input.
35928continue
35929else
35930  # Passes both tests.
35931ac_preproc_ok=:
35932break
35933fi
35934rm -f conftest.err conftest.i conftest.$ac_ext
35935
35936done
35937# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35938rm -f conftest.i conftest.err conftest.$ac_ext
35939if $ac_preproc_ok; then :
35940
35941else
35942  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35944as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35945See \`config.log' for more details" "$LINENO" 5; }
35946fi
35947
35948ac_ext=cpp
35949ac_cpp='$CXXCPP $CPPFLAGS'
35950ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35951ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35952ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35953
35954
35955  # Only process if variable expands to non-empty
35956
35957  if test "x$CXXCPP" != x; then
35958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35959
35960  # First separate the path from the arguments. This will split at the first
35961  # space.
35962  complete="$CXXCPP"
35963  path="${complete%% *}"
35964  tmp="$complete EOL"
35965  arguments="${tmp#* }"
35966
35967  # Input might be given as Windows format, start by converting to
35968  # unix format.
35969  new_path=`$CYGPATH -u "$path"`
35970
35971  # Now try to locate executable using which
35972  new_path=`$WHICH "$new_path" 2> /dev/null`
35973  # bat and cmd files are not always considered executable in cygwin causing which
35974  # to not find them
35975  if test "x$new_path" = x \
35976      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35977      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35978    new_path=`$CYGPATH -u "$path"`
35979  fi
35980  if test "x$new_path" = x; then
35981    # Oops. Which didn't find the executable.
35982    # The splitting of arguments from the executable at a space might have been incorrect,
35983    # since paths with space are more likely in Windows. Give it another try with the whole
35984    # argument.
35985    path="$complete"
35986    arguments="EOL"
35987    new_path=`$CYGPATH -u "$path"`
35988    new_path=`$WHICH "$new_path" 2> /dev/null`
35989    # bat and cmd files are not always considered executable in cygwin causing which
35990    # to not find them
35991    if test "x$new_path" = x \
35992        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35993        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35994      new_path=`$CYGPATH -u "$path"`
35995    fi
35996    if test "x$new_path" = x; then
35997      # It's still not found. Now this is an unrecoverable error.
35998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35999$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36000      has_space=`$ECHO "$complete" | $GREP " "`
36001      if test "x$has_space" != x; then
36002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36004      fi
36005      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36006    fi
36007  fi
36008
36009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36012  # "foo.exe" is OK but "foo" is an error.
36013  #
36014  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36015  # It is also a way to make sure we got the proper file name for the real test later on.
36016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36017  if test "x$test_shortpath" = x; then
36018    # Short path failed, file does not exist as specified.
36019    # Try adding .exe or .cmd
36020    if test -f "${new_path}.exe"; then
36021      input_to_shortpath="${new_path}.exe"
36022    elif test -f "${new_path}.cmd"; then
36023      input_to_shortpath="${new_path}.cmd"
36024    else
36025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36026$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36027      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36028$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36029      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36030    fi
36031  else
36032    input_to_shortpath="$new_path"
36033  fi
36034
36035  # Call helper function which possibly converts this using DOS-style short mode.
36036  # If so, the updated path is stored in $new_path.
36037  new_path="$input_to_shortpath"
36038
36039  input_path="$input_to_shortpath"
36040  # Check if we need to convert this using DOS-style short mode. If the path
36041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36042  # take no chances and rewrite it.
36043  # Note: m4 eats our [], so we need to use [ and ] instead.
36044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36045  if test "x$has_forbidden_chars" != x; then
36046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36050      # Going to short mode and back again did indeed matter. Since short mode is
36051      # case insensitive, let's make it lowercase to improve readability.
36052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36053      # Now convert it back to Unix-style (cygpath)
36054      input_path=`$CYGPATH -u "$shortmode_path"`
36055      new_path="$input_path"
36056    fi
36057  fi
36058
36059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36060  if test "x$test_cygdrive_prefix" = x; then
36061    # As a simple fix, exclude /usr/bin since it's not a real path.
36062    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36064      # a path prefixed by /cygdrive for fixpath to work.
36065      new_path="$CYGWIN_ROOT_PATH$input_path"
36066    fi
36067  fi
36068
36069  # remove trailing .exe if any
36070  new_path="${new_path/%.exe/}"
36071
36072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36073
36074  # First separate the path from the arguments. This will split at the first
36075  # space.
36076  complete="$CXXCPP"
36077  path="${complete%% *}"
36078  tmp="$complete EOL"
36079  arguments="${tmp#* }"
36080
36081  # Input might be given as Windows format, start by converting to
36082  # unix format.
36083  new_path="$path"
36084
36085  windows_path="$new_path"
36086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36087    unix_path=`$CYGPATH -u "$windows_path"`
36088    new_path="$unix_path"
36089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36091    new_path="$unix_path"
36092  fi
36093
36094
36095  # Now try to locate executable using which
36096  new_path=`$WHICH "$new_path" 2> /dev/null`
36097
36098  if test "x$new_path" = x; then
36099    # Oops. Which didn't find the executable.
36100    # The splitting of arguments from the executable at a space might have been incorrect,
36101    # since paths with space are more likely in Windows. Give it another try with the whole
36102    # argument.
36103    path="$complete"
36104    arguments="EOL"
36105    new_path="$path"
36106
36107  windows_path="$new_path"
36108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36109    unix_path=`$CYGPATH -u "$windows_path"`
36110    new_path="$unix_path"
36111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36113    new_path="$unix_path"
36114  fi
36115
36116
36117    new_path=`$WHICH "$new_path" 2> /dev/null`
36118    # bat and cmd files are not always considered executable in MSYS causing which
36119    # to not find them
36120    if test "x$new_path" = x \
36121        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36122        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36123      new_path="$path"
36124
36125  windows_path="$new_path"
36126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36127    unix_path=`$CYGPATH -u "$windows_path"`
36128    new_path="$unix_path"
36129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36131    new_path="$unix_path"
36132  fi
36133
36134    fi
36135
36136    if test "x$new_path" = x; then
36137      # It's still not found. Now this is an unrecoverable error.
36138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36139$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36140      has_space=`$ECHO "$complete" | $GREP " "`
36141      if test "x$has_space" != x; then
36142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36144      fi
36145      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36146    fi
36147  fi
36148
36149  # Now new_path has a complete unix path to the binary
36150  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36151    # Keep paths in /bin as-is, but remove trailing .exe if any
36152    new_path="${new_path/%.exe/}"
36153    # Do not save /bin paths to all_fixpath_prefixes!
36154  else
36155    # Not in mixed or Windows style, start by that.
36156    new_path=`cmd //c echo $new_path`
36157
36158  input_path="$new_path"
36159  # Check if we need to convert this using DOS-style short mode. If the path
36160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36161  # take no chances and rewrite it.
36162  # Note: m4 eats our [], so we need to use [ and ] instead.
36163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36164  if test "x$has_forbidden_chars" != x; then
36165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36167  fi
36168
36169    # Output is in $new_path
36170
36171  windows_path="$new_path"
36172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36173    unix_path=`$CYGPATH -u "$windows_path"`
36174    new_path="$unix_path"
36175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36177    new_path="$unix_path"
36178  fi
36179
36180    # remove trailing .exe if any
36181    new_path="${new_path/%.exe/}"
36182
36183    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36184    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36185  fi
36186
36187    else
36188      # We're on a unix platform. Hooray! :)
36189      # First separate the path from the arguments. This will split at the first
36190      # space.
36191      complete="$CXXCPP"
36192      path="${complete%% *}"
36193      tmp="$complete EOL"
36194      arguments="${tmp#* }"
36195
36196      # Cannot rely on the command "which" here since it doesn't always work.
36197      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36198      if test -z "$is_absolute_path"; then
36199        # Path to executable is not absolute. Find it.
36200        IFS_save="$IFS"
36201        IFS=:
36202        for p in $PATH; do
36203          if test -f "$p/$path" && test -x "$p/$path"; then
36204            new_path="$p/$path"
36205            break
36206          fi
36207        done
36208        IFS="$IFS_save"
36209      else
36210        # This is an absolute path, we can use it without further modifications.
36211        new_path="$path"
36212      fi
36213
36214      if test "x$new_path" = x; then
36215        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36216$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36217        has_space=`$ECHO "$complete" | $GREP " "`
36218        if test "x$has_space" != x; then
36219          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36220$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36221        fi
36222        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36223      fi
36224    fi
36225
36226    # Now join together the path and the arguments once again
36227    if test "x$arguments" != xEOL; then
36228      new_complete="$new_path ${arguments% *}"
36229    else
36230      new_complete="$new_path"
36231    fi
36232
36233    if test "x$complete" != "x$new_complete"; then
36234      CXXCPP="$new_complete"
36235      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36236$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36237    fi
36238  fi
36239
36240
36241  #
36242  # Setup the linker (LD)
36243  #
36244  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36245    # In the Microsoft toolchain we have a separate LD command "link".
36246    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36247    # a cygwin program for something completely different.
36248    # Extract the first word of "link", so it can be a program name with args.
36249set dummy link; ac_word=$2
36250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36251$as_echo_n "checking for $ac_word... " >&6; }
36252if ${ac_cv_prog_LD+:} false; then :
36253  $as_echo_n "(cached) " >&6
36254else
36255  if test -n "$LD"; then
36256  ac_cv_prog_LD="$LD" # Let the user override the test.
36257else
36258  ac_prog_rejected=no
36259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36260for as_dir in $PATH
36261do
36262  IFS=$as_save_IFS
36263  test -z "$as_dir" && as_dir=.
36264    for ac_exec_ext in '' $ac_executable_extensions; do
36265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36266    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36267       ac_prog_rejected=yes
36268       continue
36269     fi
36270    ac_cv_prog_LD="link"
36271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36272    break 2
36273  fi
36274done
36275  done
36276IFS=$as_save_IFS
36277
36278if test $ac_prog_rejected = yes; then
36279  # We found a bogon in the path, so make sure we never use it.
36280  set dummy $ac_cv_prog_LD
36281  shift
36282  if test $# != 0; then
36283    # We chose a different compiler from the bogus one.
36284    # However, it has the same basename, so the bogon will be chosen
36285    # first if we set LD to just the basename; use the full file name.
36286    shift
36287    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36288  fi
36289fi
36290fi
36291fi
36292LD=$ac_cv_prog_LD
36293if test -n "$LD"; then
36294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36295$as_echo "$LD" >&6; }
36296else
36297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36298$as_echo "no" >&6; }
36299fi
36300
36301
36302
36303  # Only process if variable expands to non-empty
36304
36305  if test "x$LD" != x; then
36306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36307
36308  # First separate the path from the arguments. This will split at the first
36309  # space.
36310  complete="$LD"
36311  path="${complete%% *}"
36312  tmp="$complete EOL"
36313  arguments="${tmp#* }"
36314
36315  # Input might be given as Windows format, start by converting to
36316  # unix format.
36317  new_path=`$CYGPATH -u "$path"`
36318
36319  # Now try to locate executable using which
36320  new_path=`$WHICH "$new_path" 2> /dev/null`
36321  # bat and cmd files are not always considered executable in cygwin causing which
36322  # to not find them
36323  if test "x$new_path" = x \
36324      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36325      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36326    new_path=`$CYGPATH -u "$path"`
36327  fi
36328  if test "x$new_path" = x; then
36329    # Oops. Which didn't find the executable.
36330    # The splitting of arguments from the executable at a space might have been incorrect,
36331    # since paths with space are more likely in Windows. Give it another try with the whole
36332    # argument.
36333    path="$complete"
36334    arguments="EOL"
36335    new_path=`$CYGPATH -u "$path"`
36336    new_path=`$WHICH "$new_path" 2> /dev/null`
36337    # bat and cmd files are not always considered executable in cygwin causing which
36338    # to not find them
36339    if test "x$new_path" = x \
36340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36342      new_path=`$CYGPATH -u "$path"`
36343    fi
36344    if test "x$new_path" = x; then
36345      # It's still not found. Now this is an unrecoverable error.
36346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36347$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36348      has_space=`$ECHO "$complete" | $GREP " "`
36349      if test "x$has_space" != x; then
36350        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36351$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36352      fi
36353      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36354    fi
36355  fi
36356
36357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36360  # "foo.exe" is OK but "foo" is an error.
36361  #
36362  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36363  # It is also a way to make sure we got the proper file name for the real test later on.
36364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36365  if test "x$test_shortpath" = x; then
36366    # Short path failed, file does not exist as specified.
36367    # Try adding .exe or .cmd
36368    if test -f "${new_path}.exe"; then
36369      input_to_shortpath="${new_path}.exe"
36370    elif test -f "${new_path}.cmd"; then
36371      input_to_shortpath="${new_path}.cmd"
36372    else
36373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36374$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36375      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36376$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36377      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36378    fi
36379  else
36380    input_to_shortpath="$new_path"
36381  fi
36382
36383  # Call helper function which possibly converts this using DOS-style short mode.
36384  # If so, the updated path is stored in $new_path.
36385  new_path="$input_to_shortpath"
36386
36387  input_path="$input_to_shortpath"
36388  # Check if we need to convert this using DOS-style short mode. If the path
36389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36390  # take no chances and rewrite it.
36391  # Note: m4 eats our [], so we need to use [ and ] instead.
36392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36393  if test "x$has_forbidden_chars" != x; then
36394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36398      # Going to short mode and back again did indeed matter. Since short mode is
36399      # case insensitive, let's make it lowercase to improve readability.
36400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36401      # Now convert it back to Unix-style (cygpath)
36402      input_path=`$CYGPATH -u "$shortmode_path"`
36403      new_path="$input_path"
36404    fi
36405  fi
36406
36407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36408  if test "x$test_cygdrive_prefix" = x; then
36409    # As a simple fix, exclude /usr/bin since it's not a real path.
36410    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36412      # a path prefixed by /cygdrive for fixpath to work.
36413      new_path="$CYGWIN_ROOT_PATH$input_path"
36414    fi
36415  fi
36416
36417  # remove trailing .exe if any
36418  new_path="${new_path/%.exe/}"
36419
36420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36421
36422  # First separate the path from the arguments. This will split at the first
36423  # space.
36424  complete="$LD"
36425  path="${complete%% *}"
36426  tmp="$complete EOL"
36427  arguments="${tmp#* }"
36428
36429  # Input might be given as Windows format, start by converting to
36430  # unix format.
36431  new_path="$path"
36432
36433  windows_path="$new_path"
36434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36435    unix_path=`$CYGPATH -u "$windows_path"`
36436    new_path="$unix_path"
36437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36439    new_path="$unix_path"
36440  fi
36441
36442
36443  # Now try to locate executable using which
36444  new_path=`$WHICH "$new_path" 2> /dev/null`
36445
36446  if test "x$new_path" = x; then
36447    # Oops. Which didn't find the executable.
36448    # The splitting of arguments from the executable at a space might have been incorrect,
36449    # since paths with space are more likely in Windows. Give it another try with the whole
36450    # argument.
36451    path="$complete"
36452    arguments="EOL"
36453    new_path="$path"
36454
36455  windows_path="$new_path"
36456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36457    unix_path=`$CYGPATH -u "$windows_path"`
36458    new_path="$unix_path"
36459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36461    new_path="$unix_path"
36462  fi
36463
36464
36465    new_path=`$WHICH "$new_path" 2> /dev/null`
36466    # bat and cmd files are not always considered executable in MSYS causing which
36467    # to not find them
36468    if test "x$new_path" = x \
36469        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36470        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36471      new_path="$path"
36472
36473  windows_path="$new_path"
36474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36475    unix_path=`$CYGPATH -u "$windows_path"`
36476    new_path="$unix_path"
36477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36479    new_path="$unix_path"
36480  fi
36481
36482    fi
36483
36484    if test "x$new_path" = x; then
36485      # It's still not found. Now this is an unrecoverable error.
36486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36487$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36488      has_space=`$ECHO "$complete" | $GREP " "`
36489      if test "x$has_space" != x; then
36490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36492      fi
36493      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36494    fi
36495  fi
36496
36497  # Now new_path has a complete unix path to the binary
36498  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36499    # Keep paths in /bin as-is, but remove trailing .exe if any
36500    new_path="${new_path/%.exe/}"
36501    # Do not save /bin paths to all_fixpath_prefixes!
36502  else
36503    # Not in mixed or Windows style, start by that.
36504    new_path=`cmd //c echo $new_path`
36505
36506  input_path="$new_path"
36507  # Check if we need to convert this using DOS-style short mode. If the path
36508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36509  # take no chances and rewrite it.
36510  # Note: m4 eats our [], so we need to use [ and ] instead.
36511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36512  if test "x$has_forbidden_chars" != x; then
36513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36515  fi
36516
36517    # Output is in $new_path
36518
36519  windows_path="$new_path"
36520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36521    unix_path=`$CYGPATH -u "$windows_path"`
36522    new_path="$unix_path"
36523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36525    new_path="$unix_path"
36526  fi
36527
36528    # remove trailing .exe if any
36529    new_path="${new_path/%.exe/}"
36530
36531    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36532    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36533  fi
36534
36535    else
36536      # We're on a unix platform. Hooray! :)
36537      # First separate the path from the arguments. This will split at the first
36538      # space.
36539      complete="$LD"
36540      path="${complete%% *}"
36541      tmp="$complete EOL"
36542      arguments="${tmp#* }"
36543
36544      # Cannot rely on the command "which" here since it doesn't always work.
36545      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36546      if test -z "$is_absolute_path"; then
36547        # Path to executable is not absolute. Find it.
36548        IFS_save="$IFS"
36549        IFS=:
36550        for p in $PATH; do
36551          if test -f "$p/$path" && test -x "$p/$path"; then
36552            new_path="$p/$path"
36553            break
36554          fi
36555        done
36556        IFS="$IFS_save"
36557      else
36558        # This is an absolute path, we can use it without further modifications.
36559        new_path="$path"
36560      fi
36561
36562      if test "x$new_path" = x; then
36563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36564$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36565        has_space=`$ECHO "$complete" | $GREP " "`
36566        if test "x$has_space" != x; then
36567          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36568$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36569        fi
36570        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36571      fi
36572    fi
36573
36574    # Now join together the path and the arguments once again
36575    if test "x$arguments" != xEOL; then
36576      new_complete="$new_path ${arguments% *}"
36577    else
36578      new_complete="$new_path"
36579    fi
36580
36581    if test "x$complete" != "x$new_complete"; then
36582      LD="$new_complete"
36583      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36584$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36585    fi
36586  fi
36587
36588    # Verify that we indeed succeeded with this trick.
36589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36590$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36591    "$LD" --version > /dev/null
36592    if test $? -eq 0 ; then
36593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36594$as_echo "no" >&6; }
36595      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36596    else
36597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36598$as_echo "yes" >&6; }
36599    fi
36600    LDCXX="$LD"
36601  else
36602    # All other toolchains use the compiler to link.
36603    LD="$CC"
36604    LDCXX="$CXX"
36605  fi
36606
36607  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36608
36609
36610  #
36611  # Setup the assembler (AS)
36612  #
36613  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36614    # FIXME: should this really be solaris, or solstudio?
36615
36616
36617  # Publish this variable in the help.
36618
36619
36620  if [ -z "${AS+x}" ]; then
36621    # The variable is not set by user, try to locate tool using the code snippet
36622    for ac_prog in as
36623do
36624  # Extract the first word of "$ac_prog", so it can be a program name with args.
36625set dummy $ac_prog; ac_word=$2
36626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36627$as_echo_n "checking for $ac_word... " >&6; }
36628if ${ac_cv_path_AS+:} false; then :
36629  $as_echo_n "(cached) " >&6
36630else
36631  case $AS in
36632  [\\/]* | ?:[\\/]*)
36633  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36634  ;;
36635  *)
36636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36637for as_dir in $PATH
36638do
36639  IFS=$as_save_IFS
36640  test -z "$as_dir" && as_dir=.
36641    for ac_exec_ext in '' $ac_executable_extensions; do
36642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36643    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36645    break 2
36646  fi
36647done
36648  done
36649IFS=$as_save_IFS
36650
36651  ;;
36652esac
36653fi
36654AS=$ac_cv_path_AS
36655if test -n "$AS"; then
36656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36657$as_echo "$AS" >&6; }
36658else
36659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36660$as_echo "no" >&6; }
36661fi
36662
36663
36664  test -n "$AS" && break
36665done
36666
36667  else
36668    # The variable is set, but is it from the command line or the environment?
36669
36670    # Try to remove the string !AS! from our list.
36671    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36672    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36673      # If it failed, the variable was not from the command line. Ignore it,
36674      # but warn the user (except for BASH, which is always set by the calling BASH).
36675      if test "xAS" != xBASH; then
36676        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36677$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36678      fi
36679      # Try to locate tool using the code snippet
36680      for ac_prog in as
36681do
36682  # Extract the first word of "$ac_prog", so it can be a program name with args.
36683set dummy $ac_prog; 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  test -n "$AS" && break
36723done
36724
36725    else
36726      # If it succeeded, then it was overridden by the user. We will use it
36727      # for the tool.
36728
36729      # First remove it from the list of overridden variables, so we can test
36730      # for unknown variables in the end.
36731      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36732
36733      # Check if we try to supply an empty value
36734      if test "x$AS" = x; then
36735        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36736$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36737        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36738$as_echo_n "checking for AS... " >&6; }
36739        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36740$as_echo "disabled" >&6; }
36741      else
36742        # Check if the provided tool contains a complete path.
36743        tool_specified="$AS"
36744        tool_basename="${tool_specified##*/}"
36745        if test "x$tool_basename" = "x$tool_specified"; then
36746          # A command without a complete path is provided, search $PATH.
36747          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36748$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36749          # Extract the first word of "$tool_basename", so it can be a program name with args.
36750set dummy $tool_basename; ac_word=$2
36751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36752$as_echo_n "checking for $ac_word... " >&6; }
36753if ${ac_cv_path_AS+:} false; then :
36754  $as_echo_n "(cached) " >&6
36755else
36756  case $AS in
36757  [\\/]* | ?:[\\/]*)
36758  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36759  ;;
36760  *)
36761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36762for as_dir in $PATH
36763do
36764  IFS=$as_save_IFS
36765  test -z "$as_dir" && as_dir=.
36766    for ac_exec_ext in '' $ac_executable_extensions; do
36767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36768    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36770    break 2
36771  fi
36772done
36773  done
36774IFS=$as_save_IFS
36775
36776  ;;
36777esac
36778fi
36779AS=$ac_cv_path_AS
36780if test -n "$AS"; then
36781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36782$as_echo "$AS" >&6; }
36783else
36784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36785$as_echo "no" >&6; }
36786fi
36787
36788
36789          if test "x$AS" = x; then
36790            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36791          fi
36792        else
36793          # Otherwise we believe it is a complete path. Use it as it is.
36794          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36795$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36796          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36797$as_echo_n "checking for AS... " >&6; }
36798          if test ! -x "$tool_specified"; then
36799            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36800$as_echo "not found" >&6; }
36801            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36802          fi
36803          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36804$as_echo "$tool_specified" >&6; }
36805        fi
36806      fi
36807    fi
36808
36809  fi
36810
36811
36812
36813  # Only process if variable expands to non-empty
36814
36815  if test "x$AS" != x; then
36816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36817
36818  # First separate the path from the arguments. This will split at the first
36819  # space.
36820  complete="$AS"
36821  path="${complete%% *}"
36822  tmp="$complete EOL"
36823  arguments="${tmp#* }"
36824
36825  # Input might be given as Windows format, start by converting to
36826  # unix format.
36827  new_path=`$CYGPATH -u "$path"`
36828
36829  # Now try to locate executable using which
36830  new_path=`$WHICH "$new_path" 2> /dev/null`
36831  # bat and cmd files are not always considered executable in cygwin causing which
36832  # to not find them
36833  if test "x$new_path" = x \
36834      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36835      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36836    new_path=`$CYGPATH -u "$path"`
36837  fi
36838  if test "x$new_path" = x; then
36839    # Oops. Which didn't find the executable.
36840    # The splitting of arguments from the executable at a space might have been incorrect,
36841    # since paths with space are more likely in Windows. Give it another try with the whole
36842    # argument.
36843    path="$complete"
36844    arguments="EOL"
36845    new_path=`$CYGPATH -u "$path"`
36846    new_path=`$WHICH "$new_path" 2> /dev/null`
36847    # bat and cmd files are not always considered executable in cygwin causing which
36848    # to not find them
36849    if test "x$new_path" = x \
36850        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36851        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36852      new_path=`$CYGPATH -u "$path"`
36853    fi
36854    if test "x$new_path" = x; then
36855      # It's still not found. Now this is an unrecoverable error.
36856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36857$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36858      has_space=`$ECHO "$complete" | $GREP " "`
36859      if test "x$has_space" != x; then
36860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36862      fi
36863      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36864    fi
36865  fi
36866
36867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36870  # "foo.exe" is OK but "foo" is an error.
36871  #
36872  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36873  # It is also a way to make sure we got the proper file name for the real test later on.
36874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36875  if test "x$test_shortpath" = x; then
36876    # Short path failed, file does not exist as specified.
36877    # Try adding .exe or .cmd
36878    if test -f "${new_path}.exe"; then
36879      input_to_shortpath="${new_path}.exe"
36880    elif test -f "${new_path}.cmd"; then
36881      input_to_shortpath="${new_path}.cmd"
36882    else
36883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36884$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36885      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36886$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36887      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36888    fi
36889  else
36890    input_to_shortpath="$new_path"
36891  fi
36892
36893  # Call helper function which possibly converts this using DOS-style short mode.
36894  # If so, the updated path is stored in $new_path.
36895  new_path="$input_to_shortpath"
36896
36897  input_path="$input_to_shortpath"
36898  # Check if we need to convert this using DOS-style short mode. If the path
36899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36900  # take no chances and rewrite it.
36901  # Note: m4 eats our [], so we need to use [ and ] instead.
36902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36903  if test "x$has_forbidden_chars" != x; then
36904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36908      # Going to short mode and back again did indeed matter. Since short mode is
36909      # case insensitive, let's make it lowercase to improve readability.
36910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36911      # Now convert it back to Unix-style (cygpath)
36912      input_path=`$CYGPATH -u "$shortmode_path"`
36913      new_path="$input_path"
36914    fi
36915  fi
36916
36917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36918  if test "x$test_cygdrive_prefix" = x; then
36919    # As a simple fix, exclude /usr/bin since it's not a real path.
36920    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36922      # a path prefixed by /cygdrive for fixpath to work.
36923      new_path="$CYGWIN_ROOT_PATH$input_path"
36924    fi
36925  fi
36926
36927  # remove trailing .exe if any
36928  new_path="${new_path/%.exe/}"
36929
36930    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36931
36932  # First separate the path from the arguments. This will split at the first
36933  # space.
36934  complete="$AS"
36935  path="${complete%% *}"
36936  tmp="$complete EOL"
36937  arguments="${tmp#* }"
36938
36939  # Input might be given as Windows format, start by converting to
36940  # unix format.
36941  new_path="$path"
36942
36943  windows_path="$new_path"
36944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36945    unix_path=`$CYGPATH -u "$windows_path"`
36946    new_path="$unix_path"
36947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36949    new_path="$unix_path"
36950  fi
36951
36952
36953  # Now try to locate executable using which
36954  new_path=`$WHICH "$new_path" 2> /dev/null`
36955
36956  if test "x$new_path" = x; then
36957    # Oops. Which didn't find the executable.
36958    # The splitting of arguments from the executable at a space might have been incorrect,
36959    # since paths with space are more likely in Windows. Give it another try with the whole
36960    # argument.
36961    path="$complete"
36962    arguments="EOL"
36963    new_path="$path"
36964
36965  windows_path="$new_path"
36966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36967    unix_path=`$CYGPATH -u "$windows_path"`
36968    new_path="$unix_path"
36969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36971    new_path="$unix_path"
36972  fi
36973
36974
36975    new_path=`$WHICH "$new_path" 2> /dev/null`
36976    # bat and cmd files are not always considered executable in MSYS causing which
36977    # to not find them
36978    if test "x$new_path" = x \
36979        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36980        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36981      new_path="$path"
36982
36983  windows_path="$new_path"
36984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36985    unix_path=`$CYGPATH -u "$windows_path"`
36986    new_path="$unix_path"
36987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36989    new_path="$unix_path"
36990  fi
36991
36992    fi
36993
36994    if test "x$new_path" = x; then
36995      # It's still not found. Now this is an unrecoverable error.
36996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36997$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36998      has_space=`$ECHO "$complete" | $GREP " "`
36999      if test "x$has_space" != x; then
37000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37002      fi
37003      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37004    fi
37005  fi
37006
37007  # Now new_path has a complete unix path to the binary
37008  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37009    # Keep paths in /bin as-is, but remove trailing .exe if any
37010    new_path="${new_path/%.exe/}"
37011    # Do not save /bin paths to all_fixpath_prefixes!
37012  else
37013    # Not in mixed or Windows style, start by that.
37014    new_path=`cmd //c echo $new_path`
37015
37016  input_path="$new_path"
37017  # Check if we need to convert this using DOS-style short mode. If the path
37018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37019  # take no chances and rewrite it.
37020  # Note: m4 eats our [], so we need to use [ and ] instead.
37021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37022  if test "x$has_forbidden_chars" != x; then
37023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37025  fi
37026
37027    # Output is in $new_path
37028
37029  windows_path="$new_path"
37030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37031    unix_path=`$CYGPATH -u "$windows_path"`
37032    new_path="$unix_path"
37033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37035    new_path="$unix_path"
37036  fi
37037
37038    # remove trailing .exe if any
37039    new_path="${new_path/%.exe/}"
37040
37041    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37042    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37043  fi
37044
37045    else
37046      # We're on a unix platform. Hooray! :)
37047      # First separate the path from the arguments. This will split at the first
37048      # space.
37049      complete="$AS"
37050      path="${complete%% *}"
37051      tmp="$complete EOL"
37052      arguments="${tmp#* }"
37053
37054      # Cannot rely on the command "which" here since it doesn't always work.
37055      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37056      if test -z "$is_absolute_path"; then
37057        # Path to executable is not absolute. Find it.
37058        IFS_save="$IFS"
37059        IFS=:
37060        for p in $PATH; do
37061          if test -f "$p/$path" && test -x "$p/$path"; then
37062            new_path="$p/$path"
37063            break
37064          fi
37065        done
37066        IFS="$IFS_save"
37067      else
37068        # This is an absolute path, we can use it without further modifications.
37069        new_path="$path"
37070      fi
37071
37072      if test "x$new_path" = x; then
37073        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37074$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37075        has_space=`$ECHO "$complete" | $GREP " "`
37076        if test "x$has_space" != x; then
37077          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37078$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37079        fi
37080        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37081      fi
37082    fi
37083
37084    # Now join together the path and the arguments once again
37085    if test "x$arguments" != xEOL; then
37086      new_complete="$new_path ${arguments% *}"
37087    else
37088      new_complete="$new_path"
37089    fi
37090
37091    if test "x$complete" != "x$new_complete"; then
37092      AS="$new_complete"
37093      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37094$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37095    fi
37096  fi
37097
37098  else
37099    # FIXME: is this correct for microsoft?
37100    AS="$CC -c"
37101  fi
37102
37103
37104  #
37105  # Setup the archiver (AR)
37106  #
37107  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37108    # The corresponding ar tool is lib.exe (used to create static libraries)
37109    # Extract the first word of "lib", so it can be a program name with args.
37110set dummy lib; ac_word=$2
37111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37112$as_echo_n "checking for $ac_word... " >&6; }
37113if ${ac_cv_prog_AR+:} false; then :
37114  $as_echo_n "(cached) " >&6
37115else
37116  if test -n "$AR"; then
37117  ac_cv_prog_AR="$AR" # Let the user override the test.
37118else
37119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37120for as_dir in $PATH
37121do
37122  IFS=$as_save_IFS
37123  test -z "$as_dir" && as_dir=.
37124    for ac_exec_ext in '' $ac_executable_extensions; do
37125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37126    ac_cv_prog_AR="lib"
37127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37128    break 2
37129  fi
37130done
37131  done
37132IFS=$as_save_IFS
37133
37134fi
37135fi
37136AR=$ac_cv_prog_AR
37137if test -n "$AR"; then
37138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37139$as_echo "$AR" >&6; }
37140else
37141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37142$as_echo "no" >&6; }
37143fi
37144
37145
37146  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37147
37148
37149  # Publish this variable in the help.
37150
37151
37152  if [ -z "${AR+x}" ]; then
37153    # The variable is not set by user, try to locate tool using the code snippet
37154    if test -n "$ac_tool_prefix"; then
37155  for ac_prog in ar gcc-ar
37156  do
37157    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37158set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37160$as_echo_n "checking for $ac_word... " >&6; }
37161if ${ac_cv_prog_AR+:} false; then :
37162  $as_echo_n "(cached) " >&6
37163else
37164  if test -n "$AR"; then
37165  ac_cv_prog_AR="$AR" # Let the user override the test.
37166else
37167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37168for as_dir in $PATH
37169do
37170  IFS=$as_save_IFS
37171  test -z "$as_dir" && as_dir=.
37172    for ac_exec_ext in '' $ac_executable_extensions; do
37173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37174    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37176    break 2
37177  fi
37178done
37179  done
37180IFS=$as_save_IFS
37181
37182fi
37183fi
37184AR=$ac_cv_prog_AR
37185if test -n "$AR"; then
37186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37187$as_echo "$AR" >&6; }
37188else
37189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37190$as_echo "no" >&6; }
37191fi
37192
37193
37194    test -n "$AR" && break
37195  done
37196fi
37197if test -z "$AR"; then
37198  ac_ct_AR=$AR
37199  for ac_prog in ar gcc-ar
37200do
37201  # Extract the first word of "$ac_prog", so it can be a program name with args.
37202set dummy $ac_prog; ac_word=$2
37203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37204$as_echo_n "checking for $ac_word... " >&6; }
37205if ${ac_cv_prog_ac_ct_AR+:} false; then :
37206  $as_echo_n "(cached) " >&6
37207else
37208  if test -n "$ac_ct_AR"; then
37209  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37210else
37211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37212for as_dir in $PATH
37213do
37214  IFS=$as_save_IFS
37215  test -z "$as_dir" && as_dir=.
37216    for ac_exec_ext in '' $ac_executable_extensions; do
37217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37218    ac_cv_prog_ac_ct_AR="$ac_prog"
37219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37220    break 2
37221  fi
37222done
37223  done
37224IFS=$as_save_IFS
37225
37226fi
37227fi
37228ac_ct_AR=$ac_cv_prog_ac_ct_AR
37229if test -n "$ac_ct_AR"; then
37230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37231$as_echo "$ac_ct_AR" >&6; }
37232else
37233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37234$as_echo "no" >&6; }
37235fi
37236
37237
37238  test -n "$ac_ct_AR" && break
37239done
37240
37241  if test "x$ac_ct_AR" = x; then
37242    AR=""
37243  else
37244    case $cross_compiling:$ac_tool_warned in
37245yes:)
37246{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37247$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37248ac_tool_warned=yes ;;
37249esac
37250    AR=$ac_ct_AR
37251  fi
37252fi
37253
37254  else
37255    # The variable is set, but is it from the command line or the environment?
37256
37257    # Try to remove the string !AR! from our list.
37258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37260      # If it failed, the variable was not from the command line. Ignore it,
37261      # but warn the user (except for BASH, which is always set by the calling BASH).
37262      if test "xAR" != xBASH; then
37263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37264$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37265      fi
37266      # Try to locate tool using the code snippet
37267      if test -n "$ac_tool_prefix"; then
37268  for ac_prog in ar gcc-ar
37269  do
37270    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37271set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37273$as_echo_n "checking for $ac_word... " >&6; }
37274if ${ac_cv_prog_AR+:} false; then :
37275  $as_echo_n "(cached) " >&6
37276else
37277  if test -n "$AR"; then
37278  ac_cv_prog_AR="$AR" # Let the user override the test.
37279else
37280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37281for as_dir in $PATH
37282do
37283  IFS=$as_save_IFS
37284  test -z "$as_dir" && as_dir=.
37285    for ac_exec_ext in '' $ac_executable_extensions; do
37286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37287    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37289    break 2
37290  fi
37291done
37292  done
37293IFS=$as_save_IFS
37294
37295fi
37296fi
37297AR=$ac_cv_prog_AR
37298if test -n "$AR"; then
37299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37300$as_echo "$AR" >&6; }
37301else
37302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37303$as_echo "no" >&6; }
37304fi
37305
37306
37307    test -n "$AR" && break
37308  done
37309fi
37310if test -z "$AR"; then
37311  ac_ct_AR=$AR
37312  for ac_prog in ar gcc-ar
37313do
37314  # Extract the first word of "$ac_prog", so it can be a program name with args.
37315set dummy $ac_prog; ac_word=$2
37316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37317$as_echo_n "checking for $ac_word... " >&6; }
37318if ${ac_cv_prog_ac_ct_AR+:} false; then :
37319  $as_echo_n "(cached) " >&6
37320else
37321  if test -n "$ac_ct_AR"; then
37322  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37323else
37324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37325for as_dir in $PATH
37326do
37327  IFS=$as_save_IFS
37328  test -z "$as_dir" && as_dir=.
37329    for ac_exec_ext in '' $ac_executable_extensions; do
37330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37331    ac_cv_prog_ac_ct_AR="$ac_prog"
37332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37333    break 2
37334  fi
37335done
37336  done
37337IFS=$as_save_IFS
37338
37339fi
37340fi
37341ac_ct_AR=$ac_cv_prog_ac_ct_AR
37342if test -n "$ac_ct_AR"; then
37343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37344$as_echo "$ac_ct_AR" >&6; }
37345else
37346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37347$as_echo "no" >&6; }
37348fi
37349
37350
37351  test -n "$ac_ct_AR" && break
37352done
37353
37354  if test "x$ac_ct_AR" = x; then
37355    AR=""
37356  else
37357    case $cross_compiling:$ac_tool_warned in
37358yes:)
37359{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37360$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37361ac_tool_warned=yes ;;
37362esac
37363    AR=$ac_ct_AR
37364  fi
37365fi
37366
37367    else
37368      # If it succeeded, then it was overridden by the user. We will use it
37369      # for the tool.
37370
37371      # First remove it from the list of overridden variables, so we can test
37372      # for unknown variables in the end.
37373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37374
37375      # Check if we try to supply an empty value
37376      if test "x$AR" = x; then
37377        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37378$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37380$as_echo_n "checking for AR... " >&6; }
37381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37382$as_echo "disabled" >&6; }
37383      else
37384        # Check if the provided tool contains a complete path.
37385        tool_specified="$AR"
37386        tool_basename="${tool_specified##*/}"
37387        if test "x$tool_basename" = "x$tool_specified"; then
37388          # A command without a complete path is provided, search $PATH.
37389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37390$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37391          # Extract the first word of "$tool_basename", so it can be a program name with args.
37392set dummy $tool_basename; ac_word=$2
37393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37394$as_echo_n "checking for $ac_word... " >&6; }
37395if ${ac_cv_path_AR+:} false; then :
37396  $as_echo_n "(cached) " >&6
37397else
37398  case $AR in
37399  [\\/]* | ?:[\\/]*)
37400  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37401  ;;
37402  *)
37403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37404for as_dir in $PATH
37405do
37406  IFS=$as_save_IFS
37407  test -z "$as_dir" && as_dir=.
37408    for ac_exec_ext in '' $ac_executable_extensions; do
37409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37410    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37412    break 2
37413  fi
37414done
37415  done
37416IFS=$as_save_IFS
37417
37418  ;;
37419esac
37420fi
37421AR=$ac_cv_path_AR
37422if test -n "$AR"; then
37423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37424$as_echo "$AR" >&6; }
37425else
37426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37427$as_echo "no" >&6; }
37428fi
37429
37430
37431          if test "x$AR" = x; then
37432            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37433          fi
37434        else
37435          # Otherwise we believe it is a complete path. Use it as it is.
37436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37437$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37438          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37439$as_echo_n "checking for AR... " >&6; }
37440          if test ! -x "$tool_specified"; then
37441            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37442$as_echo "not found" >&6; }
37443            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37444          fi
37445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37446$as_echo "$tool_specified" >&6; }
37447        fi
37448      fi
37449    fi
37450
37451  fi
37452
37453
37454  else
37455
37456
37457  # Publish this variable in the help.
37458
37459
37460  if [ -z "${AR+x}" ]; then
37461    # The variable is not set by user, try to locate tool using the code snippet
37462    if test -n "$ac_tool_prefix"; then
37463  for ac_prog in ar
37464  do
37465    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37466set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37468$as_echo_n "checking for $ac_word... " >&6; }
37469if ${ac_cv_prog_AR+:} false; then :
37470  $as_echo_n "(cached) " >&6
37471else
37472  if test -n "$AR"; then
37473  ac_cv_prog_AR="$AR" # Let the user override the test.
37474else
37475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37476for as_dir in $PATH
37477do
37478  IFS=$as_save_IFS
37479  test -z "$as_dir" && as_dir=.
37480    for ac_exec_ext in '' $ac_executable_extensions; do
37481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37482    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37484    break 2
37485  fi
37486done
37487  done
37488IFS=$as_save_IFS
37489
37490fi
37491fi
37492AR=$ac_cv_prog_AR
37493if test -n "$AR"; then
37494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37495$as_echo "$AR" >&6; }
37496else
37497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37498$as_echo "no" >&6; }
37499fi
37500
37501
37502    test -n "$AR" && break
37503  done
37504fi
37505if test -z "$AR"; then
37506  ac_ct_AR=$AR
37507  for ac_prog in ar
37508do
37509  # Extract the first word of "$ac_prog", so it can be a program name with args.
37510set dummy $ac_prog; ac_word=$2
37511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37512$as_echo_n "checking for $ac_word... " >&6; }
37513if ${ac_cv_prog_ac_ct_AR+:} false; then :
37514  $as_echo_n "(cached) " >&6
37515else
37516  if test -n "$ac_ct_AR"; then
37517  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37518else
37519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37520for as_dir in $PATH
37521do
37522  IFS=$as_save_IFS
37523  test -z "$as_dir" && as_dir=.
37524    for ac_exec_ext in '' $ac_executable_extensions; do
37525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37526    ac_cv_prog_ac_ct_AR="$ac_prog"
37527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37528    break 2
37529  fi
37530done
37531  done
37532IFS=$as_save_IFS
37533
37534fi
37535fi
37536ac_ct_AR=$ac_cv_prog_ac_ct_AR
37537if test -n "$ac_ct_AR"; then
37538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37539$as_echo "$ac_ct_AR" >&6; }
37540else
37541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37542$as_echo "no" >&6; }
37543fi
37544
37545
37546  test -n "$ac_ct_AR" && break
37547done
37548
37549  if test "x$ac_ct_AR" = x; then
37550    AR=""
37551  else
37552    case $cross_compiling:$ac_tool_warned in
37553yes:)
37554{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37555$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37556ac_tool_warned=yes ;;
37557esac
37558    AR=$ac_ct_AR
37559  fi
37560fi
37561
37562  else
37563    # The variable is set, but is it from the command line or the environment?
37564
37565    # Try to remove the string !AR! from our list.
37566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37568      # If it failed, the variable was not from the command line. Ignore it,
37569      # but warn the user (except for BASH, which is always set by the calling BASH).
37570      if test "xAR" != xBASH; then
37571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37572$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37573      fi
37574      # Try to locate tool using the code snippet
37575      if test -n "$ac_tool_prefix"; then
37576  for ac_prog in ar
37577  do
37578    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37579set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37581$as_echo_n "checking for $ac_word... " >&6; }
37582if ${ac_cv_prog_AR+:} false; then :
37583  $as_echo_n "(cached) " >&6
37584else
37585  if test -n "$AR"; then
37586  ac_cv_prog_AR="$AR" # Let the user override the test.
37587else
37588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37589for as_dir in $PATH
37590do
37591  IFS=$as_save_IFS
37592  test -z "$as_dir" && as_dir=.
37593    for ac_exec_ext in '' $ac_executable_extensions; do
37594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37595    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37597    break 2
37598  fi
37599done
37600  done
37601IFS=$as_save_IFS
37602
37603fi
37604fi
37605AR=$ac_cv_prog_AR
37606if test -n "$AR"; then
37607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37608$as_echo "$AR" >&6; }
37609else
37610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37611$as_echo "no" >&6; }
37612fi
37613
37614
37615    test -n "$AR" && break
37616  done
37617fi
37618if test -z "$AR"; then
37619  ac_ct_AR=$AR
37620  for ac_prog in ar
37621do
37622  # Extract the first word of "$ac_prog", so it can be a program name with args.
37623set dummy $ac_prog; ac_word=$2
37624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37625$as_echo_n "checking for $ac_word... " >&6; }
37626if ${ac_cv_prog_ac_ct_AR+:} false; then :
37627  $as_echo_n "(cached) " >&6
37628else
37629  if test -n "$ac_ct_AR"; then
37630  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37631else
37632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37633for as_dir in $PATH
37634do
37635  IFS=$as_save_IFS
37636  test -z "$as_dir" && as_dir=.
37637    for ac_exec_ext in '' $ac_executable_extensions; do
37638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37639    ac_cv_prog_ac_ct_AR="$ac_prog"
37640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37641    break 2
37642  fi
37643done
37644  done
37645IFS=$as_save_IFS
37646
37647fi
37648fi
37649ac_ct_AR=$ac_cv_prog_ac_ct_AR
37650if test -n "$ac_ct_AR"; then
37651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37652$as_echo "$ac_ct_AR" >&6; }
37653else
37654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37655$as_echo "no" >&6; }
37656fi
37657
37658
37659  test -n "$ac_ct_AR" && break
37660done
37661
37662  if test "x$ac_ct_AR" = x; then
37663    AR=""
37664  else
37665    case $cross_compiling:$ac_tool_warned in
37666yes:)
37667{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37668$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37669ac_tool_warned=yes ;;
37670esac
37671    AR=$ac_ct_AR
37672  fi
37673fi
37674
37675    else
37676      # If it succeeded, then it was overridden by the user. We will use it
37677      # for the tool.
37678
37679      # First remove it from the list of overridden variables, so we can test
37680      # for unknown variables in the end.
37681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37682
37683      # Check if we try to supply an empty value
37684      if test "x$AR" = x; then
37685        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37686$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37688$as_echo_n "checking for AR... " >&6; }
37689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37690$as_echo "disabled" >&6; }
37691      else
37692        # Check if the provided tool contains a complete path.
37693        tool_specified="$AR"
37694        tool_basename="${tool_specified##*/}"
37695        if test "x$tool_basename" = "x$tool_specified"; then
37696          # A command without a complete path is provided, search $PATH.
37697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37698$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37699          # Extract the first word of "$tool_basename", so it can be a program name with args.
37700set dummy $tool_basename; ac_word=$2
37701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37702$as_echo_n "checking for $ac_word... " >&6; }
37703if ${ac_cv_path_AR+:} false; then :
37704  $as_echo_n "(cached) " >&6
37705else
37706  case $AR in
37707  [\\/]* | ?:[\\/]*)
37708  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37709  ;;
37710  *)
37711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37712for as_dir in $PATH
37713do
37714  IFS=$as_save_IFS
37715  test -z "$as_dir" && as_dir=.
37716    for ac_exec_ext in '' $ac_executable_extensions; do
37717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37718    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37720    break 2
37721  fi
37722done
37723  done
37724IFS=$as_save_IFS
37725
37726  ;;
37727esac
37728fi
37729AR=$ac_cv_path_AR
37730if test -n "$AR"; then
37731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37732$as_echo "$AR" >&6; }
37733else
37734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37735$as_echo "no" >&6; }
37736fi
37737
37738
37739          if test "x$AR" = x; then
37740            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37741          fi
37742        else
37743          # Otherwise we believe it is a complete path. Use it as it is.
37744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37745$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37746          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37747$as_echo_n "checking for AR... " >&6; }
37748          if test ! -x "$tool_specified"; then
37749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37750$as_echo "not found" >&6; }
37751            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37752          fi
37753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37754$as_echo "$tool_specified" >&6; }
37755        fi
37756      fi
37757    fi
37758
37759  fi
37760
37761
37762  fi
37763
37764  # Only process if variable expands to non-empty
37765
37766  if test "x$AR" != x; then
37767    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37768
37769  # First separate the path from the arguments. This will split at the first
37770  # space.
37771  complete="$AR"
37772  path="${complete%% *}"
37773  tmp="$complete EOL"
37774  arguments="${tmp#* }"
37775
37776  # Input might be given as Windows format, start by converting to
37777  # unix format.
37778  new_path=`$CYGPATH -u "$path"`
37779
37780  # Now try to locate executable using which
37781  new_path=`$WHICH "$new_path" 2> /dev/null`
37782  # bat and cmd files are not always considered executable in cygwin causing which
37783  # to not find them
37784  if test "x$new_path" = x \
37785      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37786      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37787    new_path=`$CYGPATH -u "$path"`
37788  fi
37789  if test "x$new_path" = x; then
37790    # Oops. Which didn't find the executable.
37791    # The splitting of arguments from the executable at a space might have been incorrect,
37792    # since paths with space are more likely in Windows. Give it another try with the whole
37793    # argument.
37794    path="$complete"
37795    arguments="EOL"
37796    new_path=`$CYGPATH -u "$path"`
37797    new_path=`$WHICH "$new_path" 2> /dev/null`
37798    # bat and cmd files are not always considered executable in cygwin causing which
37799    # to not find them
37800    if test "x$new_path" = x \
37801        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37802        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37803      new_path=`$CYGPATH -u "$path"`
37804    fi
37805    if test "x$new_path" = x; then
37806      # It's still not found. Now this is an unrecoverable error.
37807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37808$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37809      has_space=`$ECHO "$complete" | $GREP " "`
37810      if test "x$has_space" != x; then
37811        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37812$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37813      fi
37814      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37815    fi
37816  fi
37817
37818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37821  # "foo.exe" is OK but "foo" is an error.
37822  #
37823  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37824  # It is also a way to make sure we got the proper file name for the real test later on.
37825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37826  if test "x$test_shortpath" = x; then
37827    # Short path failed, file does not exist as specified.
37828    # Try adding .exe or .cmd
37829    if test -f "${new_path}.exe"; then
37830      input_to_shortpath="${new_path}.exe"
37831    elif test -f "${new_path}.cmd"; then
37832      input_to_shortpath="${new_path}.cmd"
37833    else
37834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37835$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37836      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37837$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37838      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37839    fi
37840  else
37841    input_to_shortpath="$new_path"
37842  fi
37843
37844  # Call helper function which possibly converts this using DOS-style short mode.
37845  # If so, the updated path is stored in $new_path.
37846  new_path="$input_to_shortpath"
37847
37848  input_path="$input_to_shortpath"
37849  # Check if we need to convert this using DOS-style short mode. If the path
37850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37851  # take no chances and rewrite it.
37852  # Note: m4 eats our [], so we need to use [ and ] instead.
37853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37854  if test "x$has_forbidden_chars" != x; then
37855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37859      # Going to short mode and back again did indeed matter. Since short mode is
37860      # case insensitive, let's make it lowercase to improve readability.
37861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37862      # Now convert it back to Unix-style (cygpath)
37863      input_path=`$CYGPATH -u "$shortmode_path"`
37864      new_path="$input_path"
37865    fi
37866  fi
37867
37868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37869  if test "x$test_cygdrive_prefix" = x; then
37870    # As a simple fix, exclude /usr/bin since it's not a real path.
37871    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37873      # a path prefixed by /cygdrive for fixpath to work.
37874      new_path="$CYGWIN_ROOT_PATH$input_path"
37875    fi
37876  fi
37877
37878  # remove trailing .exe if any
37879  new_path="${new_path/%.exe/}"
37880
37881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37882
37883  # First separate the path from the arguments. This will split at the first
37884  # space.
37885  complete="$AR"
37886  path="${complete%% *}"
37887  tmp="$complete EOL"
37888  arguments="${tmp#* }"
37889
37890  # Input might be given as Windows format, start by converting to
37891  # unix format.
37892  new_path="$path"
37893
37894  windows_path="$new_path"
37895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37896    unix_path=`$CYGPATH -u "$windows_path"`
37897    new_path="$unix_path"
37898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37900    new_path="$unix_path"
37901  fi
37902
37903
37904  # Now try to locate executable using which
37905  new_path=`$WHICH "$new_path" 2> /dev/null`
37906
37907  if test "x$new_path" = x; then
37908    # Oops. Which didn't find the executable.
37909    # The splitting of arguments from the executable at a space might have been incorrect,
37910    # since paths with space are more likely in Windows. Give it another try with the whole
37911    # argument.
37912    path="$complete"
37913    arguments="EOL"
37914    new_path="$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
37926    new_path=`$WHICH "$new_path" 2> /dev/null`
37927    # bat and cmd files are not always considered executable in MSYS causing which
37928    # to not find them
37929    if test "x$new_path" = x \
37930        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37931        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37932      new_path="$path"
37933
37934  windows_path="$new_path"
37935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37936    unix_path=`$CYGPATH -u "$windows_path"`
37937    new_path="$unix_path"
37938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37940    new_path="$unix_path"
37941  fi
37942
37943    fi
37944
37945    if test "x$new_path" = x; then
37946      # It's still not found. Now this is an unrecoverable error.
37947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37948$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37949      has_space=`$ECHO "$complete" | $GREP " "`
37950      if test "x$has_space" != x; then
37951        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37952$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37953      fi
37954      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37955    fi
37956  fi
37957
37958  # Now new_path has a complete unix path to the binary
37959  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37960    # Keep paths in /bin as-is, but remove trailing .exe if any
37961    new_path="${new_path/%.exe/}"
37962    # Do not save /bin paths to all_fixpath_prefixes!
37963  else
37964    # Not in mixed or Windows style, start by that.
37965    new_path=`cmd //c echo $new_path`
37966
37967  input_path="$new_path"
37968  # Check if we need to convert this using DOS-style short mode. If the path
37969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37970  # take no chances and rewrite it.
37971  # Note: m4 eats our [], so we need to use [ and ] instead.
37972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37973  if test "x$has_forbidden_chars" != x; then
37974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37976  fi
37977
37978    # Output is in $new_path
37979
37980  windows_path="$new_path"
37981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37982    unix_path=`$CYGPATH -u "$windows_path"`
37983    new_path="$unix_path"
37984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37986    new_path="$unix_path"
37987  fi
37988
37989    # remove trailing .exe if any
37990    new_path="${new_path/%.exe/}"
37991
37992    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37993    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37994  fi
37995
37996    else
37997      # We're on a unix platform. Hooray! :)
37998      # First separate the path from the arguments. This will split at the first
37999      # space.
38000      complete="$AR"
38001      path="${complete%% *}"
38002      tmp="$complete EOL"
38003      arguments="${tmp#* }"
38004
38005      # Cannot rely on the command "which" here since it doesn't always work.
38006      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38007      if test -z "$is_absolute_path"; then
38008        # Path to executable is not absolute. Find it.
38009        IFS_save="$IFS"
38010        IFS=:
38011        for p in $PATH; do
38012          if test -f "$p/$path" && test -x "$p/$path"; then
38013            new_path="$p/$path"
38014            break
38015          fi
38016        done
38017        IFS="$IFS_save"
38018      else
38019        # This is an absolute path, we can use it without further modifications.
38020        new_path="$path"
38021      fi
38022
38023      if test "x$new_path" = x; then
38024        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38025$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38026        has_space=`$ECHO "$complete" | $GREP " "`
38027        if test "x$has_space" != x; then
38028          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38029$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38030        fi
38031        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38032      fi
38033    fi
38034
38035    # Now join together the path and the arguments once again
38036    if test "x$arguments" != xEOL; then
38037      new_complete="$new_path ${arguments% *}"
38038    else
38039      new_complete="$new_path"
38040    fi
38041
38042    if test "x$complete" != "x$new_complete"; then
38043      AR="$new_complete"
38044      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38045$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38046    fi
38047  fi
38048
38049
38050
38051  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38052
38053
38054  # Publish this variable in the help.
38055
38056
38057  if [ -z "${LIPO+x}" ]; then
38058    # The variable is not set by user, try to locate tool using the code snippet
38059    for ac_prog in lipo
38060do
38061  # Extract the first word of "$ac_prog", so it can be a program name with args.
38062set dummy $ac_prog; ac_word=$2
38063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38064$as_echo_n "checking for $ac_word... " >&6; }
38065if ${ac_cv_path_LIPO+:} false; then :
38066  $as_echo_n "(cached) " >&6
38067else
38068  case $LIPO in
38069  [\\/]* | ?:[\\/]*)
38070  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38071  ;;
38072  *)
38073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38074for as_dir in $PATH
38075do
38076  IFS=$as_save_IFS
38077  test -z "$as_dir" && as_dir=.
38078    for ac_exec_ext in '' $ac_executable_extensions; do
38079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38080    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38082    break 2
38083  fi
38084done
38085  done
38086IFS=$as_save_IFS
38087
38088  ;;
38089esac
38090fi
38091LIPO=$ac_cv_path_LIPO
38092if test -n "$LIPO"; then
38093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38094$as_echo "$LIPO" >&6; }
38095else
38096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38097$as_echo "no" >&6; }
38098fi
38099
38100
38101  test -n "$LIPO" && break
38102done
38103
38104  else
38105    # The variable is set, but is it from the command line or the environment?
38106
38107    # Try to remove the string !LIPO! from our list.
38108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38110      # If it failed, the variable was not from the command line. Ignore it,
38111      # but warn the user (except for BASH, which is always set by the calling BASH).
38112      if test "xLIPO" != xBASH; then
38113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38114$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38115      fi
38116      # Try to locate tool using the code snippet
38117      for ac_prog in lipo
38118do
38119  # Extract the first word of "$ac_prog", so it can be a program name with args.
38120set dummy $ac_prog; ac_word=$2
38121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38122$as_echo_n "checking for $ac_word... " >&6; }
38123if ${ac_cv_path_LIPO+:} false; then :
38124  $as_echo_n "(cached) " >&6
38125else
38126  case $LIPO in
38127  [\\/]* | ?:[\\/]*)
38128  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38129  ;;
38130  *)
38131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38132for as_dir in $PATH
38133do
38134  IFS=$as_save_IFS
38135  test -z "$as_dir" && as_dir=.
38136    for ac_exec_ext in '' $ac_executable_extensions; do
38137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38138    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38140    break 2
38141  fi
38142done
38143  done
38144IFS=$as_save_IFS
38145
38146  ;;
38147esac
38148fi
38149LIPO=$ac_cv_path_LIPO
38150if test -n "$LIPO"; then
38151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38152$as_echo "$LIPO" >&6; }
38153else
38154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38155$as_echo "no" >&6; }
38156fi
38157
38158
38159  test -n "$LIPO" && break
38160done
38161
38162    else
38163      # If it succeeded, then it was overridden by the user. We will use it
38164      # for the tool.
38165
38166      # First remove it from the list of overridden variables, so we can test
38167      # for unknown variables in the end.
38168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38169
38170      # Check if we try to supply an empty value
38171      if test "x$LIPO" = x; then
38172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38173$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38175$as_echo_n "checking for LIPO... " >&6; }
38176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38177$as_echo "disabled" >&6; }
38178      else
38179        # Check if the provided tool contains a complete path.
38180        tool_specified="$LIPO"
38181        tool_basename="${tool_specified##*/}"
38182        if test "x$tool_basename" = "x$tool_specified"; then
38183          # A command without a complete path is provided, search $PATH.
38184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38185$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38186          # Extract the first word of "$tool_basename", so it can be a program name with args.
38187set dummy $tool_basename; ac_word=$2
38188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38189$as_echo_n "checking for $ac_word... " >&6; }
38190if ${ac_cv_path_LIPO+:} false; then :
38191  $as_echo_n "(cached) " >&6
38192else
38193  case $LIPO in
38194  [\\/]* | ?:[\\/]*)
38195  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38196  ;;
38197  *)
38198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38199for as_dir in $PATH
38200do
38201  IFS=$as_save_IFS
38202  test -z "$as_dir" && as_dir=.
38203    for ac_exec_ext in '' $ac_executable_extensions; do
38204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38205    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38207    break 2
38208  fi
38209done
38210  done
38211IFS=$as_save_IFS
38212
38213  ;;
38214esac
38215fi
38216LIPO=$ac_cv_path_LIPO
38217if test -n "$LIPO"; then
38218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38219$as_echo "$LIPO" >&6; }
38220else
38221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38222$as_echo "no" >&6; }
38223fi
38224
38225
38226          if test "x$LIPO" = x; then
38227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38228          fi
38229        else
38230          # Otherwise we believe it is a complete path. Use it as it is.
38231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38232$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38234$as_echo_n "checking for LIPO... " >&6; }
38235          if test ! -x "$tool_specified"; then
38236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38237$as_echo "not found" >&6; }
38238            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38239          fi
38240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38241$as_echo "$tool_specified" >&6; }
38242        fi
38243      fi
38244    fi
38245
38246  fi
38247
38248
38249
38250  # Only process if variable expands to non-empty
38251
38252  if test "x$LIPO" != x; then
38253    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38254
38255  # First separate the path from the arguments. This will split at the first
38256  # space.
38257  complete="$LIPO"
38258  path="${complete%% *}"
38259  tmp="$complete EOL"
38260  arguments="${tmp#* }"
38261
38262  # Input might be given as Windows format, start by converting to
38263  # unix format.
38264  new_path=`$CYGPATH -u "$path"`
38265
38266  # Now try to locate executable using which
38267  new_path=`$WHICH "$new_path" 2> /dev/null`
38268  # bat and cmd files are not always considered executable in cygwin causing which
38269  # to not find them
38270  if test "x$new_path" = x \
38271      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38272      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38273    new_path=`$CYGPATH -u "$path"`
38274  fi
38275  if test "x$new_path" = x; then
38276    # Oops. Which didn't find the executable.
38277    # The splitting of arguments from the executable at a space might have been incorrect,
38278    # since paths with space are more likely in Windows. Give it another try with the whole
38279    # argument.
38280    path="$complete"
38281    arguments="EOL"
38282    new_path=`$CYGPATH -u "$path"`
38283    new_path=`$WHICH "$new_path" 2> /dev/null`
38284    # bat and cmd files are not always considered executable in cygwin causing which
38285    # to not find them
38286    if test "x$new_path" = x \
38287        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38288        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38289      new_path=`$CYGPATH -u "$path"`
38290    fi
38291    if test "x$new_path" = x; then
38292      # It's still not found. Now this is an unrecoverable error.
38293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38294$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38295      has_space=`$ECHO "$complete" | $GREP " "`
38296      if test "x$has_space" != x; then
38297        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38298$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38299      fi
38300      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38301    fi
38302  fi
38303
38304  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38305  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38306  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38307  # "foo.exe" is OK but "foo" is an error.
38308  #
38309  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38310  # It is also a way to make sure we got the proper file name for the real test later on.
38311  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38312  if test "x$test_shortpath" = x; then
38313    # Short path failed, file does not exist as specified.
38314    # Try adding .exe or .cmd
38315    if test -f "${new_path}.exe"; then
38316      input_to_shortpath="${new_path}.exe"
38317    elif test -f "${new_path}.cmd"; then
38318      input_to_shortpath="${new_path}.cmd"
38319    else
38320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38321$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38322      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38323$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38324      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38325    fi
38326  else
38327    input_to_shortpath="$new_path"
38328  fi
38329
38330  # Call helper function which possibly converts this using DOS-style short mode.
38331  # If so, the updated path is stored in $new_path.
38332  new_path="$input_to_shortpath"
38333
38334  input_path="$input_to_shortpath"
38335  # Check if we need to convert this using DOS-style short mode. If the path
38336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38337  # take no chances and rewrite it.
38338  # Note: m4 eats our [], so we need to use [ and ] instead.
38339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38340  if test "x$has_forbidden_chars" != x; then
38341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38345      # Going to short mode and back again did indeed matter. Since short mode is
38346      # case insensitive, let's make it lowercase to improve readability.
38347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38348      # Now convert it back to Unix-style (cygpath)
38349      input_path=`$CYGPATH -u "$shortmode_path"`
38350      new_path="$input_path"
38351    fi
38352  fi
38353
38354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38355  if test "x$test_cygdrive_prefix" = x; then
38356    # As a simple fix, exclude /usr/bin since it's not a real path.
38357    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38359      # a path prefixed by /cygdrive for fixpath to work.
38360      new_path="$CYGWIN_ROOT_PATH$input_path"
38361    fi
38362  fi
38363
38364  # remove trailing .exe if any
38365  new_path="${new_path/%.exe/}"
38366
38367    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38368
38369  # First separate the path from the arguments. This will split at the first
38370  # space.
38371  complete="$LIPO"
38372  path="${complete%% *}"
38373  tmp="$complete EOL"
38374  arguments="${tmp#* }"
38375
38376  # Input might be given as Windows format, start by converting to
38377  # unix format.
38378  new_path="$path"
38379
38380  windows_path="$new_path"
38381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38382    unix_path=`$CYGPATH -u "$windows_path"`
38383    new_path="$unix_path"
38384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38386    new_path="$unix_path"
38387  fi
38388
38389
38390  # Now try to locate executable using which
38391  new_path=`$WHICH "$new_path" 2> /dev/null`
38392
38393  if test "x$new_path" = x; then
38394    # Oops. Which didn't find the executable.
38395    # The splitting of arguments from the executable at a space might have been incorrect,
38396    # since paths with space are more likely in Windows. Give it another try with the whole
38397    # argument.
38398    path="$complete"
38399    arguments="EOL"
38400    new_path="$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
38412    new_path=`$WHICH "$new_path" 2> /dev/null`
38413    # bat and cmd files are not always considered executable in MSYS causing which
38414    # to not find them
38415    if test "x$new_path" = x \
38416        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38417        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38418      new_path="$path"
38419
38420  windows_path="$new_path"
38421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38422    unix_path=`$CYGPATH -u "$windows_path"`
38423    new_path="$unix_path"
38424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38426    new_path="$unix_path"
38427  fi
38428
38429    fi
38430
38431    if test "x$new_path" = x; then
38432      # It's still not found. Now this is an unrecoverable error.
38433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38434$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38435      has_space=`$ECHO "$complete" | $GREP " "`
38436      if test "x$has_space" != x; then
38437        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38438$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38439      fi
38440      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38441    fi
38442  fi
38443
38444  # Now new_path has a complete unix path to the binary
38445  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38446    # Keep paths in /bin as-is, but remove trailing .exe if any
38447    new_path="${new_path/%.exe/}"
38448    # Do not save /bin paths to all_fixpath_prefixes!
38449  else
38450    # Not in mixed or Windows style, start by that.
38451    new_path=`cmd //c echo $new_path`
38452
38453  input_path="$new_path"
38454  # Check if we need to convert this using DOS-style short mode. If the path
38455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38456  # take no chances and rewrite it.
38457  # Note: m4 eats our [], so we need to use [ and ] instead.
38458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38459  if test "x$has_forbidden_chars" != x; then
38460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38462  fi
38463
38464    # Output is in $new_path
38465
38466  windows_path="$new_path"
38467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38468    unix_path=`$CYGPATH -u "$windows_path"`
38469    new_path="$unix_path"
38470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38472    new_path="$unix_path"
38473  fi
38474
38475    # remove trailing .exe if any
38476    new_path="${new_path/%.exe/}"
38477
38478    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38479    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38480  fi
38481
38482    else
38483      # We're on a unix platform. Hooray! :)
38484      # First separate the path from the arguments. This will split at the first
38485      # space.
38486      complete="$LIPO"
38487      path="${complete%% *}"
38488      tmp="$complete EOL"
38489      arguments="${tmp#* }"
38490
38491      # Cannot rely on the command "which" here since it doesn't always work.
38492      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38493      if test -z "$is_absolute_path"; then
38494        # Path to executable is not absolute. Find it.
38495        IFS_save="$IFS"
38496        IFS=:
38497        for p in $PATH; do
38498          if test -f "$p/$path" && test -x "$p/$path"; then
38499            new_path="$p/$path"
38500            break
38501          fi
38502        done
38503        IFS="$IFS_save"
38504      else
38505        # This is an absolute path, we can use it without further modifications.
38506        new_path="$path"
38507      fi
38508
38509      if test "x$new_path" = x; then
38510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38511$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38512        has_space=`$ECHO "$complete" | $GREP " "`
38513        if test "x$has_space" != x; then
38514          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38515$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38516        fi
38517        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38518      fi
38519    fi
38520
38521    # Now join together the path and the arguments once again
38522    if test "x$arguments" != xEOL; then
38523      new_complete="$new_path ${arguments% *}"
38524    else
38525      new_complete="$new_path"
38526    fi
38527
38528    if test "x$complete" != "x$new_complete"; then
38529      LIPO="$new_complete"
38530      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38531$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38532    fi
38533  fi
38534
38535  fi
38536
38537  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38538    # Extract the first word of "mt", so it can be a program name with args.
38539set dummy mt; ac_word=$2
38540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38541$as_echo_n "checking for $ac_word... " >&6; }
38542if ${ac_cv_prog_MT+:} false; then :
38543  $as_echo_n "(cached) " >&6
38544else
38545  if test -n "$MT"; then
38546  ac_cv_prog_MT="$MT" # Let the user override the test.
38547else
38548  ac_prog_rejected=no
38549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38550for as_dir in $PATH
38551do
38552  IFS=$as_save_IFS
38553  test -z "$as_dir" && as_dir=.
38554    for ac_exec_ext in '' $ac_executable_extensions; do
38555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38556    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38557       ac_prog_rejected=yes
38558       continue
38559     fi
38560    ac_cv_prog_MT="mt"
38561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38562    break 2
38563  fi
38564done
38565  done
38566IFS=$as_save_IFS
38567
38568if test $ac_prog_rejected = yes; then
38569  # We found a bogon in the path, so make sure we never use it.
38570  set dummy $ac_cv_prog_MT
38571  shift
38572  if test $# != 0; then
38573    # We chose a different compiler from the bogus one.
38574    # However, it has the same basename, so the bogon will be chosen
38575    # first if we set MT to just the basename; use the full file name.
38576    shift
38577    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38578  fi
38579fi
38580fi
38581fi
38582MT=$ac_cv_prog_MT
38583if test -n "$MT"; then
38584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38585$as_echo "$MT" >&6; }
38586else
38587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38588$as_echo "no" >&6; }
38589fi
38590
38591
38592
38593  # Only process if variable expands to non-empty
38594
38595  if test "x$MT" != x; then
38596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38597
38598  # First separate the path from the arguments. This will split at the first
38599  # space.
38600  complete="$MT"
38601  path="${complete%% *}"
38602  tmp="$complete EOL"
38603  arguments="${tmp#* }"
38604
38605  # Input might be given as Windows format, start by converting to
38606  # unix format.
38607  new_path=`$CYGPATH -u "$path"`
38608
38609  # Now try to locate executable using which
38610  new_path=`$WHICH "$new_path" 2> /dev/null`
38611  # bat and cmd files are not always considered executable in cygwin causing which
38612  # to not find them
38613  if test "x$new_path" = x \
38614      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38615      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38616    new_path=`$CYGPATH -u "$path"`
38617  fi
38618  if test "x$new_path" = x; then
38619    # Oops. Which didn't find the executable.
38620    # The splitting of arguments from the executable at a space might have been incorrect,
38621    # since paths with space are more likely in Windows. Give it another try with the whole
38622    # argument.
38623    path="$complete"
38624    arguments="EOL"
38625    new_path=`$CYGPATH -u "$path"`
38626    new_path=`$WHICH "$new_path" 2> /dev/null`
38627    # bat and cmd files are not always considered executable in cygwin causing which
38628    # to not find them
38629    if test "x$new_path" = x \
38630        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38631        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38632      new_path=`$CYGPATH -u "$path"`
38633    fi
38634    if test "x$new_path" = x; then
38635      # It's still not found. Now this is an unrecoverable error.
38636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38637$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38638      has_space=`$ECHO "$complete" | $GREP " "`
38639      if test "x$has_space" != x; then
38640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38642      fi
38643      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38644    fi
38645  fi
38646
38647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38650  # "foo.exe" is OK but "foo" is an error.
38651  #
38652  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38653  # It is also a way to make sure we got the proper file name for the real test later on.
38654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38655  if test "x$test_shortpath" = x; then
38656    # Short path failed, file does not exist as specified.
38657    # Try adding .exe or .cmd
38658    if test -f "${new_path}.exe"; then
38659      input_to_shortpath="${new_path}.exe"
38660    elif test -f "${new_path}.cmd"; then
38661      input_to_shortpath="${new_path}.cmd"
38662    else
38663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38664$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38665      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38666$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38667      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38668    fi
38669  else
38670    input_to_shortpath="$new_path"
38671  fi
38672
38673  # Call helper function which possibly converts this using DOS-style short mode.
38674  # If so, the updated path is stored in $new_path.
38675  new_path="$input_to_shortpath"
38676
38677  input_path="$input_to_shortpath"
38678  # Check if we need to convert this using DOS-style short mode. If the path
38679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38680  # take no chances and rewrite it.
38681  # Note: m4 eats our [], so we need to use [ and ] instead.
38682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38683  if test "x$has_forbidden_chars" != x; then
38684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38688      # Going to short mode and back again did indeed matter. Since short mode is
38689      # case insensitive, let's make it lowercase to improve readability.
38690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38691      # Now convert it back to Unix-style (cygpath)
38692      input_path=`$CYGPATH -u "$shortmode_path"`
38693      new_path="$input_path"
38694    fi
38695  fi
38696
38697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38698  if test "x$test_cygdrive_prefix" = x; then
38699    # As a simple fix, exclude /usr/bin since it's not a real path.
38700    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38702      # a path prefixed by /cygdrive for fixpath to work.
38703      new_path="$CYGWIN_ROOT_PATH$input_path"
38704    fi
38705  fi
38706
38707  # remove trailing .exe if any
38708  new_path="${new_path/%.exe/}"
38709
38710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38711
38712  # First separate the path from the arguments. This will split at the first
38713  # space.
38714  complete="$MT"
38715  path="${complete%% *}"
38716  tmp="$complete EOL"
38717  arguments="${tmp#* }"
38718
38719  # Input might be given as Windows format, start by converting to
38720  # unix format.
38721  new_path="$path"
38722
38723  windows_path="$new_path"
38724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38725    unix_path=`$CYGPATH -u "$windows_path"`
38726    new_path="$unix_path"
38727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38729    new_path="$unix_path"
38730  fi
38731
38732
38733  # Now try to locate executable using which
38734  new_path=`$WHICH "$new_path" 2> /dev/null`
38735
38736  if test "x$new_path" = x; then
38737    # Oops. Which didn't find the executable.
38738    # The splitting of arguments from the executable at a space might have been incorrect,
38739    # since paths with space are more likely in Windows. Give it another try with the whole
38740    # argument.
38741    path="$complete"
38742    arguments="EOL"
38743    new_path="$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
38755    new_path=`$WHICH "$new_path" 2> /dev/null`
38756    # bat and cmd files are not always considered executable in MSYS causing which
38757    # to not find them
38758    if test "x$new_path" = x \
38759        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38760        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38761      new_path="$path"
38762
38763  windows_path="$new_path"
38764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38765    unix_path=`$CYGPATH -u "$windows_path"`
38766    new_path="$unix_path"
38767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38769    new_path="$unix_path"
38770  fi
38771
38772    fi
38773
38774    if test "x$new_path" = x; then
38775      # It's still not found. Now this is an unrecoverable error.
38776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38777$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38778      has_space=`$ECHO "$complete" | $GREP " "`
38779      if test "x$has_space" != x; then
38780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38782      fi
38783      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38784    fi
38785  fi
38786
38787  # Now new_path has a complete unix path to the binary
38788  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38789    # Keep paths in /bin as-is, but remove trailing .exe if any
38790    new_path="${new_path/%.exe/}"
38791    # Do not save /bin paths to all_fixpath_prefixes!
38792  else
38793    # Not in mixed or Windows style, start by that.
38794    new_path=`cmd //c echo $new_path`
38795
38796  input_path="$new_path"
38797  # Check if we need to convert this using DOS-style short mode. If the path
38798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38799  # take no chances and rewrite it.
38800  # Note: m4 eats our [], so we need to use [ and ] instead.
38801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38802  if test "x$has_forbidden_chars" != x; then
38803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38805  fi
38806
38807    # Output is in $new_path
38808
38809  windows_path="$new_path"
38810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38811    unix_path=`$CYGPATH -u "$windows_path"`
38812    new_path="$unix_path"
38813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38815    new_path="$unix_path"
38816  fi
38817
38818    # remove trailing .exe if any
38819    new_path="${new_path/%.exe/}"
38820
38821    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38822    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38823  fi
38824
38825    else
38826      # We're on a unix platform. Hooray! :)
38827      # First separate the path from the arguments. This will split at the first
38828      # space.
38829      complete="$MT"
38830      path="${complete%% *}"
38831      tmp="$complete EOL"
38832      arguments="${tmp#* }"
38833
38834      # Cannot rely on the command "which" here since it doesn't always work.
38835      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38836      if test -z "$is_absolute_path"; then
38837        # Path to executable is not absolute. Find it.
38838        IFS_save="$IFS"
38839        IFS=:
38840        for p in $PATH; do
38841          if test -f "$p/$path" && test -x "$p/$path"; then
38842            new_path="$p/$path"
38843            break
38844          fi
38845        done
38846        IFS="$IFS_save"
38847      else
38848        # This is an absolute path, we can use it without further modifications.
38849        new_path="$path"
38850      fi
38851
38852      if test "x$new_path" = x; then
38853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38854$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38855        has_space=`$ECHO "$complete" | $GREP " "`
38856        if test "x$has_space" != x; then
38857          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38858$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38859        fi
38860        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38861      fi
38862    fi
38863
38864    # Now join together the path and the arguments once again
38865    if test "x$arguments" != xEOL; then
38866      new_complete="$new_path ${arguments% *}"
38867    else
38868      new_complete="$new_path"
38869    fi
38870
38871    if test "x$complete" != "x$new_complete"; then
38872      MT="$new_complete"
38873      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38874$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38875    fi
38876  fi
38877
38878    # Setup the resource compiler (RC)
38879    # Extract the first word of "rc", so it can be a program name with args.
38880set dummy rc; ac_word=$2
38881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38882$as_echo_n "checking for $ac_word... " >&6; }
38883if ${ac_cv_prog_RC+:} false; then :
38884  $as_echo_n "(cached) " >&6
38885else
38886  if test -n "$RC"; then
38887  ac_cv_prog_RC="$RC" # Let the user override the test.
38888else
38889  ac_prog_rejected=no
38890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38891for as_dir in $PATH
38892do
38893  IFS=$as_save_IFS
38894  test -z "$as_dir" && as_dir=.
38895    for ac_exec_ext in '' $ac_executable_extensions; do
38896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38897    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38898       ac_prog_rejected=yes
38899       continue
38900     fi
38901    ac_cv_prog_RC="rc"
38902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38903    break 2
38904  fi
38905done
38906  done
38907IFS=$as_save_IFS
38908
38909if test $ac_prog_rejected = yes; then
38910  # We found a bogon in the path, so make sure we never use it.
38911  set dummy $ac_cv_prog_RC
38912  shift
38913  if test $# != 0; then
38914    # We chose a different compiler from the bogus one.
38915    # However, it has the same basename, so the bogon will be chosen
38916    # first if we set RC to just the basename; use the full file name.
38917    shift
38918    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38919  fi
38920fi
38921fi
38922fi
38923RC=$ac_cv_prog_RC
38924if test -n "$RC"; then
38925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38926$as_echo "$RC" >&6; }
38927else
38928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38929$as_echo "no" >&6; }
38930fi
38931
38932
38933
38934  # Only process if variable expands to non-empty
38935
38936  if test "x$RC" != x; then
38937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38938
38939  # First separate the path from the arguments. This will split at the first
38940  # space.
38941  complete="$RC"
38942  path="${complete%% *}"
38943  tmp="$complete EOL"
38944  arguments="${tmp#* }"
38945
38946  # Input might be given as Windows format, start by converting to
38947  # unix format.
38948  new_path=`$CYGPATH -u "$path"`
38949
38950  # Now try to locate executable using which
38951  new_path=`$WHICH "$new_path" 2> /dev/null`
38952  # bat and cmd files are not always considered executable in cygwin causing which
38953  # to not find them
38954  if test "x$new_path" = x \
38955      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38956      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38957    new_path=`$CYGPATH -u "$path"`
38958  fi
38959  if test "x$new_path" = x; then
38960    # Oops. Which didn't find the executable.
38961    # The splitting of arguments from the executable at a space might have been incorrect,
38962    # since paths with space are more likely in Windows. Give it another try with the whole
38963    # argument.
38964    path="$complete"
38965    arguments="EOL"
38966    new_path=`$CYGPATH -u "$path"`
38967    new_path=`$WHICH "$new_path" 2> /dev/null`
38968    # bat and cmd files are not always considered executable in cygwin causing which
38969    # to not find them
38970    if test "x$new_path" = x \
38971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38973      new_path=`$CYGPATH -u "$path"`
38974    fi
38975    if test "x$new_path" = x; then
38976      # It's still not found. Now this is an unrecoverable error.
38977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38978$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38979      has_space=`$ECHO "$complete" | $GREP " "`
38980      if test "x$has_space" != x; then
38981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38983      fi
38984      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38985    fi
38986  fi
38987
38988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38991  # "foo.exe" is OK but "foo" is an error.
38992  #
38993  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38994  # It is also a way to make sure we got the proper file name for the real test later on.
38995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38996  if test "x$test_shortpath" = x; then
38997    # Short path failed, file does not exist as specified.
38998    # Try adding .exe or .cmd
38999    if test -f "${new_path}.exe"; then
39000      input_to_shortpath="${new_path}.exe"
39001    elif test -f "${new_path}.cmd"; then
39002      input_to_shortpath="${new_path}.cmd"
39003    else
39004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39005$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39006      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39007$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39008      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39009    fi
39010  else
39011    input_to_shortpath="$new_path"
39012  fi
39013
39014  # Call helper function which possibly converts this using DOS-style short mode.
39015  # If so, the updated path is stored in $new_path.
39016  new_path="$input_to_shortpath"
39017
39018  input_path="$input_to_shortpath"
39019  # Check if we need to convert this using DOS-style short mode. If the path
39020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39021  # take no chances and rewrite it.
39022  # Note: m4 eats our [], so we need to use [ and ] instead.
39023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39024  if test "x$has_forbidden_chars" != x; then
39025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39029      # Going to short mode and back again did indeed matter. Since short mode is
39030      # case insensitive, let's make it lowercase to improve readability.
39031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39032      # Now convert it back to Unix-style (cygpath)
39033      input_path=`$CYGPATH -u "$shortmode_path"`
39034      new_path="$input_path"
39035    fi
39036  fi
39037
39038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39039  if test "x$test_cygdrive_prefix" = x; then
39040    # As a simple fix, exclude /usr/bin since it's not a real path.
39041    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39043      # a path prefixed by /cygdrive for fixpath to work.
39044      new_path="$CYGWIN_ROOT_PATH$input_path"
39045    fi
39046  fi
39047
39048  # remove trailing .exe if any
39049  new_path="${new_path/%.exe/}"
39050
39051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39052
39053  # First separate the path from the arguments. This will split at the first
39054  # space.
39055  complete="$RC"
39056  path="${complete%% *}"
39057  tmp="$complete EOL"
39058  arguments="${tmp#* }"
39059
39060  # Input might be given as Windows format, start by converting to
39061  # unix format.
39062  new_path="$path"
39063
39064  windows_path="$new_path"
39065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39066    unix_path=`$CYGPATH -u "$windows_path"`
39067    new_path="$unix_path"
39068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39070    new_path="$unix_path"
39071  fi
39072
39073
39074  # Now try to locate executable using which
39075  new_path=`$WHICH "$new_path" 2> /dev/null`
39076
39077  if test "x$new_path" = x; then
39078    # Oops. Which didn't find the executable.
39079    # The splitting of arguments from the executable at a space might have been incorrect,
39080    # since paths with space are more likely in Windows. Give it another try with the whole
39081    # argument.
39082    path="$complete"
39083    arguments="EOL"
39084    new_path="$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
39096    new_path=`$WHICH "$new_path" 2> /dev/null`
39097    # bat and cmd files are not always considered executable in MSYS causing which
39098    # to not find them
39099    if test "x$new_path" = x \
39100        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39101        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39102      new_path="$path"
39103
39104  windows_path="$new_path"
39105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39106    unix_path=`$CYGPATH -u "$windows_path"`
39107    new_path="$unix_path"
39108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39110    new_path="$unix_path"
39111  fi
39112
39113    fi
39114
39115    if test "x$new_path" = x; then
39116      # It's still not found. Now this is an unrecoverable error.
39117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39118$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39119      has_space=`$ECHO "$complete" | $GREP " "`
39120      if test "x$has_space" != x; then
39121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39123      fi
39124      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39125    fi
39126  fi
39127
39128  # Now new_path has a complete unix path to the binary
39129  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39130    # Keep paths in /bin as-is, but remove trailing .exe if any
39131    new_path="${new_path/%.exe/}"
39132    # Do not save /bin paths to all_fixpath_prefixes!
39133  else
39134    # Not in mixed or Windows style, start by that.
39135    new_path=`cmd //c echo $new_path`
39136
39137  input_path="$new_path"
39138  # Check if we need to convert this using DOS-style short mode. If the path
39139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39140  # take no chances and rewrite it.
39141  # Note: m4 eats our [], so we need to use [ and ] instead.
39142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39143  if test "x$has_forbidden_chars" != x; then
39144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39146  fi
39147
39148    # Output is in $new_path
39149
39150  windows_path="$new_path"
39151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39152    unix_path=`$CYGPATH -u "$windows_path"`
39153    new_path="$unix_path"
39154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39156    new_path="$unix_path"
39157  fi
39158
39159    # remove trailing .exe if any
39160    new_path="${new_path/%.exe/}"
39161
39162    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39163    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39164  fi
39165
39166    else
39167      # We're on a unix platform. Hooray! :)
39168      # First separate the path from the arguments. This will split at the first
39169      # space.
39170      complete="$RC"
39171      path="${complete%% *}"
39172      tmp="$complete EOL"
39173      arguments="${tmp#* }"
39174
39175      # Cannot rely on the command "which" here since it doesn't always work.
39176      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39177      if test -z "$is_absolute_path"; then
39178        # Path to executable is not absolute. Find it.
39179        IFS_save="$IFS"
39180        IFS=:
39181        for p in $PATH; do
39182          if test -f "$p/$path" && test -x "$p/$path"; then
39183            new_path="$p/$path"
39184            break
39185          fi
39186        done
39187        IFS="$IFS_save"
39188      else
39189        # This is an absolute path, we can use it without further modifications.
39190        new_path="$path"
39191      fi
39192
39193      if test "x$new_path" = x; then
39194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39195$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39196        has_space=`$ECHO "$complete" | $GREP " "`
39197        if test "x$has_space" != x; then
39198          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39199$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39200        fi
39201        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39202      fi
39203    fi
39204
39205    # Now join together the path and the arguments once again
39206    if test "x$arguments" != xEOL; then
39207      new_complete="$new_path ${arguments% *}"
39208    else
39209      new_complete="$new_path"
39210    fi
39211
39212    if test "x$complete" != "x$new_complete"; then
39213      RC="$new_complete"
39214      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39215$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39216    fi
39217  fi
39218
39219    # Extract the first word of "dumpbin", so it can be a program name with args.
39220set dummy dumpbin; ac_word=$2
39221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39222$as_echo_n "checking for $ac_word... " >&6; }
39223if ${ac_cv_prog_DUMPBIN+:} false; then :
39224  $as_echo_n "(cached) " >&6
39225else
39226  if test -n "$DUMPBIN"; then
39227  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39228else
39229as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39230for as_dir in $PATH
39231do
39232  IFS=$as_save_IFS
39233  test -z "$as_dir" && as_dir=.
39234    for ac_exec_ext in '' $ac_executable_extensions; do
39235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39236    ac_cv_prog_DUMPBIN="dumpbin"
39237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39238    break 2
39239  fi
39240done
39241  done
39242IFS=$as_save_IFS
39243
39244fi
39245fi
39246DUMPBIN=$ac_cv_prog_DUMPBIN
39247if test -n "$DUMPBIN"; then
39248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39249$as_echo "$DUMPBIN" >&6; }
39250else
39251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39252$as_echo "no" >&6; }
39253fi
39254
39255
39256
39257  # Only process if variable expands to non-empty
39258
39259  if test "x$DUMPBIN" != x; then
39260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39261
39262  # First separate the path from the arguments. This will split at the first
39263  # space.
39264  complete="$DUMPBIN"
39265  path="${complete%% *}"
39266  tmp="$complete EOL"
39267  arguments="${tmp#* }"
39268
39269  # Input might be given as Windows format, start by converting to
39270  # unix format.
39271  new_path=`$CYGPATH -u "$path"`
39272
39273  # Now try to locate executable using which
39274  new_path=`$WHICH "$new_path" 2> /dev/null`
39275  # bat and cmd files are not always considered executable in cygwin causing which
39276  # to not find them
39277  if test "x$new_path" = x \
39278      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39279      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39280    new_path=`$CYGPATH -u "$path"`
39281  fi
39282  if test "x$new_path" = x; then
39283    # Oops. Which didn't find the executable.
39284    # The splitting of arguments from the executable at a space might have been incorrect,
39285    # since paths with space are more likely in Windows. Give it another try with the whole
39286    # argument.
39287    path="$complete"
39288    arguments="EOL"
39289    new_path=`$CYGPATH -u "$path"`
39290    new_path=`$WHICH "$new_path" 2> /dev/null`
39291    # bat and cmd files are not always considered executable in cygwin causing which
39292    # to not find them
39293    if test "x$new_path" = x \
39294        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39295        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39296      new_path=`$CYGPATH -u "$path"`
39297    fi
39298    if test "x$new_path" = x; then
39299      # It's still not found. Now this is an unrecoverable error.
39300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39301$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39302      has_space=`$ECHO "$complete" | $GREP " "`
39303      if test "x$has_space" != x; then
39304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39306      fi
39307      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39308    fi
39309  fi
39310
39311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39314  # "foo.exe" is OK but "foo" is an error.
39315  #
39316  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39317  # It is also a way to make sure we got the proper file name for the real test later on.
39318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39319  if test "x$test_shortpath" = x; then
39320    # Short path failed, file does not exist as specified.
39321    # Try adding .exe or .cmd
39322    if test -f "${new_path}.exe"; then
39323      input_to_shortpath="${new_path}.exe"
39324    elif test -f "${new_path}.cmd"; then
39325      input_to_shortpath="${new_path}.cmd"
39326    else
39327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39328$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39329      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39330$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39331      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39332    fi
39333  else
39334    input_to_shortpath="$new_path"
39335  fi
39336
39337  # Call helper function which possibly converts this using DOS-style short mode.
39338  # If so, the updated path is stored in $new_path.
39339  new_path="$input_to_shortpath"
39340
39341  input_path="$input_to_shortpath"
39342  # Check if we need to convert this using DOS-style short mode. If the path
39343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39344  # take no chances and rewrite it.
39345  # Note: m4 eats our [], so we need to use [ and ] instead.
39346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39347  if test "x$has_forbidden_chars" != x; then
39348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39352      # Going to short mode and back again did indeed matter. Since short mode is
39353      # case insensitive, let's make it lowercase to improve readability.
39354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39355      # Now convert it back to Unix-style (cygpath)
39356      input_path=`$CYGPATH -u "$shortmode_path"`
39357      new_path="$input_path"
39358    fi
39359  fi
39360
39361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39362  if test "x$test_cygdrive_prefix" = x; then
39363    # As a simple fix, exclude /usr/bin since it's not a real path.
39364    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39366      # a path prefixed by /cygdrive for fixpath to work.
39367      new_path="$CYGWIN_ROOT_PATH$input_path"
39368    fi
39369  fi
39370
39371  # remove trailing .exe if any
39372  new_path="${new_path/%.exe/}"
39373
39374    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39375
39376  # First separate the path from the arguments. This will split at the first
39377  # space.
39378  complete="$DUMPBIN"
39379  path="${complete%% *}"
39380  tmp="$complete EOL"
39381  arguments="${tmp#* }"
39382
39383  # Input might be given as Windows format, start by converting to
39384  # unix format.
39385  new_path="$path"
39386
39387  windows_path="$new_path"
39388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39389    unix_path=`$CYGPATH -u "$windows_path"`
39390    new_path="$unix_path"
39391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39393    new_path="$unix_path"
39394  fi
39395
39396
39397  # Now try to locate executable using which
39398  new_path=`$WHICH "$new_path" 2> /dev/null`
39399
39400  if test "x$new_path" = x; then
39401    # Oops. Which didn't find the executable.
39402    # The splitting of arguments from the executable at a space might have been incorrect,
39403    # since paths with space are more likely in Windows. Give it another try with the whole
39404    # argument.
39405    path="$complete"
39406    arguments="EOL"
39407    new_path="$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
39419    new_path=`$WHICH "$new_path" 2> /dev/null`
39420    # bat and cmd files are not always considered executable in MSYS causing which
39421    # to not find them
39422    if test "x$new_path" = x \
39423        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39424        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39425      new_path="$path"
39426
39427  windows_path="$new_path"
39428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39429    unix_path=`$CYGPATH -u "$windows_path"`
39430    new_path="$unix_path"
39431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39433    new_path="$unix_path"
39434  fi
39435
39436    fi
39437
39438    if test "x$new_path" = x; then
39439      # It's still not found. Now this is an unrecoverable error.
39440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39441$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39442      has_space=`$ECHO "$complete" | $GREP " "`
39443      if test "x$has_space" != x; then
39444        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39445$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39446      fi
39447      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39448    fi
39449  fi
39450
39451  # Now new_path has a complete unix path to the binary
39452  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39453    # Keep paths in /bin as-is, but remove trailing .exe if any
39454    new_path="${new_path/%.exe/}"
39455    # Do not save /bin paths to all_fixpath_prefixes!
39456  else
39457    # Not in mixed or Windows style, start by that.
39458    new_path=`cmd //c echo $new_path`
39459
39460  input_path="$new_path"
39461  # Check if we need to convert this using DOS-style short mode. If the path
39462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39463  # take no chances and rewrite it.
39464  # Note: m4 eats our [], so we need to use [ and ] instead.
39465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39466  if test "x$has_forbidden_chars" != x; then
39467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39469  fi
39470
39471    # Output is in $new_path
39472
39473  windows_path="$new_path"
39474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39475    unix_path=`$CYGPATH -u "$windows_path"`
39476    new_path="$unix_path"
39477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39479    new_path="$unix_path"
39480  fi
39481
39482    # remove trailing .exe if any
39483    new_path="${new_path/%.exe/}"
39484
39485    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39486    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39487  fi
39488
39489    else
39490      # We're on a unix platform. Hooray! :)
39491      # First separate the path from the arguments. This will split at the first
39492      # space.
39493      complete="$DUMPBIN"
39494      path="${complete%% *}"
39495      tmp="$complete EOL"
39496      arguments="${tmp#* }"
39497
39498      # Cannot rely on the command "which" here since it doesn't always work.
39499      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39500      if test -z "$is_absolute_path"; then
39501        # Path to executable is not absolute. Find it.
39502        IFS_save="$IFS"
39503        IFS=:
39504        for p in $PATH; do
39505          if test -f "$p/$path" && test -x "$p/$path"; then
39506            new_path="$p/$path"
39507            break
39508          fi
39509        done
39510        IFS="$IFS_save"
39511      else
39512        # This is an absolute path, we can use it without further modifications.
39513        new_path="$path"
39514      fi
39515
39516      if test "x$new_path" = x; then
39517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39518$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39519        has_space=`$ECHO "$complete" | $GREP " "`
39520        if test "x$has_space" != x; then
39521          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39522$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39523        fi
39524        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39525      fi
39526    fi
39527
39528    # Now join together the path and the arguments once again
39529    if test "x$arguments" != xEOL; then
39530      new_complete="$new_path ${arguments% *}"
39531    else
39532      new_complete="$new_path"
39533    fi
39534
39535    if test "x$complete" != "x$new_complete"; then
39536      DUMPBIN="$new_complete"
39537      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39538$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39539    fi
39540  fi
39541
39542    # We need to check for 'msbuild.exe' because at the place where we expect to
39543    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39544    # won't find the 'msbuild.exe' executable in that case (and the
39545    # 'ac_executable_extensions' is unusable due to performance reasons).
39546    # Notice that we intentionally don't fix up the path to MSBUILD because we
39547    # will call it in a DOS shell during freetype detection on Windows (see
39548    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39549    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39550set dummy msbuild.exe; ac_word=$2
39551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39552$as_echo_n "checking for $ac_word... " >&6; }
39553if ${ac_cv_prog_MSBUILD+:} false; then :
39554  $as_echo_n "(cached) " >&6
39555else
39556  if test -n "$MSBUILD"; then
39557  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39558else
39559as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39560for as_dir in $PATH
39561do
39562  IFS=$as_save_IFS
39563  test -z "$as_dir" && as_dir=.
39564    for ac_exec_ext in '' $ac_executable_extensions; do
39565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39566    ac_cv_prog_MSBUILD="msbuild.exe"
39567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39568    break 2
39569  fi
39570done
39571  done
39572IFS=$as_save_IFS
39573
39574fi
39575fi
39576MSBUILD=$ac_cv_prog_MSBUILD
39577if test -n "$MSBUILD"; then
39578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39579$as_echo "$MSBUILD" >&6; }
39580else
39581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39582$as_echo "no" >&6; }
39583fi
39584
39585
39586  fi
39587
39588  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39589
39590
39591  # Publish this variable in the help.
39592
39593
39594  if [ -z "${STRIP+x}" ]; then
39595    # The variable is not set by user, try to locate tool using the code snippet
39596    for ac_prog in strip
39597do
39598  # Extract the first word of "$ac_prog", so it can be a program name with args.
39599set dummy $ac_prog; ac_word=$2
39600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39601$as_echo_n "checking for $ac_word... " >&6; }
39602if ${ac_cv_path_STRIP+:} false; then :
39603  $as_echo_n "(cached) " >&6
39604else
39605  case $STRIP in
39606  [\\/]* | ?:[\\/]*)
39607  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39608  ;;
39609  *)
39610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39611for as_dir in $PATH
39612do
39613  IFS=$as_save_IFS
39614  test -z "$as_dir" && as_dir=.
39615    for ac_exec_ext in '' $ac_executable_extensions; do
39616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39617    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39619    break 2
39620  fi
39621done
39622  done
39623IFS=$as_save_IFS
39624
39625  ;;
39626esac
39627fi
39628STRIP=$ac_cv_path_STRIP
39629if test -n "$STRIP"; then
39630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39631$as_echo "$STRIP" >&6; }
39632else
39633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39634$as_echo "no" >&6; }
39635fi
39636
39637
39638  test -n "$STRIP" && break
39639done
39640
39641  else
39642    # The variable is set, but is it from the command line or the environment?
39643
39644    # Try to remove the string !STRIP! from our list.
39645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39647      # If it failed, the variable was not from the command line. Ignore it,
39648      # but warn the user (except for BASH, which is always set by the calling BASH).
39649      if test "xSTRIP" != xBASH; then
39650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39651$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39652      fi
39653      # Try to locate tool using the code snippet
39654      for ac_prog in strip
39655do
39656  # Extract the first word of "$ac_prog", so it can be a program name with args.
39657set dummy $ac_prog; ac_word=$2
39658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39659$as_echo_n "checking for $ac_word... " >&6; }
39660if ${ac_cv_path_STRIP+:} false; then :
39661  $as_echo_n "(cached) " >&6
39662else
39663  case $STRIP in
39664  [\\/]* | ?:[\\/]*)
39665  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39666  ;;
39667  *)
39668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39669for as_dir in $PATH
39670do
39671  IFS=$as_save_IFS
39672  test -z "$as_dir" && as_dir=.
39673    for ac_exec_ext in '' $ac_executable_extensions; do
39674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39675    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39677    break 2
39678  fi
39679done
39680  done
39681IFS=$as_save_IFS
39682
39683  ;;
39684esac
39685fi
39686STRIP=$ac_cv_path_STRIP
39687if test -n "$STRIP"; then
39688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39689$as_echo "$STRIP" >&6; }
39690else
39691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39692$as_echo "no" >&6; }
39693fi
39694
39695
39696  test -n "$STRIP" && break
39697done
39698
39699    else
39700      # If it succeeded, then it was overridden by the user. We will use it
39701      # for the tool.
39702
39703      # First remove it from the list of overridden variables, so we can test
39704      # for unknown variables in the end.
39705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39706
39707      # Check if we try to supply an empty value
39708      if test "x$STRIP" = x; then
39709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39710$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39712$as_echo_n "checking for STRIP... " >&6; }
39713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39714$as_echo "disabled" >&6; }
39715      else
39716        # Check if the provided tool contains a complete path.
39717        tool_specified="$STRIP"
39718        tool_basename="${tool_specified##*/}"
39719        if test "x$tool_basename" = "x$tool_specified"; then
39720          # A command without a complete path is provided, search $PATH.
39721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39722$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39723          # Extract the first word of "$tool_basename", so it can be a program name with args.
39724set dummy $tool_basename; ac_word=$2
39725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39726$as_echo_n "checking for $ac_word... " >&6; }
39727if ${ac_cv_path_STRIP+:} false; then :
39728  $as_echo_n "(cached) " >&6
39729else
39730  case $STRIP in
39731  [\\/]* | ?:[\\/]*)
39732  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39733  ;;
39734  *)
39735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39736for as_dir in $PATH
39737do
39738  IFS=$as_save_IFS
39739  test -z "$as_dir" && as_dir=.
39740    for ac_exec_ext in '' $ac_executable_extensions; do
39741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39742    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39744    break 2
39745  fi
39746done
39747  done
39748IFS=$as_save_IFS
39749
39750  ;;
39751esac
39752fi
39753STRIP=$ac_cv_path_STRIP
39754if test -n "$STRIP"; then
39755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39756$as_echo "$STRIP" >&6; }
39757else
39758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39759$as_echo "no" >&6; }
39760fi
39761
39762
39763          if test "x$STRIP" = x; then
39764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39765          fi
39766        else
39767          # Otherwise we believe it is a complete path. Use it as it is.
39768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39769$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39771$as_echo_n "checking for STRIP... " >&6; }
39772          if test ! -x "$tool_specified"; then
39773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39774$as_echo "not found" >&6; }
39775            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39776          fi
39777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39778$as_echo "$tool_specified" >&6; }
39779        fi
39780      fi
39781    fi
39782
39783  fi
39784
39785
39786
39787  # Only process if variable expands to non-empty
39788
39789  if test "x$STRIP" != x; then
39790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39791
39792  # First separate the path from the arguments. This will split at the first
39793  # space.
39794  complete="$STRIP"
39795  path="${complete%% *}"
39796  tmp="$complete EOL"
39797  arguments="${tmp#* }"
39798
39799  # Input might be given as Windows format, start by converting to
39800  # unix format.
39801  new_path=`$CYGPATH -u "$path"`
39802
39803  # Now try to locate executable using which
39804  new_path=`$WHICH "$new_path" 2> /dev/null`
39805  # bat and cmd files are not always considered executable in cygwin causing which
39806  # to not find them
39807  if test "x$new_path" = x \
39808      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39809      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39810    new_path=`$CYGPATH -u "$path"`
39811  fi
39812  if test "x$new_path" = x; then
39813    # Oops. Which didn't find the executable.
39814    # The splitting of arguments from the executable at a space might have been incorrect,
39815    # since paths with space are more likely in Windows. Give it another try with the whole
39816    # argument.
39817    path="$complete"
39818    arguments="EOL"
39819    new_path=`$CYGPATH -u "$path"`
39820    new_path=`$WHICH "$new_path" 2> /dev/null`
39821    # bat and cmd files are not always considered executable in cygwin causing which
39822    # to not find them
39823    if test "x$new_path" = x \
39824        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39825        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39826      new_path=`$CYGPATH -u "$path"`
39827    fi
39828    if test "x$new_path" = x; then
39829      # It's still not found. Now this is an unrecoverable error.
39830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39831$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39832      has_space=`$ECHO "$complete" | $GREP " "`
39833      if test "x$has_space" != x; then
39834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39836      fi
39837      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39838    fi
39839  fi
39840
39841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39844  # "foo.exe" is OK but "foo" is an error.
39845  #
39846  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39847  # It is also a way to make sure we got the proper file name for the real test later on.
39848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39849  if test "x$test_shortpath" = x; then
39850    # Short path failed, file does not exist as specified.
39851    # Try adding .exe or .cmd
39852    if test -f "${new_path}.exe"; then
39853      input_to_shortpath="${new_path}.exe"
39854    elif test -f "${new_path}.cmd"; then
39855      input_to_shortpath="${new_path}.cmd"
39856    else
39857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39858$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39861      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39862    fi
39863  else
39864    input_to_shortpath="$new_path"
39865  fi
39866
39867  # Call helper function which possibly converts this using DOS-style short mode.
39868  # If so, the updated path is stored in $new_path.
39869  new_path="$input_to_shortpath"
39870
39871  input_path="$input_to_shortpath"
39872  # Check if we need to convert this using DOS-style short mode. If the path
39873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39874  # take no chances and rewrite it.
39875  # Note: m4 eats our [], so we need to use [ and ] instead.
39876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39877  if test "x$has_forbidden_chars" != x; then
39878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39882      # Going to short mode and back again did indeed matter. Since short mode is
39883      # case insensitive, let's make it lowercase to improve readability.
39884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39885      # Now convert it back to Unix-style (cygpath)
39886      input_path=`$CYGPATH -u "$shortmode_path"`
39887      new_path="$input_path"
39888    fi
39889  fi
39890
39891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39892  if test "x$test_cygdrive_prefix" = x; then
39893    # As a simple fix, exclude /usr/bin since it's not a real path.
39894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39896      # a path prefixed by /cygdrive for fixpath to work.
39897      new_path="$CYGWIN_ROOT_PATH$input_path"
39898    fi
39899  fi
39900
39901  # remove trailing .exe if any
39902  new_path="${new_path/%.exe/}"
39903
39904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39905
39906  # First separate the path from the arguments. This will split at the first
39907  # space.
39908  complete="$STRIP"
39909  path="${complete%% *}"
39910  tmp="$complete EOL"
39911  arguments="${tmp#* }"
39912
39913  # Input might be given as Windows format, start by converting to
39914  # unix format.
39915  new_path="$path"
39916
39917  windows_path="$new_path"
39918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39919    unix_path=`$CYGPATH -u "$windows_path"`
39920    new_path="$unix_path"
39921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39923    new_path="$unix_path"
39924  fi
39925
39926
39927  # Now try to locate executable using which
39928  new_path=`$WHICH "$new_path" 2> /dev/null`
39929
39930  if test "x$new_path" = x; then
39931    # Oops. Which didn't find the executable.
39932    # The splitting of arguments from the executable at a space might have been incorrect,
39933    # since paths with space are more likely in Windows. Give it another try with the whole
39934    # argument.
39935    path="$complete"
39936    arguments="EOL"
39937    new_path="$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
39949    new_path=`$WHICH "$new_path" 2> /dev/null`
39950    # bat and cmd files are not always considered executable in MSYS causing which
39951    # to not find them
39952    if test "x$new_path" = x \
39953        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39954        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39955      new_path="$path"
39956
39957  windows_path="$new_path"
39958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39959    unix_path=`$CYGPATH -u "$windows_path"`
39960    new_path="$unix_path"
39961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39963    new_path="$unix_path"
39964  fi
39965
39966    fi
39967
39968    if test "x$new_path" = x; then
39969      # It's still not found. Now this is an unrecoverable error.
39970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39971$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39972      has_space=`$ECHO "$complete" | $GREP " "`
39973      if test "x$has_space" != x; then
39974        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39975$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39976      fi
39977      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39978    fi
39979  fi
39980
39981  # Now new_path has a complete unix path to the binary
39982  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39983    # Keep paths in /bin as-is, but remove trailing .exe if any
39984    new_path="${new_path/%.exe/}"
39985    # Do not save /bin paths to all_fixpath_prefixes!
39986  else
39987    # Not in mixed or Windows style, start by that.
39988    new_path=`cmd //c echo $new_path`
39989
39990  input_path="$new_path"
39991  # Check if we need to convert this using DOS-style short mode. If the path
39992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39993  # take no chances and rewrite it.
39994  # Note: m4 eats our [], so we need to use [ and ] instead.
39995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39996  if test "x$has_forbidden_chars" != x; then
39997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39999  fi
40000
40001    # Output is in $new_path
40002
40003  windows_path="$new_path"
40004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40005    unix_path=`$CYGPATH -u "$windows_path"`
40006    new_path="$unix_path"
40007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40009    new_path="$unix_path"
40010  fi
40011
40012    # remove trailing .exe if any
40013    new_path="${new_path/%.exe/}"
40014
40015    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40016    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40017  fi
40018
40019    else
40020      # We're on a unix platform. Hooray! :)
40021      # First separate the path from the arguments. This will split at the first
40022      # space.
40023      complete="$STRIP"
40024      path="${complete%% *}"
40025      tmp="$complete EOL"
40026      arguments="${tmp#* }"
40027
40028      # Cannot rely on the command "which" here since it doesn't always work.
40029      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40030      if test -z "$is_absolute_path"; then
40031        # Path to executable is not absolute. Find it.
40032        IFS_save="$IFS"
40033        IFS=:
40034        for p in $PATH; do
40035          if test -f "$p/$path" && test -x "$p/$path"; then
40036            new_path="$p/$path"
40037            break
40038          fi
40039        done
40040        IFS="$IFS_save"
40041      else
40042        # This is an absolute path, we can use it without further modifications.
40043        new_path="$path"
40044      fi
40045
40046      if test "x$new_path" = x; then
40047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40048$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40049        has_space=`$ECHO "$complete" | $GREP " "`
40050        if test "x$has_space" != x; then
40051          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40052$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40053        fi
40054        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40055      fi
40056    fi
40057
40058    # Now join together the path and the arguments once again
40059    if test "x$arguments" != xEOL; then
40060      new_complete="$new_path ${arguments% *}"
40061    else
40062      new_complete="$new_path"
40063    fi
40064
40065    if test "x$complete" != "x$new_complete"; then
40066      STRIP="$new_complete"
40067      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40068$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40069    fi
40070  fi
40071
40072
40073
40074  # Publish this variable in the help.
40075
40076
40077  if [ -z "${NM+x}" ]; then
40078    # The variable is not set by user, try to locate tool using the code snippet
40079    for ac_prog in nm
40080do
40081  # Extract the first word of "$ac_prog", so it can be a program name with args.
40082set dummy $ac_prog; ac_word=$2
40083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40084$as_echo_n "checking for $ac_word... " >&6; }
40085if ${ac_cv_path_NM+:} false; then :
40086  $as_echo_n "(cached) " >&6
40087else
40088  case $NM in
40089  [\\/]* | ?:[\\/]*)
40090  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40091  ;;
40092  *)
40093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40094for as_dir in $PATH
40095do
40096  IFS=$as_save_IFS
40097  test -z "$as_dir" && as_dir=.
40098    for ac_exec_ext in '' $ac_executable_extensions; do
40099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40100    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40102    break 2
40103  fi
40104done
40105  done
40106IFS=$as_save_IFS
40107
40108  ;;
40109esac
40110fi
40111NM=$ac_cv_path_NM
40112if test -n "$NM"; then
40113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40114$as_echo "$NM" >&6; }
40115else
40116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40117$as_echo "no" >&6; }
40118fi
40119
40120
40121  test -n "$NM" && break
40122done
40123
40124  else
40125    # The variable is set, but is it from the command line or the environment?
40126
40127    # Try to remove the string !NM! from our list.
40128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40130      # If it failed, the variable was not from the command line. Ignore it,
40131      # but warn the user (except for BASH, which is always set by the calling BASH).
40132      if test "xNM" != xBASH; then
40133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40134$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40135      fi
40136      # Try to locate tool using the code snippet
40137      for ac_prog in nm
40138do
40139  # Extract the first word of "$ac_prog", so it can be a program name with args.
40140set dummy $ac_prog; ac_word=$2
40141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40142$as_echo_n "checking for $ac_word... " >&6; }
40143if ${ac_cv_path_NM+:} false; then :
40144  $as_echo_n "(cached) " >&6
40145else
40146  case $NM in
40147  [\\/]* | ?:[\\/]*)
40148  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40149  ;;
40150  *)
40151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40152for as_dir in $PATH
40153do
40154  IFS=$as_save_IFS
40155  test -z "$as_dir" && as_dir=.
40156    for ac_exec_ext in '' $ac_executable_extensions; do
40157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40158    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40160    break 2
40161  fi
40162done
40163  done
40164IFS=$as_save_IFS
40165
40166  ;;
40167esac
40168fi
40169NM=$ac_cv_path_NM
40170if test -n "$NM"; then
40171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40172$as_echo "$NM" >&6; }
40173else
40174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40175$as_echo "no" >&6; }
40176fi
40177
40178
40179  test -n "$NM" && break
40180done
40181
40182    else
40183      # If it succeeded, then it was overridden by the user. We will use it
40184      # for the tool.
40185
40186      # First remove it from the list of overridden variables, so we can test
40187      # for unknown variables in the end.
40188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40189
40190      # Check if we try to supply an empty value
40191      if test "x$NM" = x; then
40192        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40193$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40195$as_echo_n "checking for NM... " >&6; }
40196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40197$as_echo "disabled" >&6; }
40198      else
40199        # Check if the provided tool contains a complete path.
40200        tool_specified="$NM"
40201        tool_basename="${tool_specified##*/}"
40202        if test "x$tool_basename" = "x$tool_specified"; then
40203          # A command without a complete path is provided, search $PATH.
40204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40205$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40206          # Extract the first word of "$tool_basename", so it can be a program name with args.
40207set dummy $tool_basename; ac_word=$2
40208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40209$as_echo_n "checking for $ac_word... " >&6; }
40210if ${ac_cv_path_NM+:} false; then :
40211  $as_echo_n "(cached) " >&6
40212else
40213  case $NM in
40214  [\\/]* | ?:[\\/]*)
40215  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40216  ;;
40217  *)
40218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40219for as_dir in $PATH
40220do
40221  IFS=$as_save_IFS
40222  test -z "$as_dir" && as_dir=.
40223    for ac_exec_ext in '' $ac_executable_extensions; do
40224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40225    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40227    break 2
40228  fi
40229done
40230  done
40231IFS=$as_save_IFS
40232
40233  ;;
40234esac
40235fi
40236NM=$ac_cv_path_NM
40237if test -n "$NM"; then
40238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40239$as_echo "$NM" >&6; }
40240else
40241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40242$as_echo "no" >&6; }
40243fi
40244
40245
40246          if test "x$NM" = x; then
40247            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40248          fi
40249        else
40250          # Otherwise we believe it is a complete path. Use it as it is.
40251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40252$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40253          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40254$as_echo_n "checking for NM... " >&6; }
40255          if test ! -x "$tool_specified"; then
40256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40257$as_echo "not found" >&6; }
40258            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40259          fi
40260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40261$as_echo "$tool_specified" >&6; }
40262        fi
40263      fi
40264    fi
40265
40266  fi
40267
40268
40269
40270  # Only process if variable expands to non-empty
40271
40272  if test "x$NM" != x; then
40273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40274
40275  # First separate the path from the arguments. This will split at the first
40276  # space.
40277  complete="$NM"
40278  path="${complete%% *}"
40279  tmp="$complete EOL"
40280  arguments="${tmp#* }"
40281
40282  # Input might be given as Windows format, start by converting to
40283  # unix format.
40284  new_path=`$CYGPATH -u "$path"`
40285
40286  # Now try to locate executable using which
40287  new_path=`$WHICH "$new_path" 2> /dev/null`
40288  # bat and cmd files are not always considered executable in cygwin causing which
40289  # to not find them
40290  if test "x$new_path" = x \
40291      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40292      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40293    new_path=`$CYGPATH -u "$path"`
40294  fi
40295  if test "x$new_path" = x; then
40296    # Oops. Which didn't find the executable.
40297    # The splitting of arguments from the executable at a space might have been incorrect,
40298    # since paths with space are more likely in Windows. Give it another try with the whole
40299    # argument.
40300    path="$complete"
40301    arguments="EOL"
40302    new_path=`$CYGPATH -u "$path"`
40303    new_path=`$WHICH "$new_path" 2> /dev/null`
40304    # bat and cmd files are not always considered executable in cygwin causing which
40305    # to not find them
40306    if test "x$new_path" = x \
40307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40309      new_path=`$CYGPATH -u "$path"`
40310    fi
40311    if test "x$new_path" = x; then
40312      # It's still not found. Now this is an unrecoverable error.
40313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40314$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40315      has_space=`$ECHO "$complete" | $GREP " "`
40316      if test "x$has_space" != x; then
40317        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40318$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40319      fi
40320      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40321    fi
40322  fi
40323
40324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40327  # "foo.exe" is OK but "foo" is an error.
40328  #
40329  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40330  # It is also a way to make sure we got the proper file name for the real test later on.
40331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40332  if test "x$test_shortpath" = x; then
40333    # Short path failed, file does not exist as specified.
40334    # Try adding .exe or .cmd
40335    if test -f "${new_path}.exe"; then
40336      input_to_shortpath="${new_path}.exe"
40337    elif test -f "${new_path}.cmd"; then
40338      input_to_shortpath="${new_path}.cmd"
40339    else
40340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40341$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40342      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40343$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40344      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40345    fi
40346  else
40347    input_to_shortpath="$new_path"
40348  fi
40349
40350  # Call helper function which possibly converts this using DOS-style short mode.
40351  # If so, the updated path is stored in $new_path.
40352  new_path="$input_to_shortpath"
40353
40354  input_path="$input_to_shortpath"
40355  # Check if we need to convert this using DOS-style short mode. If the path
40356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40357  # take no chances and rewrite it.
40358  # Note: m4 eats our [], so we need to use [ and ] instead.
40359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40360  if test "x$has_forbidden_chars" != x; then
40361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40365      # Going to short mode and back again did indeed matter. Since short mode is
40366      # case insensitive, let's make it lowercase to improve readability.
40367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40368      # Now convert it back to Unix-style (cygpath)
40369      input_path=`$CYGPATH -u "$shortmode_path"`
40370      new_path="$input_path"
40371    fi
40372  fi
40373
40374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40375  if test "x$test_cygdrive_prefix" = x; then
40376    # As a simple fix, exclude /usr/bin since it's not a real path.
40377    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40379      # a path prefixed by /cygdrive for fixpath to work.
40380      new_path="$CYGWIN_ROOT_PATH$input_path"
40381    fi
40382  fi
40383
40384  # remove trailing .exe if any
40385  new_path="${new_path/%.exe/}"
40386
40387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40388
40389  # First separate the path from the arguments. This will split at the first
40390  # space.
40391  complete="$NM"
40392  path="${complete%% *}"
40393  tmp="$complete EOL"
40394  arguments="${tmp#* }"
40395
40396  # Input might be given as Windows format, start by converting to
40397  # unix format.
40398  new_path="$path"
40399
40400  windows_path="$new_path"
40401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40402    unix_path=`$CYGPATH -u "$windows_path"`
40403    new_path="$unix_path"
40404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40406    new_path="$unix_path"
40407  fi
40408
40409
40410  # Now try to locate executable using which
40411  new_path=`$WHICH "$new_path" 2> /dev/null`
40412
40413  if test "x$new_path" = x; then
40414    # Oops. Which didn't find the executable.
40415    # The splitting of arguments from the executable at a space might have been incorrect,
40416    # since paths with space are more likely in Windows. Give it another try with the whole
40417    # argument.
40418    path="$complete"
40419    arguments="EOL"
40420    new_path="$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
40432    new_path=`$WHICH "$new_path" 2> /dev/null`
40433    # bat and cmd files are not always considered executable in MSYS causing which
40434    # to not find them
40435    if test "x$new_path" = x \
40436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40438      new_path="$path"
40439
40440  windows_path="$new_path"
40441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40442    unix_path=`$CYGPATH -u "$windows_path"`
40443    new_path="$unix_path"
40444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40446    new_path="$unix_path"
40447  fi
40448
40449    fi
40450
40451    if test "x$new_path" = x; then
40452      # It's still not found. Now this is an unrecoverable error.
40453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40454$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40455      has_space=`$ECHO "$complete" | $GREP " "`
40456      if test "x$has_space" != x; then
40457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40459      fi
40460      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40461    fi
40462  fi
40463
40464  # Now new_path has a complete unix path to the binary
40465  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40466    # Keep paths in /bin as-is, but remove trailing .exe if any
40467    new_path="${new_path/%.exe/}"
40468    # Do not save /bin paths to all_fixpath_prefixes!
40469  else
40470    # Not in mixed or Windows style, start by that.
40471    new_path=`cmd //c echo $new_path`
40472
40473  input_path="$new_path"
40474  # Check if we need to convert this using DOS-style short mode. If the path
40475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40476  # take no chances and rewrite it.
40477  # Note: m4 eats our [], so we need to use [ and ] instead.
40478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40479  if test "x$has_forbidden_chars" != x; then
40480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40482  fi
40483
40484    # Output is in $new_path
40485
40486  windows_path="$new_path"
40487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40488    unix_path=`$CYGPATH -u "$windows_path"`
40489    new_path="$unix_path"
40490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40492    new_path="$unix_path"
40493  fi
40494
40495    # remove trailing .exe if any
40496    new_path="${new_path/%.exe/}"
40497
40498    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40499    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40500  fi
40501
40502    else
40503      # We're on a unix platform. Hooray! :)
40504      # First separate the path from the arguments. This will split at the first
40505      # space.
40506      complete="$NM"
40507      path="${complete%% *}"
40508      tmp="$complete EOL"
40509      arguments="${tmp#* }"
40510
40511      # Cannot rely on the command "which" here since it doesn't always work.
40512      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40513      if test -z "$is_absolute_path"; then
40514        # Path to executable is not absolute. Find it.
40515        IFS_save="$IFS"
40516        IFS=:
40517        for p in $PATH; do
40518          if test -f "$p/$path" && test -x "$p/$path"; then
40519            new_path="$p/$path"
40520            break
40521          fi
40522        done
40523        IFS="$IFS_save"
40524      else
40525        # This is an absolute path, we can use it without further modifications.
40526        new_path="$path"
40527      fi
40528
40529      if test "x$new_path" = x; then
40530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40531$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40532        has_space=`$ECHO "$complete" | $GREP " "`
40533        if test "x$has_space" != x; then
40534          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40535$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40536        fi
40537        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40538      fi
40539    fi
40540
40541    # Now join together the path and the arguments once again
40542    if test "x$arguments" != xEOL; then
40543      new_complete="$new_path ${arguments% *}"
40544    else
40545      new_complete="$new_path"
40546    fi
40547
40548    if test "x$complete" != "x$new_complete"; then
40549      NM="$new_complete"
40550      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40551$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40552    fi
40553  fi
40554
40555
40556
40557  # Publish this variable in the help.
40558
40559
40560  if [ -z "${GNM+x}" ]; then
40561    # The variable is not set by user, try to locate tool using the code snippet
40562    for ac_prog in gnm
40563do
40564  # Extract the first word of "$ac_prog", so it can be a program name with args.
40565set dummy $ac_prog; ac_word=$2
40566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40567$as_echo_n "checking for $ac_word... " >&6; }
40568if ${ac_cv_path_GNM+:} false; then :
40569  $as_echo_n "(cached) " >&6
40570else
40571  case $GNM in
40572  [\\/]* | ?:[\\/]*)
40573  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40574  ;;
40575  *)
40576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40577for as_dir in $PATH
40578do
40579  IFS=$as_save_IFS
40580  test -z "$as_dir" && as_dir=.
40581    for ac_exec_ext in '' $ac_executable_extensions; do
40582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40583    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40585    break 2
40586  fi
40587done
40588  done
40589IFS=$as_save_IFS
40590
40591  ;;
40592esac
40593fi
40594GNM=$ac_cv_path_GNM
40595if test -n "$GNM"; then
40596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40597$as_echo "$GNM" >&6; }
40598else
40599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40600$as_echo "no" >&6; }
40601fi
40602
40603
40604  test -n "$GNM" && break
40605done
40606
40607  else
40608    # The variable is set, but is it from the command line or the environment?
40609
40610    # Try to remove the string !GNM! from our list.
40611    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40612    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40613      # If it failed, the variable was not from the command line. Ignore it,
40614      # but warn the user (except for BASH, which is always set by the calling BASH).
40615      if test "xGNM" != xBASH; then
40616        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40617$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40618      fi
40619      # Try to locate tool using the code snippet
40620      for ac_prog in gnm
40621do
40622  # Extract the first word of "$ac_prog", so it can be a program name with args.
40623set dummy $ac_prog; ac_word=$2
40624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40625$as_echo_n "checking for $ac_word... " >&6; }
40626if ${ac_cv_path_GNM+:} false; then :
40627  $as_echo_n "(cached) " >&6
40628else
40629  case $GNM in
40630  [\\/]* | ?:[\\/]*)
40631  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40632  ;;
40633  *)
40634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40635for as_dir in $PATH
40636do
40637  IFS=$as_save_IFS
40638  test -z "$as_dir" && as_dir=.
40639    for ac_exec_ext in '' $ac_executable_extensions; do
40640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40641    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40643    break 2
40644  fi
40645done
40646  done
40647IFS=$as_save_IFS
40648
40649  ;;
40650esac
40651fi
40652GNM=$ac_cv_path_GNM
40653if test -n "$GNM"; then
40654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40655$as_echo "$GNM" >&6; }
40656else
40657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40658$as_echo "no" >&6; }
40659fi
40660
40661
40662  test -n "$GNM" && break
40663done
40664
40665    else
40666      # If it succeeded, then it was overridden by the user. We will use it
40667      # for the tool.
40668
40669      # First remove it from the list of overridden variables, so we can test
40670      # for unknown variables in the end.
40671      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40672
40673      # Check if we try to supply an empty value
40674      if test "x$GNM" = x; then
40675        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40676$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40678$as_echo_n "checking for GNM... " >&6; }
40679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40680$as_echo "disabled" >&6; }
40681      else
40682        # Check if the provided tool contains a complete path.
40683        tool_specified="$GNM"
40684        tool_basename="${tool_specified##*/}"
40685        if test "x$tool_basename" = "x$tool_specified"; then
40686          # A command without a complete path is provided, search $PATH.
40687          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40688$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40689          # Extract the first word of "$tool_basename", so it can be a program name with args.
40690set dummy $tool_basename; ac_word=$2
40691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40692$as_echo_n "checking for $ac_word... " >&6; }
40693if ${ac_cv_path_GNM+:} false; then :
40694  $as_echo_n "(cached) " >&6
40695else
40696  case $GNM in
40697  [\\/]* | ?:[\\/]*)
40698  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40699  ;;
40700  *)
40701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40702for as_dir in $PATH
40703do
40704  IFS=$as_save_IFS
40705  test -z "$as_dir" && as_dir=.
40706    for ac_exec_ext in '' $ac_executable_extensions; do
40707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40708    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40710    break 2
40711  fi
40712done
40713  done
40714IFS=$as_save_IFS
40715
40716  ;;
40717esac
40718fi
40719GNM=$ac_cv_path_GNM
40720if test -n "$GNM"; then
40721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40722$as_echo "$GNM" >&6; }
40723else
40724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40725$as_echo "no" >&6; }
40726fi
40727
40728
40729          if test "x$GNM" = x; then
40730            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40731          fi
40732        else
40733          # Otherwise we believe it is a complete path. Use it as it is.
40734          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40735$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40736          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40737$as_echo_n "checking for GNM... " >&6; }
40738          if test ! -x "$tool_specified"; then
40739            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40740$as_echo "not found" >&6; }
40741            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40742          fi
40743          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40744$as_echo "$tool_specified" >&6; }
40745        fi
40746      fi
40747    fi
40748
40749  fi
40750
40751
40752
40753  # Only process if variable expands to non-empty
40754
40755  if test "x$GNM" != x; then
40756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40757
40758  # First separate the path from the arguments. This will split at the first
40759  # space.
40760  complete="$GNM"
40761  path="${complete%% *}"
40762  tmp="$complete EOL"
40763  arguments="${tmp#* }"
40764
40765  # Input might be given as Windows format, start by converting to
40766  # unix format.
40767  new_path=`$CYGPATH -u "$path"`
40768
40769  # Now try to locate executable using which
40770  new_path=`$WHICH "$new_path" 2> /dev/null`
40771  # bat and cmd files are not always considered executable in cygwin causing which
40772  # to not find them
40773  if test "x$new_path" = x \
40774      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40775      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40776    new_path=`$CYGPATH -u "$path"`
40777  fi
40778  if test "x$new_path" = x; then
40779    # Oops. Which didn't find the executable.
40780    # The splitting of arguments from the executable at a space might have been incorrect,
40781    # since paths with space are more likely in Windows. Give it another try with the whole
40782    # argument.
40783    path="$complete"
40784    arguments="EOL"
40785    new_path=`$CYGPATH -u "$path"`
40786    new_path=`$WHICH "$new_path" 2> /dev/null`
40787    # bat and cmd files are not always considered executable in cygwin causing which
40788    # to not find them
40789    if test "x$new_path" = x \
40790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40792      new_path=`$CYGPATH -u "$path"`
40793    fi
40794    if test "x$new_path" = x; then
40795      # It's still not found. Now this is an unrecoverable error.
40796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40797$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40798      has_space=`$ECHO "$complete" | $GREP " "`
40799      if test "x$has_space" != x; then
40800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40802      fi
40803      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40804    fi
40805  fi
40806
40807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40810  # "foo.exe" is OK but "foo" is an error.
40811  #
40812  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40813  # It is also a way to make sure we got the proper file name for the real test later on.
40814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40815  if test "x$test_shortpath" = x; then
40816    # Short path failed, file does not exist as specified.
40817    # Try adding .exe or .cmd
40818    if test -f "${new_path}.exe"; then
40819      input_to_shortpath="${new_path}.exe"
40820    elif test -f "${new_path}.cmd"; then
40821      input_to_shortpath="${new_path}.cmd"
40822    else
40823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40824$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40825      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40826$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40827      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40828    fi
40829  else
40830    input_to_shortpath="$new_path"
40831  fi
40832
40833  # Call helper function which possibly converts this using DOS-style short mode.
40834  # If so, the updated path is stored in $new_path.
40835  new_path="$input_to_shortpath"
40836
40837  input_path="$input_to_shortpath"
40838  # Check if we need to convert this using DOS-style short mode. If the path
40839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40840  # take no chances and rewrite it.
40841  # Note: m4 eats our [], so we need to use [ and ] instead.
40842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40843  if test "x$has_forbidden_chars" != x; then
40844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40848      # Going to short mode and back again did indeed matter. Since short mode is
40849      # case insensitive, let's make it lowercase to improve readability.
40850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40851      # Now convert it back to Unix-style (cygpath)
40852      input_path=`$CYGPATH -u "$shortmode_path"`
40853      new_path="$input_path"
40854    fi
40855  fi
40856
40857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40858  if test "x$test_cygdrive_prefix" = x; then
40859    # As a simple fix, exclude /usr/bin since it's not a real path.
40860    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40862      # a path prefixed by /cygdrive for fixpath to work.
40863      new_path="$CYGWIN_ROOT_PATH$input_path"
40864    fi
40865  fi
40866
40867  # remove trailing .exe if any
40868  new_path="${new_path/%.exe/}"
40869
40870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40871
40872  # First separate the path from the arguments. This will split at the first
40873  # space.
40874  complete="$GNM"
40875  path="${complete%% *}"
40876  tmp="$complete EOL"
40877  arguments="${tmp#* }"
40878
40879  # Input might be given as Windows format, start by converting to
40880  # unix format.
40881  new_path="$path"
40882
40883  windows_path="$new_path"
40884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40885    unix_path=`$CYGPATH -u "$windows_path"`
40886    new_path="$unix_path"
40887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40889    new_path="$unix_path"
40890  fi
40891
40892
40893  # Now try to locate executable using which
40894  new_path=`$WHICH "$new_path" 2> /dev/null`
40895
40896  if test "x$new_path" = x; then
40897    # Oops. Which didn't find the executable.
40898    # The splitting of arguments from the executable at a space might have been incorrect,
40899    # since paths with space are more likely in Windows. Give it another try with the whole
40900    # argument.
40901    path="$complete"
40902    arguments="EOL"
40903    new_path="$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
40915    new_path=`$WHICH "$new_path" 2> /dev/null`
40916    # bat and cmd files are not always considered executable in MSYS causing which
40917    # to not find them
40918    if test "x$new_path" = x \
40919        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40920        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40921      new_path="$path"
40922
40923  windows_path="$new_path"
40924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40925    unix_path=`$CYGPATH -u "$windows_path"`
40926    new_path="$unix_path"
40927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40929    new_path="$unix_path"
40930  fi
40931
40932    fi
40933
40934    if test "x$new_path" = x; then
40935      # It's still not found. Now this is an unrecoverable error.
40936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40937$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40938      has_space=`$ECHO "$complete" | $GREP " "`
40939      if test "x$has_space" != x; then
40940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40942      fi
40943      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40944    fi
40945  fi
40946
40947  # Now new_path has a complete unix path to the binary
40948  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40949    # Keep paths in /bin as-is, but remove trailing .exe if any
40950    new_path="${new_path/%.exe/}"
40951    # Do not save /bin paths to all_fixpath_prefixes!
40952  else
40953    # Not in mixed or Windows style, start by that.
40954    new_path=`cmd //c echo $new_path`
40955
40956  input_path="$new_path"
40957  # Check if we need to convert this using DOS-style short mode. If the path
40958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40959  # take no chances and rewrite it.
40960  # Note: m4 eats our [], so we need to use [ and ] instead.
40961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40962  if test "x$has_forbidden_chars" != x; then
40963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40965  fi
40966
40967    # Output is in $new_path
40968
40969  windows_path="$new_path"
40970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40971    unix_path=`$CYGPATH -u "$windows_path"`
40972    new_path="$unix_path"
40973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40975    new_path="$unix_path"
40976  fi
40977
40978    # remove trailing .exe if any
40979    new_path="${new_path/%.exe/}"
40980
40981    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40982    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40983  fi
40984
40985    else
40986      # We're on a unix platform. Hooray! :)
40987      # First separate the path from the arguments. This will split at the first
40988      # space.
40989      complete="$GNM"
40990      path="${complete%% *}"
40991      tmp="$complete EOL"
40992      arguments="${tmp#* }"
40993
40994      # Cannot rely on the command "which" here since it doesn't always work.
40995      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40996      if test -z "$is_absolute_path"; then
40997        # Path to executable is not absolute. Find it.
40998        IFS_save="$IFS"
40999        IFS=:
41000        for p in $PATH; do
41001          if test -f "$p/$path" && test -x "$p/$path"; then
41002            new_path="$p/$path"
41003            break
41004          fi
41005        done
41006        IFS="$IFS_save"
41007      else
41008        # This is an absolute path, we can use it without further modifications.
41009        new_path="$path"
41010      fi
41011
41012      if test "x$new_path" = x; then
41013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41014$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41015        has_space=`$ECHO "$complete" | $GREP " "`
41016        if test "x$has_space" != x; then
41017          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41018$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41019        fi
41020        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41021      fi
41022    fi
41023
41024    # Now join together the path and the arguments once again
41025    if test "x$arguments" != xEOL; then
41026      new_complete="$new_path ${arguments% *}"
41027    else
41028      new_complete="$new_path"
41029    fi
41030
41031    if test "x$complete" != "x$new_complete"; then
41032      GNM="$new_complete"
41033      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41034$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41035    fi
41036  fi
41037
41038  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41039    # FIXME: we should unify this with the solaris case above.
41040
41041
41042  # Publish this variable in the help.
41043
41044
41045  if [ -z "${STRIP+x}" ]; then
41046    # The variable is not set by user, try to locate tool using the code snippet
41047    if test -n "$ac_tool_prefix"; then
41048  for ac_prog in strip
41049  do
41050    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41051set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41053$as_echo_n "checking for $ac_word... " >&6; }
41054if ${ac_cv_prog_STRIP+:} false; then :
41055  $as_echo_n "(cached) " >&6
41056else
41057  if test -n "$STRIP"; then
41058  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41059else
41060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41061for as_dir in $PATH
41062do
41063  IFS=$as_save_IFS
41064  test -z "$as_dir" && as_dir=.
41065    for ac_exec_ext in '' $ac_executable_extensions; do
41066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41067    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41069    break 2
41070  fi
41071done
41072  done
41073IFS=$as_save_IFS
41074
41075fi
41076fi
41077STRIP=$ac_cv_prog_STRIP
41078if test -n "$STRIP"; then
41079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41080$as_echo "$STRIP" >&6; }
41081else
41082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41083$as_echo "no" >&6; }
41084fi
41085
41086
41087    test -n "$STRIP" && break
41088  done
41089fi
41090if test -z "$STRIP"; then
41091  ac_ct_STRIP=$STRIP
41092  for ac_prog in strip
41093do
41094  # Extract the first word of "$ac_prog", so it can be a program name with args.
41095set dummy $ac_prog; ac_word=$2
41096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41097$as_echo_n "checking for $ac_word... " >&6; }
41098if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41099  $as_echo_n "(cached) " >&6
41100else
41101  if test -n "$ac_ct_STRIP"; then
41102  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41103else
41104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41105for as_dir in $PATH
41106do
41107  IFS=$as_save_IFS
41108  test -z "$as_dir" && as_dir=.
41109    for ac_exec_ext in '' $ac_executable_extensions; do
41110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41111    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41113    break 2
41114  fi
41115done
41116  done
41117IFS=$as_save_IFS
41118
41119fi
41120fi
41121ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41122if test -n "$ac_ct_STRIP"; then
41123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41124$as_echo "$ac_ct_STRIP" >&6; }
41125else
41126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41127$as_echo "no" >&6; }
41128fi
41129
41130
41131  test -n "$ac_ct_STRIP" && break
41132done
41133
41134  if test "x$ac_ct_STRIP" = x; then
41135    STRIP=""
41136  else
41137    case $cross_compiling:$ac_tool_warned in
41138yes:)
41139{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41140$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41141ac_tool_warned=yes ;;
41142esac
41143    STRIP=$ac_ct_STRIP
41144  fi
41145fi
41146
41147  else
41148    # The variable is set, but is it from the command line or the environment?
41149
41150    # Try to remove the string !STRIP! from our list.
41151    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41152    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41153      # If it failed, the variable was not from the command line. Ignore it,
41154      # but warn the user (except for BASH, which is always set by the calling BASH).
41155      if test "xSTRIP" != xBASH; then
41156        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41157$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41158      fi
41159      # Try to locate tool using the code snippet
41160      if test -n "$ac_tool_prefix"; then
41161  for ac_prog in strip
41162  do
41163    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41164set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41166$as_echo_n "checking for $ac_word... " >&6; }
41167if ${ac_cv_prog_STRIP+:} false; then :
41168  $as_echo_n "(cached) " >&6
41169else
41170  if test -n "$STRIP"; then
41171  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41172else
41173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41174for as_dir in $PATH
41175do
41176  IFS=$as_save_IFS
41177  test -z "$as_dir" && as_dir=.
41178    for ac_exec_ext in '' $ac_executable_extensions; do
41179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41180    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41182    break 2
41183  fi
41184done
41185  done
41186IFS=$as_save_IFS
41187
41188fi
41189fi
41190STRIP=$ac_cv_prog_STRIP
41191if test -n "$STRIP"; then
41192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41193$as_echo "$STRIP" >&6; }
41194else
41195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41196$as_echo "no" >&6; }
41197fi
41198
41199
41200    test -n "$STRIP" && break
41201  done
41202fi
41203if test -z "$STRIP"; then
41204  ac_ct_STRIP=$STRIP
41205  for ac_prog in strip
41206do
41207  # Extract the first word of "$ac_prog", so it can be a program name with args.
41208set dummy $ac_prog; ac_word=$2
41209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41210$as_echo_n "checking for $ac_word... " >&6; }
41211if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41212  $as_echo_n "(cached) " >&6
41213else
41214  if test -n "$ac_ct_STRIP"; then
41215  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41216else
41217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41218for as_dir in $PATH
41219do
41220  IFS=$as_save_IFS
41221  test -z "$as_dir" && as_dir=.
41222    for ac_exec_ext in '' $ac_executable_extensions; do
41223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41224    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41226    break 2
41227  fi
41228done
41229  done
41230IFS=$as_save_IFS
41231
41232fi
41233fi
41234ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41235if test -n "$ac_ct_STRIP"; then
41236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41237$as_echo "$ac_ct_STRIP" >&6; }
41238else
41239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41240$as_echo "no" >&6; }
41241fi
41242
41243
41244  test -n "$ac_ct_STRIP" && break
41245done
41246
41247  if test "x$ac_ct_STRIP" = x; then
41248    STRIP=""
41249  else
41250    case $cross_compiling:$ac_tool_warned in
41251yes:)
41252{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41253$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41254ac_tool_warned=yes ;;
41255esac
41256    STRIP=$ac_ct_STRIP
41257  fi
41258fi
41259
41260    else
41261      # If it succeeded, then it was overridden by the user. We will use it
41262      # for the tool.
41263
41264      # First remove it from the list of overridden variables, so we can test
41265      # for unknown variables in the end.
41266      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41267
41268      # Check if we try to supply an empty value
41269      if test "x$STRIP" = x; then
41270        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41271$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41272        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41273$as_echo_n "checking for STRIP... " >&6; }
41274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41275$as_echo "disabled" >&6; }
41276      else
41277        # Check if the provided tool contains a complete path.
41278        tool_specified="$STRIP"
41279        tool_basename="${tool_specified##*/}"
41280        if test "x$tool_basename" = "x$tool_specified"; then
41281          # A command without a complete path is provided, search $PATH.
41282          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41283$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41284          # Extract the first word of "$tool_basename", so it can be a program name with args.
41285set dummy $tool_basename; ac_word=$2
41286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41287$as_echo_n "checking for $ac_word... " >&6; }
41288if ${ac_cv_path_STRIP+:} false; then :
41289  $as_echo_n "(cached) " >&6
41290else
41291  case $STRIP in
41292  [\\/]* | ?:[\\/]*)
41293  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41294  ;;
41295  *)
41296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41297for as_dir in $PATH
41298do
41299  IFS=$as_save_IFS
41300  test -z "$as_dir" && as_dir=.
41301    for ac_exec_ext in '' $ac_executable_extensions; do
41302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41303    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41305    break 2
41306  fi
41307done
41308  done
41309IFS=$as_save_IFS
41310
41311  ;;
41312esac
41313fi
41314STRIP=$ac_cv_path_STRIP
41315if test -n "$STRIP"; then
41316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41317$as_echo "$STRIP" >&6; }
41318else
41319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41320$as_echo "no" >&6; }
41321fi
41322
41323
41324          if test "x$STRIP" = x; then
41325            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41326          fi
41327        else
41328          # Otherwise we believe it is a complete path. Use it as it is.
41329          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41330$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41331          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41332$as_echo_n "checking for STRIP... " >&6; }
41333          if test ! -x "$tool_specified"; then
41334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41335$as_echo "not found" >&6; }
41336            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41337          fi
41338          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41339$as_echo "$tool_specified" >&6; }
41340        fi
41341      fi
41342    fi
41343
41344  fi
41345
41346
41347
41348  # Only process if variable expands to non-empty
41349
41350  if test "x$STRIP" != x; then
41351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41352
41353  # First separate the path from the arguments. This will split at the first
41354  # space.
41355  complete="$STRIP"
41356  path="${complete%% *}"
41357  tmp="$complete EOL"
41358  arguments="${tmp#* }"
41359
41360  # Input might be given as Windows format, start by converting to
41361  # unix format.
41362  new_path=`$CYGPATH -u "$path"`
41363
41364  # Now try to locate executable using which
41365  new_path=`$WHICH "$new_path" 2> /dev/null`
41366  # bat and cmd files are not always considered executable in cygwin causing which
41367  # to not find them
41368  if test "x$new_path" = x \
41369      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41370      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41371    new_path=`$CYGPATH -u "$path"`
41372  fi
41373  if test "x$new_path" = x; then
41374    # Oops. Which didn't find the executable.
41375    # The splitting of arguments from the executable at a space might have been incorrect,
41376    # since paths with space are more likely in Windows. Give it another try with the whole
41377    # argument.
41378    path="$complete"
41379    arguments="EOL"
41380    new_path=`$CYGPATH -u "$path"`
41381    new_path=`$WHICH "$new_path" 2> /dev/null`
41382    # bat and cmd files are not always considered executable in cygwin causing which
41383    # to not find them
41384    if test "x$new_path" = x \
41385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41387      new_path=`$CYGPATH -u "$path"`
41388    fi
41389    if test "x$new_path" = x; then
41390      # It's still not found. Now this is an unrecoverable error.
41391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41392$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41393      has_space=`$ECHO "$complete" | $GREP " "`
41394      if test "x$has_space" != x; then
41395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41397      fi
41398      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41399    fi
41400  fi
41401
41402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41405  # "foo.exe" is OK but "foo" is an error.
41406  #
41407  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41408  # It is also a way to make sure we got the proper file name for the real test later on.
41409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41410  if test "x$test_shortpath" = x; then
41411    # Short path failed, file does not exist as specified.
41412    # Try adding .exe or .cmd
41413    if test -f "${new_path}.exe"; then
41414      input_to_shortpath="${new_path}.exe"
41415    elif test -f "${new_path}.cmd"; then
41416      input_to_shortpath="${new_path}.cmd"
41417    else
41418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41419$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41420      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41421$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41422      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41423    fi
41424  else
41425    input_to_shortpath="$new_path"
41426  fi
41427
41428  # Call helper function which possibly converts this using DOS-style short mode.
41429  # If so, the updated path is stored in $new_path.
41430  new_path="$input_to_shortpath"
41431
41432  input_path="$input_to_shortpath"
41433  # Check if we need to convert this using DOS-style short mode. If the path
41434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41435  # take no chances and rewrite it.
41436  # Note: m4 eats our [], so we need to use [ and ] instead.
41437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41438  if test "x$has_forbidden_chars" != x; then
41439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41443      # Going to short mode and back again did indeed matter. Since short mode is
41444      # case insensitive, let's make it lowercase to improve readability.
41445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41446      # Now convert it back to Unix-style (cygpath)
41447      input_path=`$CYGPATH -u "$shortmode_path"`
41448      new_path="$input_path"
41449    fi
41450  fi
41451
41452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41453  if test "x$test_cygdrive_prefix" = x; then
41454    # As a simple fix, exclude /usr/bin since it's not a real path.
41455    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41457      # a path prefixed by /cygdrive for fixpath to work.
41458      new_path="$CYGWIN_ROOT_PATH$input_path"
41459    fi
41460  fi
41461
41462  # remove trailing .exe if any
41463  new_path="${new_path/%.exe/}"
41464
41465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41466
41467  # First separate the path from the arguments. This will split at the first
41468  # space.
41469  complete="$STRIP"
41470  path="${complete%% *}"
41471  tmp="$complete EOL"
41472  arguments="${tmp#* }"
41473
41474  # Input might be given as Windows format, start by converting to
41475  # unix format.
41476  new_path="$path"
41477
41478  windows_path="$new_path"
41479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41480    unix_path=`$CYGPATH -u "$windows_path"`
41481    new_path="$unix_path"
41482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41484    new_path="$unix_path"
41485  fi
41486
41487
41488  # Now try to locate executable using which
41489  new_path=`$WHICH "$new_path" 2> /dev/null`
41490
41491  if test "x$new_path" = x; then
41492    # Oops. Which didn't find the executable.
41493    # The splitting of arguments from the executable at a space might have been incorrect,
41494    # since paths with space are more likely in Windows. Give it another try with the whole
41495    # argument.
41496    path="$complete"
41497    arguments="EOL"
41498    new_path="$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
41510    new_path=`$WHICH "$new_path" 2> /dev/null`
41511    # bat and cmd files are not always considered executable in MSYS causing which
41512    # to not find them
41513    if test "x$new_path" = x \
41514        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41515        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41516      new_path="$path"
41517
41518  windows_path="$new_path"
41519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41520    unix_path=`$CYGPATH -u "$windows_path"`
41521    new_path="$unix_path"
41522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41524    new_path="$unix_path"
41525  fi
41526
41527    fi
41528
41529    if test "x$new_path" = x; then
41530      # It's still not found. Now this is an unrecoverable error.
41531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41532$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41533      has_space=`$ECHO "$complete" | $GREP " "`
41534      if test "x$has_space" != x; then
41535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41537      fi
41538      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41539    fi
41540  fi
41541
41542  # Now new_path has a complete unix path to the binary
41543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41544    # Keep paths in /bin as-is, but remove trailing .exe if any
41545    new_path="${new_path/%.exe/}"
41546    # Do not save /bin paths to all_fixpath_prefixes!
41547  else
41548    # Not in mixed or Windows style, start by that.
41549    new_path=`cmd //c echo $new_path`
41550
41551  input_path="$new_path"
41552  # Check if we need to convert this using DOS-style short mode. If the path
41553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41554  # take no chances and rewrite it.
41555  # Note: m4 eats our [], so we need to use [ and ] instead.
41556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41557  if test "x$has_forbidden_chars" != x; then
41558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41560  fi
41561
41562    # Output is in $new_path
41563
41564  windows_path="$new_path"
41565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41566    unix_path=`$CYGPATH -u "$windows_path"`
41567    new_path="$unix_path"
41568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41570    new_path="$unix_path"
41571  fi
41572
41573    # remove trailing .exe if any
41574    new_path="${new_path/%.exe/}"
41575
41576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41578  fi
41579
41580    else
41581      # We're on a unix platform. Hooray! :)
41582      # First separate the path from the arguments. This will split at the first
41583      # space.
41584      complete="$STRIP"
41585      path="${complete%% *}"
41586      tmp="$complete EOL"
41587      arguments="${tmp#* }"
41588
41589      # Cannot rely on the command "which" here since it doesn't always work.
41590      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41591      if test -z "$is_absolute_path"; then
41592        # Path to executable is not absolute. Find it.
41593        IFS_save="$IFS"
41594        IFS=:
41595        for p in $PATH; do
41596          if test -f "$p/$path" && test -x "$p/$path"; then
41597            new_path="$p/$path"
41598            break
41599          fi
41600        done
41601        IFS="$IFS_save"
41602      else
41603        # This is an absolute path, we can use it without further modifications.
41604        new_path="$path"
41605      fi
41606
41607      if test "x$new_path" = x; then
41608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41609$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41610        has_space=`$ECHO "$complete" | $GREP " "`
41611        if test "x$has_space" != x; then
41612          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41613$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41614        fi
41615        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41616      fi
41617    fi
41618
41619    # Now join together the path and the arguments once again
41620    if test "x$arguments" != xEOL; then
41621      new_complete="$new_path ${arguments% *}"
41622    else
41623      new_complete="$new_path"
41624    fi
41625
41626    if test "x$complete" != "x$new_complete"; then
41627      STRIP="$new_complete"
41628      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41629$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41630    fi
41631  fi
41632
41633    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41634
41635
41636  # Publish this variable in the help.
41637
41638
41639  if [ -z "${NM+x}" ]; then
41640    # The variable is not set by user, try to locate tool using the code snippet
41641    if test -n "$ac_tool_prefix"; then
41642  for ac_prog in nm gcc-nm
41643  do
41644    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41645set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41647$as_echo_n "checking for $ac_word... " >&6; }
41648if ${ac_cv_prog_NM+:} false; then :
41649  $as_echo_n "(cached) " >&6
41650else
41651  if test -n "$NM"; then
41652  ac_cv_prog_NM="$NM" # Let the user override the test.
41653else
41654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41655for as_dir in $PATH
41656do
41657  IFS=$as_save_IFS
41658  test -z "$as_dir" && as_dir=.
41659    for ac_exec_ext in '' $ac_executable_extensions; do
41660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41661    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41663    break 2
41664  fi
41665done
41666  done
41667IFS=$as_save_IFS
41668
41669fi
41670fi
41671NM=$ac_cv_prog_NM
41672if test -n "$NM"; then
41673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41674$as_echo "$NM" >&6; }
41675else
41676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41677$as_echo "no" >&6; }
41678fi
41679
41680
41681    test -n "$NM" && break
41682  done
41683fi
41684if test -z "$NM"; then
41685  ac_ct_NM=$NM
41686  for ac_prog in nm gcc-nm
41687do
41688  # Extract the first word of "$ac_prog", so it can be a program name with args.
41689set dummy $ac_prog; ac_word=$2
41690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41691$as_echo_n "checking for $ac_word... " >&6; }
41692if ${ac_cv_prog_ac_ct_NM+:} false; then :
41693  $as_echo_n "(cached) " >&6
41694else
41695  if test -n "$ac_ct_NM"; then
41696  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41697else
41698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41699for as_dir in $PATH
41700do
41701  IFS=$as_save_IFS
41702  test -z "$as_dir" && as_dir=.
41703    for ac_exec_ext in '' $ac_executable_extensions; do
41704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41705    ac_cv_prog_ac_ct_NM="$ac_prog"
41706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41707    break 2
41708  fi
41709done
41710  done
41711IFS=$as_save_IFS
41712
41713fi
41714fi
41715ac_ct_NM=$ac_cv_prog_ac_ct_NM
41716if test -n "$ac_ct_NM"; then
41717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41718$as_echo "$ac_ct_NM" >&6; }
41719else
41720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41721$as_echo "no" >&6; }
41722fi
41723
41724
41725  test -n "$ac_ct_NM" && break
41726done
41727
41728  if test "x$ac_ct_NM" = x; then
41729    NM=""
41730  else
41731    case $cross_compiling:$ac_tool_warned in
41732yes:)
41733{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41734$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41735ac_tool_warned=yes ;;
41736esac
41737    NM=$ac_ct_NM
41738  fi
41739fi
41740
41741  else
41742    # The variable is set, but is it from the command line or the environment?
41743
41744    # Try to remove the string !NM! from our list.
41745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41747      # If it failed, the variable was not from the command line. Ignore it,
41748      # but warn the user (except for BASH, which is always set by the calling BASH).
41749      if test "xNM" != xBASH; then
41750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41751$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41752      fi
41753      # Try to locate tool using the code snippet
41754      if test -n "$ac_tool_prefix"; then
41755  for ac_prog in nm gcc-nm
41756  do
41757    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41758set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41760$as_echo_n "checking for $ac_word... " >&6; }
41761if ${ac_cv_prog_NM+:} false; then :
41762  $as_echo_n "(cached) " >&6
41763else
41764  if test -n "$NM"; then
41765  ac_cv_prog_NM="$NM" # Let the user override the test.
41766else
41767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41768for as_dir in $PATH
41769do
41770  IFS=$as_save_IFS
41771  test -z "$as_dir" && as_dir=.
41772    for ac_exec_ext in '' $ac_executable_extensions; do
41773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41774    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41776    break 2
41777  fi
41778done
41779  done
41780IFS=$as_save_IFS
41781
41782fi
41783fi
41784NM=$ac_cv_prog_NM
41785if test -n "$NM"; then
41786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41787$as_echo "$NM" >&6; }
41788else
41789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41790$as_echo "no" >&6; }
41791fi
41792
41793
41794    test -n "$NM" && break
41795  done
41796fi
41797if test -z "$NM"; then
41798  ac_ct_NM=$NM
41799  for ac_prog in nm gcc-nm
41800do
41801  # Extract the first word of "$ac_prog", so it can be a program name with args.
41802set dummy $ac_prog; ac_word=$2
41803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41804$as_echo_n "checking for $ac_word... " >&6; }
41805if ${ac_cv_prog_ac_ct_NM+:} false; then :
41806  $as_echo_n "(cached) " >&6
41807else
41808  if test -n "$ac_ct_NM"; then
41809  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41810else
41811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41812for as_dir in $PATH
41813do
41814  IFS=$as_save_IFS
41815  test -z "$as_dir" && as_dir=.
41816    for ac_exec_ext in '' $ac_executable_extensions; do
41817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41818    ac_cv_prog_ac_ct_NM="$ac_prog"
41819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41820    break 2
41821  fi
41822done
41823  done
41824IFS=$as_save_IFS
41825
41826fi
41827fi
41828ac_ct_NM=$ac_cv_prog_ac_ct_NM
41829if test -n "$ac_ct_NM"; then
41830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41831$as_echo "$ac_ct_NM" >&6; }
41832else
41833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41834$as_echo "no" >&6; }
41835fi
41836
41837
41838  test -n "$ac_ct_NM" && break
41839done
41840
41841  if test "x$ac_ct_NM" = x; then
41842    NM=""
41843  else
41844    case $cross_compiling:$ac_tool_warned in
41845yes:)
41846{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41847$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41848ac_tool_warned=yes ;;
41849esac
41850    NM=$ac_ct_NM
41851  fi
41852fi
41853
41854    else
41855      # If it succeeded, then it was overridden by the user. We will use it
41856      # for the tool.
41857
41858      # First remove it from the list of overridden variables, so we can test
41859      # for unknown variables in the end.
41860      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41861
41862      # Check if we try to supply an empty value
41863      if test "x$NM" = x; then
41864        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41865$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41867$as_echo_n "checking for NM... " >&6; }
41868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41869$as_echo "disabled" >&6; }
41870      else
41871        # Check if the provided tool contains a complete path.
41872        tool_specified="$NM"
41873        tool_basename="${tool_specified##*/}"
41874        if test "x$tool_basename" = "x$tool_specified"; then
41875          # A command without a complete path is provided, search $PATH.
41876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41877$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41878          # Extract the first word of "$tool_basename", so it can be a program name with args.
41879set dummy $tool_basename; ac_word=$2
41880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41881$as_echo_n "checking for $ac_word... " >&6; }
41882if ${ac_cv_path_NM+:} false; then :
41883  $as_echo_n "(cached) " >&6
41884else
41885  case $NM in
41886  [\\/]* | ?:[\\/]*)
41887  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41888  ;;
41889  *)
41890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41891for as_dir in $PATH
41892do
41893  IFS=$as_save_IFS
41894  test -z "$as_dir" && as_dir=.
41895    for ac_exec_ext in '' $ac_executable_extensions; do
41896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41897    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41899    break 2
41900  fi
41901done
41902  done
41903IFS=$as_save_IFS
41904
41905  ;;
41906esac
41907fi
41908NM=$ac_cv_path_NM
41909if test -n "$NM"; then
41910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41911$as_echo "$NM" >&6; }
41912else
41913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41914$as_echo "no" >&6; }
41915fi
41916
41917
41918          if test "x$NM" = x; then
41919            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41920          fi
41921        else
41922          # Otherwise we believe it is a complete path. Use it as it is.
41923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41924$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41925          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41926$as_echo_n "checking for NM... " >&6; }
41927          if test ! -x "$tool_specified"; then
41928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41929$as_echo "not found" >&6; }
41930            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41931          fi
41932          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41933$as_echo "$tool_specified" >&6; }
41934        fi
41935      fi
41936    fi
41937
41938  fi
41939
41940
41941    else
41942
41943
41944  # Publish this variable in the help.
41945
41946
41947  if [ -z "${NM+x}" ]; then
41948    # The variable is not set by user, try to locate tool using the code snippet
41949    if test -n "$ac_tool_prefix"; then
41950  for ac_prog in nm
41951  do
41952    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41953set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41955$as_echo_n "checking for $ac_word... " >&6; }
41956if ${ac_cv_prog_NM+:} false; then :
41957  $as_echo_n "(cached) " >&6
41958else
41959  if test -n "$NM"; then
41960  ac_cv_prog_NM="$NM" # Let the user override the test.
41961else
41962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41963for as_dir in $PATH
41964do
41965  IFS=$as_save_IFS
41966  test -z "$as_dir" && as_dir=.
41967    for ac_exec_ext in '' $ac_executable_extensions; do
41968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41969    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41971    break 2
41972  fi
41973done
41974  done
41975IFS=$as_save_IFS
41976
41977fi
41978fi
41979NM=$ac_cv_prog_NM
41980if test -n "$NM"; then
41981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41982$as_echo "$NM" >&6; }
41983else
41984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41985$as_echo "no" >&6; }
41986fi
41987
41988
41989    test -n "$NM" && break
41990  done
41991fi
41992if test -z "$NM"; then
41993  ac_ct_NM=$NM
41994  for ac_prog in nm
41995do
41996  # Extract the first word of "$ac_prog", so it can be a program name with args.
41997set dummy $ac_prog; ac_word=$2
41998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41999$as_echo_n "checking for $ac_word... " >&6; }
42000if ${ac_cv_prog_ac_ct_NM+:} false; then :
42001  $as_echo_n "(cached) " >&6
42002else
42003  if test -n "$ac_ct_NM"; then
42004  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42005else
42006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42007for as_dir in $PATH
42008do
42009  IFS=$as_save_IFS
42010  test -z "$as_dir" && as_dir=.
42011    for ac_exec_ext in '' $ac_executable_extensions; do
42012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42013    ac_cv_prog_ac_ct_NM="$ac_prog"
42014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42015    break 2
42016  fi
42017done
42018  done
42019IFS=$as_save_IFS
42020
42021fi
42022fi
42023ac_ct_NM=$ac_cv_prog_ac_ct_NM
42024if test -n "$ac_ct_NM"; then
42025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42026$as_echo "$ac_ct_NM" >&6; }
42027else
42028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42029$as_echo "no" >&6; }
42030fi
42031
42032
42033  test -n "$ac_ct_NM" && break
42034done
42035
42036  if test "x$ac_ct_NM" = x; then
42037    NM=""
42038  else
42039    case $cross_compiling:$ac_tool_warned in
42040yes:)
42041{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42042$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42043ac_tool_warned=yes ;;
42044esac
42045    NM=$ac_ct_NM
42046  fi
42047fi
42048
42049  else
42050    # The variable is set, but is it from the command line or the environment?
42051
42052    # Try to remove the string !NM! from our list.
42053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42055      # If it failed, the variable was not from the command line. Ignore it,
42056      # but warn the user (except for BASH, which is always set by the calling BASH).
42057      if test "xNM" != xBASH; then
42058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42059$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42060      fi
42061      # Try to locate tool using the code snippet
42062      if test -n "$ac_tool_prefix"; then
42063  for ac_prog in nm
42064  do
42065    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42066set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42068$as_echo_n "checking for $ac_word... " >&6; }
42069if ${ac_cv_prog_NM+:} false; then :
42070  $as_echo_n "(cached) " >&6
42071else
42072  if test -n "$NM"; then
42073  ac_cv_prog_NM="$NM" # Let the user override the test.
42074else
42075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42076for as_dir in $PATH
42077do
42078  IFS=$as_save_IFS
42079  test -z "$as_dir" && as_dir=.
42080    for ac_exec_ext in '' $ac_executable_extensions; do
42081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42082    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42084    break 2
42085  fi
42086done
42087  done
42088IFS=$as_save_IFS
42089
42090fi
42091fi
42092NM=$ac_cv_prog_NM
42093if test -n "$NM"; then
42094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42095$as_echo "$NM" >&6; }
42096else
42097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42098$as_echo "no" >&6; }
42099fi
42100
42101
42102    test -n "$NM" && break
42103  done
42104fi
42105if test -z "$NM"; then
42106  ac_ct_NM=$NM
42107  for ac_prog in nm
42108do
42109  # Extract the first word of "$ac_prog", so it can be a program name with args.
42110set dummy $ac_prog; ac_word=$2
42111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42112$as_echo_n "checking for $ac_word... " >&6; }
42113if ${ac_cv_prog_ac_ct_NM+:} false; then :
42114  $as_echo_n "(cached) " >&6
42115else
42116  if test -n "$ac_ct_NM"; then
42117  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42118else
42119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42120for as_dir in $PATH
42121do
42122  IFS=$as_save_IFS
42123  test -z "$as_dir" && as_dir=.
42124    for ac_exec_ext in '' $ac_executable_extensions; do
42125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42126    ac_cv_prog_ac_ct_NM="$ac_prog"
42127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42128    break 2
42129  fi
42130done
42131  done
42132IFS=$as_save_IFS
42133
42134fi
42135fi
42136ac_ct_NM=$ac_cv_prog_ac_ct_NM
42137if test -n "$ac_ct_NM"; then
42138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42139$as_echo "$ac_ct_NM" >&6; }
42140else
42141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42142$as_echo "no" >&6; }
42143fi
42144
42145
42146  test -n "$ac_ct_NM" && break
42147done
42148
42149  if test "x$ac_ct_NM" = x; then
42150    NM=""
42151  else
42152    case $cross_compiling:$ac_tool_warned in
42153yes:)
42154{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42155$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42156ac_tool_warned=yes ;;
42157esac
42158    NM=$ac_ct_NM
42159  fi
42160fi
42161
42162    else
42163      # If it succeeded, then it was overridden by the user. We will use it
42164      # for the tool.
42165
42166      # First remove it from the list of overridden variables, so we can test
42167      # for unknown variables in the end.
42168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42169
42170      # Check if we try to supply an empty value
42171      if test "x$NM" = x; then
42172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42173$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42175$as_echo_n "checking for NM... " >&6; }
42176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42177$as_echo "disabled" >&6; }
42178      else
42179        # Check if the provided tool contains a complete path.
42180        tool_specified="$NM"
42181        tool_basename="${tool_specified##*/}"
42182        if test "x$tool_basename" = "x$tool_specified"; then
42183          # A command without a complete path is provided, search $PATH.
42184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42185$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42186          # Extract the first word of "$tool_basename", so it can be a program name with args.
42187set dummy $tool_basename; ac_word=$2
42188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42189$as_echo_n "checking for $ac_word... " >&6; }
42190if ${ac_cv_path_NM+:} false; then :
42191  $as_echo_n "(cached) " >&6
42192else
42193  case $NM in
42194  [\\/]* | ?:[\\/]*)
42195  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42196  ;;
42197  *)
42198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42199for as_dir in $PATH
42200do
42201  IFS=$as_save_IFS
42202  test -z "$as_dir" && as_dir=.
42203    for ac_exec_ext in '' $ac_executable_extensions; do
42204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42205    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42207    break 2
42208  fi
42209done
42210  done
42211IFS=$as_save_IFS
42212
42213  ;;
42214esac
42215fi
42216NM=$ac_cv_path_NM
42217if test -n "$NM"; then
42218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42219$as_echo "$NM" >&6; }
42220else
42221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42222$as_echo "no" >&6; }
42223fi
42224
42225
42226          if test "x$NM" = x; then
42227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42228          fi
42229        else
42230          # Otherwise we believe it is a complete path. Use it as it is.
42231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42232$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42234$as_echo_n "checking for NM... " >&6; }
42235          if test ! -x "$tool_specified"; then
42236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42237$as_echo "not found" >&6; }
42238            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42239          fi
42240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42241$as_echo "$tool_specified" >&6; }
42242        fi
42243      fi
42244    fi
42245
42246  fi
42247
42248
42249    fi
42250
42251  # Only process if variable expands to non-empty
42252
42253  if test "x$NM" != x; then
42254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42255
42256  # First separate the path from the arguments. This will split at the first
42257  # space.
42258  complete="$NM"
42259  path="${complete%% *}"
42260  tmp="$complete EOL"
42261  arguments="${tmp#* }"
42262
42263  # Input might be given as Windows format, start by converting to
42264  # unix format.
42265  new_path=`$CYGPATH -u "$path"`
42266
42267  # Now try to locate executable using which
42268  new_path=`$WHICH "$new_path" 2> /dev/null`
42269  # bat and cmd files are not always considered executable in cygwin causing which
42270  # to not find them
42271  if test "x$new_path" = x \
42272      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42273      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42274    new_path=`$CYGPATH -u "$path"`
42275  fi
42276  if test "x$new_path" = x; then
42277    # Oops. Which didn't find the executable.
42278    # The splitting of arguments from the executable at a space might have been incorrect,
42279    # since paths with space are more likely in Windows. Give it another try with the whole
42280    # argument.
42281    path="$complete"
42282    arguments="EOL"
42283    new_path=`$CYGPATH -u "$path"`
42284    new_path=`$WHICH "$new_path" 2> /dev/null`
42285    # bat and cmd files are not always considered executable in cygwin causing which
42286    # to not find them
42287    if test "x$new_path" = x \
42288        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42289        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42290      new_path=`$CYGPATH -u "$path"`
42291    fi
42292    if test "x$new_path" = x; then
42293      # It's still not found. Now this is an unrecoverable error.
42294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42295$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42296      has_space=`$ECHO "$complete" | $GREP " "`
42297      if test "x$has_space" != x; then
42298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42300      fi
42301      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42302    fi
42303  fi
42304
42305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42308  # "foo.exe" is OK but "foo" is an error.
42309  #
42310  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42311  # It is also a way to make sure we got the proper file name for the real test later on.
42312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42313  if test "x$test_shortpath" = x; then
42314    # Short path failed, file does not exist as specified.
42315    # Try adding .exe or .cmd
42316    if test -f "${new_path}.exe"; then
42317      input_to_shortpath="${new_path}.exe"
42318    elif test -f "${new_path}.cmd"; then
42319      input_to_shortpath="${new_path}.cmd"
42320    else
42321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42322$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42323      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42324$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42325      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42326    fi
42327  else
42328    input_to_shortpath="$new_path"
42329  fi
42330
42331  # Call helper function which possibly converts this using DOS-style short mode.
42332  # If so, the updated path is stored in $new_path.
42333  new_path="$input_to_shortpath"
42334
42335  input_path="$input_to_shortpath"
42336  # Check if we need to convert this using DOS-style short mode. If the path
42337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42338  # take no chances and rewrite it.
42339  # Note: m4 eats our [], so we need to use [ and ] instead.
42340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42341  if test "x$has_forbidden_chars" != x; then
42342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42346      # Going to short mode and back again did indeed matter. Since short mode is
42347      # case insensitive, let's make it lowercase to improve readability.
42348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42349      # Now convert it back to Unix-style (cygpath)
42350      input_path=`$CYGPATH -u "$shortmode_path"`
42351      new_path="$input_path"
42352    fi
42353  fi
42354
42355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42356  if test "x$test_cygdrive_prefix" = x; then
42357    # As a simple fix, exclude /usr/bin since it's not a real path.
42358    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42360      # a path prefixed by /cygdrive for fixpath to work.
42361      new_path="$CYGWIN_ROOT_PATH$input_path"
42362    fi
42363  fi
42364
42365  # remove trailing .exe if any
42366  new_path="${new_path/%.exe/}"
42367
42368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42369
42370  # First separate the path from the arguments. This will split at the first
42371  # space.
42372  complete="$NM"
42373  path="${complete%% *}"
42374  tmp="$complete EOL"
42375  arguments="${tmp#* }"
42376
42377  # Input might be given as Windows format, start by converting to
42378  # unix format.
42379  new_path="$path"
42380
42381  windows_path="$new_path"
42382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42383    unix_path=`$CYGPATH -u "$windows_path"`
42384    new_path="$unix_path"
42385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42387    new_path="$unix_path"
42388  fi
42389
42390
42391  # Now try to locate executable using which
42392  new_path=`$WHICH "$new_path" 2> /dev/null`
42393
42394  if test "x$new_path" = x; then
42395    # Oops. Which didn't find the executable.
42396    # The splitting of arguments from the executable at a space might have been incorrect,
42397    # since paths with space are more likely in Windows. Give it another try with the whole
42398    # argument.
42399    path="$complete"
42400    arguments="EOL"
42401    new_path="$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
42413    new_path=`$WHICH "$new_path" 2> /dev/null`
42414    # bat and cmd files are not always considered executable in MSYS causing which
42415    # to not find them
42416    if test "x$new_path" = x \
42417        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42418        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42419      new_path="$path"
42420
42421  windows_path="$new_path"
42422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42423    unix_path=`$CYGPATH -u "$windows_path"`
42424    new_path="$unix_path"
42425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42427    new_path="$unix_path"
42428  fi
42429
42430    fi
42431
42432    if test "x$new_path" = x; then
42433      # It's still not found. Now this is an unrecoverable error.
42434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42435$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42436      has_space=`$ECHO "$complete" | $GREP " "`
42437      if test "x$has_space" != x; then
42438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42440      fi
42441      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42442    fi
42443  fi
42444
42445  # Now new_path has a complete unix path to the binary
42446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42447    # Keep paths in /bin as-is, but remove trailing .exe if any
42448    new_path="${new_path/%.exe/}"
42449    # Do not save /bin paths to all_fixpath_prefixes!
42450  else
42451    # Not in mixed or Windows style, start by that.
42452    new_path=`cmd //c echo $new_path`
42453
42454  input_path="$new_path"
42455  # Check if we need to convert this using DOS-style short mode. If the path
42456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42457  # take no chances and rewrite it.
42458  # Note: m4 eats our [], so we need to use [ and ] instead.
42459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42460  if test "x$has_forbidden_chars" != x; then
42461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42463  fi
42464
42465    # Output is in $new_path
42466
42467  windows_path="$new_path"
42468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42469    unix_path=`$CYGPATH -u "$windows_path"`
42470    new_path="$unix_path"
42471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42473    new_path="$unix_path"
42474  fi
42475
42476    # remove trailing .exe if any
42477    new_path="${new_path/%.exe/}"
42478
42479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42481  fi
42482
42483    else
42484      # We're on a unix platform. Hooray! :)
42485      # First separate the path from the arguments. This will split at the first
42486      # space.
42487      complete="$NM"
42488      path="${complete%% *}"
42489      tmp="$complete EOL"
42490      arguments="${tmp#* }"
42491
42492      # Cannot rely on the command "which" here since it doesn't always work.
42493      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42494      if test -z "$is_absolute_path"; then
42495        # Path to executable is not absolute. Find it.
42496        IFS_save="$IFS"
42497        IFS=:
42498        for p in $PATH; do
42499          if test -f "$p/$path" && test -x "$p/$path"; then
42500            new_path="$p/$path"
42501            break
42502          fi
42503        done
42504        IFS="$IFS_save"
42505      else
42506        # This is an absolute path, we can use it without further modifications.
42507        new_path="$path"
42508      fi
42509
42510      if test "x$new_path" = x; then
42511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42512$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42513        has_space=`$ECHO "$complete" | $GREP " "`
42514        if test "x$has_space" != x; then
42515          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42516$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42517        fi
42518        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42519      fi
42520    fi
42521
42522    # Now join together the path and the arguments once again
42523    if test "x$arguments" != xEOL; then
42524      new_complete="$new_path ${arguments% *}"
42525    else
42526      new_complete="$new_path"
42527    fi
42528
42529    if test "x$complete" != "x$new_complete"; then
42530      NM="$new_complete"
42531      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42532$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42533    fi
42534  fi
42535
42536    GNM="$NM"
42537
42538  fi
42539
42540  # objcopy is used for moving debug symbols to separate files when
42541  # full debug symbols are enabled.
42542  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42543
42544
42545  # Publish this variable in the help.
42546
42547
42548  if [ -z "${OBJCOPY+x}" ]; then
42549    # The variable is not set by user, try to locate tool using the code snippet
42550    if test -n "$ac_tool_prefix"; then
42551  for ac_prog in gobjcopy objcopy
42552  do
42553    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42554set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42556$as_echo_n "checking for $ac_word... " >&6; }
42557if ${ac_cv_prog_OBJCOPY+:} false; then :
42558  $as_echo_n "(cached) " >&6
42559else
42560  if test -n "$OBJCOPY"; then
42561  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42562else
42563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42564for as_dir in $PATH
42565do
42566  IFS=$as_save_IFS
42567  test -z "$as_dir" && as_dir=.
42568    for ac_exec_ext in '' $ac_executable_extensions; do
42569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42570    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42572    break 2
42573  fi
42574done
42575  done
42576IFS=$as_save_IFS
42577
42578fi
42579fi
42580OBJCOPY=$ac_cv_prog_OBJCOPY
42581if test -n "$OBJCOPY"; then
42582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42583$as_echo "$OBJCOPY" >&6; }
42584else
42585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42586$as_echo "no" >&6; }
42587fi
42588
42589
42590    test -n "$OBJCOPY" && break
42591  done
42592fi
42593if test -z "$OBJCOPY"; then
42594  ac_ct_OBJCOPY=$OBJCOPY
42595  for ac_prog in gobjcopy objcopy
42596do
42597  # Extract the first word of "$ac_prog", so it can be a program name with args.
42598set dummy $ac_prog; ac_word=$2
42599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42600$as_echo_n "checking for $ac_word... " >&6; }
42601if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42602  $as_echo_n "(cached) " >&6
42603else
42604  if test -n "$ac_ct_OBJCOPY"; then
42605  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42606else
42607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42608for as_dir in $PATH
42609do
42610  IFS=$as_save_IFS
42611  test -z "$as_dir" && as_dir=.
42612    for ac_exec_ext in '' $ac_executable_extensions; do
42613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42614    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42616    break 2
42617  fi
42618done
42619  done
42620IFS=$as_save_IFS
42621
42622fi
42623fi
42624ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42625if test -n "$ac_ct_OBJCOPY"; then
42626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42627$as_echo "$ac_ct_OBJCOPY" >&6; }
42628else
42629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42630$as_echo "no" >&6; }
42631fi
42632
42633
42634  test -n "$ac_ct_OBJCOPY" && break
42635done
42636
42637  if test "x$ac_ct_OBJCOPY" = x; then
42638    OBJCOPY=""
42639  else
42640    case $cross_compiling:$ac_tool_warned in
42641yes:)
42642{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42643$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42644ac_tool_warned=yes ;;
42645esac
42646    OBJCOPY=$ac_ct_OBJCOPY
42647  fi
42648fi
42649
42650  else
42651    # The variable is set, but is it from the command line or the environment?
42652
42653    # Try to remove the string !OBJCOPY! from our list.
42654    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42655    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42656      # If it failed, the variable was not from the command line. Ignore it,
42657      # but warn the user (except for BASH, which is always set by the calling BASH).
42658      if test "xOBJCOPY" != xBASH; then
42659        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42660$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42661      fi
42662      # Try to locate tool using the code snippet
42663      if test -n "$ac_tool_prefix"; then
42664  for ac_prog in gobjcopy objcopy
42665  do
42666    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42667set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42669$as_echo_n "checking for $ac_word... " >&6; }
42670if ${ac_cv_prog_OBJCOPY+:} false; then :
42671  $as_echo_n "(cached) " >&6
42672else
42673  if test -n "$OBJCOPY"; then
42674  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42675else
42676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42677for as_dir in $PATH
42678do
42679  IFS=$as_save_IFS
42680  test -z "$as_dir" && as_dir=.
42681    for ac_exec_ext in '' $ac_executable_extensions; do
42682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42683    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42685    break 2
42686  fi
42687done
42688  done
42689IFS=$as_save_IFS
42690
42691fi
42692fi
42693OBJCOPY=$ac_cv_prog_OBJCOPY
42694if test -n "$OBJCOPY"; then
42695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42696$as_echo "$OBJCOPY" >&6; }
42697else
42698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42699$as_echo "no" >&6; }
42700fi
42701
42702
42703    test -n "$OBJCOPY" && break
42704  done
42705fi
42706if test -z "$OBJCOPY"; then
42707  ac_ct_OBJCOPY=$OBJCOPY
42708  for ac_prog in gobjcopy objcopy
42709do
42710  # Extract the first word of "$ac_prog", so it can be a program name with args.
42711set dummy $ac_prog; ac_word=$2
42712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42713$as_echo_n "checking for $ac_word... " >&6; }
42714if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42715  $as_echo_n "(cached) " >&6
42716else
42717  if test -n "$ac_ct_OBJCOPY"; then
42718  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42719else
42720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42721for as_dir in $PATH
42722do
42723  IFS=$as_save_IFS
42724  test -z "$as_dir" && as_dir=.
42725    for ac_exec_ext in '' $ac_executable_extensions; do
42726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42727    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42729    break 2
42730  fi
42731done
42732  done
42733IFS=$as_save_IFS
42734
42735fi
42736fi
42737ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42738if test -n "$ac_ct_OBJCOPY"; then
42739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42740$as_echo "$ac_ct_OBJCOPY" >&6; }
42741else
42742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42743$as_echo "no" >&6; }
42744fi
42745
42746
42747  test -n "$ac_ct_OBJCOPY" && break
42748done
42749
42750  if test "x$ac_ct_OBJCOPY" = x; then
42751    OBJCOPY=""
42752  else
42753    case $cross_compiling:$ac_tool_warned in
42754yes:)
42755{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42756$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42757ac_tool_warned=yes ;;
42758esac
42759    OBJCOPY=$ac_ct_OBJCOPY
42760  fi
42761fi
42762
42763    else
42764      # If it succeeded, then it was overridden by the user. We will use it
42765      # for the tool.
42766
42767      # First remove it from the list of overridden variables, so we can test
42768      # for unknown variables in the end.
42769      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42770
42771      # Check if we try to supply an empty value
42772      if test "x$OBJCOPY" = x; then
42773        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42774$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42776$as_echo_n "checking for OBJCOPY... " >&6; }
42777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42778$as_echo "disabled" >&6; }
42779      else
42780        # Check if the provided tool contains a complete path.
42781        tool_specified="$OBJCOPY"
42782        tool_basename="${tool_specified##*/}"
42783        if test "x$tool_basename" = "x$tool_specified"; then
42784          # A command without a complete path is provided, search $PATH.
42785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42786$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42787          # Extract the first word of "$tool_basename", so it can be a program name with args.
42788set dummy $tool_basename; ac_word=$2
42789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42790$as_echo_n "checking for $ac_word... " >&6; }
42791if ${ac_cv_path_OBJCOPY+:} false; then :
42792  $as_echo_n "(cached) " >&6
42793else
42794  case $OBJCOPY in
42795  [\\/]* | ?:[\\/]*)
42796  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42797  ;;
42798  *)
42799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42800for as_dir in $PATH
42801do
42802  IFS=$as_save_IFS
42803  test -z "$as_dir" && as_dir=.
42804    for ac_exec_ext in '' $ac_executable_extensions; do
42805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42806    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42808    break 2
42809  fi
42810done
42811  done
42812IFS=$as_save_IFS
42813
42814  ;;
42815esac
42816fi
42817OBJCOPY=$ac_cv_path_OBJCOPY
42818if test -n "$OBJCOPY"; then
42819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42820$as_echo "$OBJCOPY" >&6; }
42821else
42822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42823$as_echo "no" >&6; }
42824fi
42825
42826
42827          if test "x$OBJCOPY" = x; then
42828            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42829          fi
42830        else
42831          # Otherwise we believe it is a complete path. Use it as it is.
42832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42833$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42834          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42835$as_echo_n "checking for OBJCOPY... " >&6; }
42836          if test ! -x "$tool_specified"; then
42837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42838$as_echo "not found" >&6; }
42839            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42840          fi
42841          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42842$as_echo "$tool_specified" >&6; }
42843        fi
42844      fi
42845    fi
42846
42847  fi
42848
42849
42850    # Only call fixup if objcopy was found.
42851    if test -n "$OBJCOPY"; then
42852
42853  # Only process if variable expands to non-empty
42854
42855  if test "x$OBJCOPY" != x; then
42856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42857
42858  # First separate the path from the arguments. This will split at the first
42859  # space.
42860  complete="$OBJCOPY"
42861  path="${complete%% *}"
42862  tmp="$complete EOL"
42863  arguments="${tmp#* }"
42864
42865  # Input might be given as Windows format, start by converting to
42866  # unix format.
42867  new_path=`$CYGPATH -u "$path"`
42868
42869  # Now try to locate executable using which
42870  new_path=`$WHICH "$new_path" 2> /dev/null`
42871  # bat and cmd files are not always considered executable in cygwin causing which
42872  # to not find them
42873  if test "x$new_path" = x \
42874      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42875      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42876    new_path=`$CYGPATH -u "$path"`
42877  fi
42878  if test "x$new_path" = x; then
42879    # Oops. Which didn't find the executable.
42880    # The splitting of arguments from the executable at a space might have been incorrect,
42881    # since paths with space are more likely in Windows. Give it another try with the whole
42882    # argument.
42883    path="$complete"
42884    arguments="EOL"
42885    new_path=`$CYGPATH -u "$path"`
42886    new_path=`$WHICH "$new_path" 2> /dev/null`
42887    # bat and cmd files are not always considered executable in cygwin causing which
42888    # to not find them
42889    if test "x$new_path" = x \
42890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42892      new_path=`$CYGPATH -u "$path"`
42893    fi
42894    if test "x$new_path" = x; then
42895      # It's still not found. Now this is an unrecoverable error.
42896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42897$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42898      has_space=`$ECHO "$complete" | $GREP " "`
42899      if test "x$has_space" != x; then
42900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42902      fi
42903      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42904    fi
42905  fi
42906
42907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42910  # "foo.exe" is OK but "foo" is an error.
42911  #
42912  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42913  # It is also a way to make sure we got the proper file name for the real test later on.
42914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42915  if test "x$test_shortpath" = x; then
42916    # Short path failed, file does not exist as specified.
42917    # Try adding .exe or .cmd
42918    if test -f "${new_path}.exe"; then
42919      input_to_shortpath="${new_path}.exe"
42920    elif test -f "${new_path}.cmd"; then
42921      input_to_shortpath="${new_path}.cmd"
42922    else
42923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42924$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42925      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42926$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42927      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42928    fi
42929  else
42930    input_to_shortpath="$new_path"
42931  fi
42932
42933  # Call helper function which possibly converts this using DOS-style short mode.
42934  # If so, the updated path is stored in $new_path.
42935  new_path="$input_to_shortpath"
42936
42937  input_path="$input_to_shortpath"
42938  # Check if we need to convert this using DOS-style short mode. If the path
42939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42940  # take no chances and rewrite it.
42941  # Note: m4 eats our [], so we need to use [ and ] instead.
42942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42943  if test "x$has_forbidden_chars" != x; then
42944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42948      # Going to short mode and back again did indeed matter. Since short mode is
42949      # case insensitive, let's make it lowercase to improve readability.
42950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42951      # Now convert it back to Unix-style (cygpath)
42952      input_path=`$CYGPATH -u "$shortmode_path"`
42953      new_path="$input_path"
42954    fi
42955  fi
42956
42957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42958  if test "x$test_cygdrive_prefix" = x; then
42959    # As a simple fix, exclude /usr/bin since it's not a real path.
42960    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42962      # a path prefixed by /cygdrive for fixpath to work.
42963      new_path="$CYGWIN_ROOT_PATH$input_path"
42964    fi
42965  fi
42966
42967  # remove trailing .exe if any
42968  new_path="${new_path/%.exe/}"
42969
42970    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42971
42972  # First separate the path from the arguments. This will split at the first
42973  # space.
42974  complete="$OBJCOPY"
42975  path="${complete%% *}"
42976  tmp="$complete EOL"
42977  arguments="${tmp#* }"
42978
42979  # Input might be given as Windows format, start by converting to
42980  # unix format.
42981  new_path="$path"
42982
42983  windows_path="$new_path"
42984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42985    unix_path=`$CYGPATH -u "$windows_path"`
42986    new_path="$unix_path"
42987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42989    new_path="$unix_path"
42990  fi
42991
42992
42993  # Now try to locate executable using which
42994  new_path=`$WHICH "$new_path" 2> /dev/null`
42995
42996  if test "x$new_path" = x; then
42997    # Oops. Which didn't find the executable.
42998    # The splitting of arguments from the executable at a space might have been incorrect,
42999    # since paths with space are more likely in Windows. Give it another try with the whole
43000    # argument.
43001    path="$complete"
43002    arguments="EOL"
43003    new_path="$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
43015    new_path=`$WHICH "$new_path" 2> /dev/null`
43016    # bat and cmd files are not always considered executable in MSYS causing which
43017    # to not find them
43018    if test "x$new_path" = x \
43019        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43020        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43021      new_path="$path"
43022
43023  windows_path="$new_path"
43024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43025    unix_path=`$CYGPATH -u "$windows_path"`
43026    new_path="$unix_path"
43027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43029    new_path="$unix_path"
43030  fi
43031
43032    fi
43033
43034    if test "x$new_path" = x; then
43035      # It's still not found. Now this is an unrecoverable error.
43036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43037$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43038      has_space=`$ECHO "$complete" | $GREP " "`
43039      if test "x$has_space" != x; then
43040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43042      fi
43043      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43044    fi
43045  fi
43046
43047  # Now new_path has a complete unix path to the binary
43048  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43049    # Keep paths in /bin as-is, but remove trailing .exe if any
43050    new_path="${new_path/%.exe/}"
43051    # Do not save /bin paths to all_fixpath_prefixes!
43052  else
43053    # Not in mixed or Windows style, start by that.
43054    new_path=`cmd //c echo $new_path`
43055
43056  input_path="$new_path"
43057  # Check if we need to convert this using DOS-style short mode. If the path
43058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43059  # take no chances and rewrite it.
43060  # Note: m4 eats our [], so we need to use [ and ] instead.
43061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43062  if test "x$has_forbidden_chars" != x; then
43063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43065  fi
43066
43067    # Output is in $new_path
43068
43069  windows_path="$new_path"
43070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43071    unix_path=`$CYGPATH -u "$windows_path"`
43072    new_path="$unix_path"
43073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43075    new_path="$unix_path"
43076  fi
43077
43078    # remove trailing .exe if any
43079    new_path="${new_path/%.exe/}"
43080
43081    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43082    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43083  fi
43084
43085    else
43086      # We're on a unix platform. Hooray! :)
43087      # First separate the path from the arguments. This will split at the first
43088      # space.
43089      complete="$OBJCOPY"
43090      path="${complete%% *}"
43091      tmp="$complete EOL"
43092      arguments="${tmp#* }"
43093
43094      # Cannot rely on the command "which" here since it doesn't always work.
43095      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43096      if test -z "$is_absolute_path"; then
43097        # Path to executable is not absolute. Find it.
43098        IFS_save="$IFS"
43099        IFS=:
43100        for p in $PATH; do
43101          if test -f "$p/$path" && test -x "$p/$path"; then
43102            new_path="$p/$path"
43103            break
43104          fi
43105        done
43106        IFS="$IFS_save"
43107      else
43108        # This is an absolute path, we can use it without further modifications.
43109        new_path="$path"
43110      fi
43111
43112      if test "x$new_path" = x; then
43113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43114$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43115        has_space=`$ECHO "$complete" | $GREP " "`
43116        if test "x$has_space" != x; then
43117          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43118$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43119        fi
43120        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43121      fi
43122    fi
43123
43124    # Now join together the path and the arguments once again
43125    if test "x$arguments" != xEOL; then
43126      new_complete="$new_path ${arguments% *}"
43127    else
43128      new_complete="$new_path"
43129    fi
43130
43131    if test "x$complete" != "x$new_complete"; then
43132      OBJCOPY="$new_complete"
43133      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43134$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43135    fi
43136  fi
43137
43138      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43139        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43140        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43141        # - version number is last blank separate word on first line
43142        # - version number formats that have been seen:
43143        #   - <major>.<minor>
43144        #   - <major>.<minor>.<micro>
43145        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43146        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43147         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43148              -e 's/.* //' \
43149              -e '/^[01]\./b bad' \
43150              -e '/^2\./{' \
43151              -e '  s/^2\.//' \
43152              -e '  /^[0-9]$/b bad' \
43153              -e '  /^[0-9]\./b bad' \
43154              -e '  /^1[0-9]$/b bad' \
43155              -e '  /^1[0-9]\./b bad' \
43156              -e '  /^20\./b bad' \
43157              -e '  /^21\.0$/b bad' \
43158              -e '  /^21\.0\./b bad' \
43159              -e '}' \
43160              -e ':good' \
43161              -e 's/.*/VALID_VERSION/p' \
43162              -e 'q' \
43163              -e ':bad' \
43164              -e 's/.*/BAD_VERSION/p' \
43165              -e 'q'`
43166        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43167          OBJCOPY=
43168          { $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
43169$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43170          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43171$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43172          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43173$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43174          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43175$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43176          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43177$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43178        fi
43179      fi
43180    fi
43181  fi
43182
43183
43184
43185  # Publish this variable in the help.
43186
43187
43188  if [ -z "${OBJDUMP+x}" ]; then
43189    # The variable is not set by user, try to locate tool using the code snippet
43190    if test -n "$ac_tool_prefix"; then
43191  for ac_prog in gobjdump objdump
43192  do
43193    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43194set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43196$as_echo_n "checking for $ac_word... " >&6; }
43197if ${ac_cv_prog_OBJDUMP+:} false; then :
43198  $as_echo_n "(cached) " >&6
43199else
43200  if test -n "$OBJDUMP"; then
43201  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43202else
43203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43204for as_dir in $PATH
43205do
43206  IFS=$as_save_IFS
43207  test -z "$as_dir" && as_dir=.
43208    for ac_exec_ext in '' $ac_executable_extensions; do
43209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43210    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43212    break 2
43213  fi
43214done
43215  done
43216IFS=$as_save_IFS
43217
43218fi
43219fi
43220OBJDUMP=$ac_cv_prog_OBJDUMP
43221if test -n "$OBJDUMP"; then
43222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43223$as_echo "$OBJDUMP" >&6; }
43224else
43225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43226$as_echo "no" >&6; }
43227fi
43228
43229
43230    test -n "$OBJDUMP" && break
43231  done
43232fi
43233if test -z "$OBJDUMP"; then
43234  ac_ct_OBJDUMP=$OBJDUMP
43235  for ac_prog in gobjdump objdump
43236do
43237  # Extract the first word of "$ac_prog", so it can be a program name with args.
43238set dummy $ac_prog; ac_word=$2
43239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43240$as_echo_n "checking for $ac_word... " >&6; }
43241if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43242  $as_echo_n "(cached) " >&6
43243else
43244  if test -n "$ac_ct_OBJDUMP"; then
43245  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43246else
43247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43248for as_dir in $PATH
43249do
43250  IFS=$as_save_IFS
43251  test -z "$as_dir" && as_dir=.
43252    for ac_exec_ext in '' $ac_executable_extensions; do
43253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43254    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43256    break 2
43257  fi
43258done
43259  done
43260IFS=$as_save_IFS
43261
43262fi
43263fi
43264ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43265if test -n "$ac_ct_OBJDUMP"; then
43266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43267$as_echo "$ac_ct_OBJDUMP" >&6; }
43268else
43269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43270$as_echo "no" >&6; }
43271fi
43272
43273
43274  test -n "$ac_ct_OBJDUMP" && break
43275done
43276
43277  if test "x$ac_ct_OBJDUMP" = x; then
43278    OBJDUMP=""
43279  else
43280    case $cross_compiling:$ac_tool_warned in
43281yes:)
43282{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43283$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43284ac_tool_warned=yes ;;
43285esac
43286    OBJDUMP=$ac_ct_OBJDUMP
43287  fi
43288fi
43289
43290  else
43291    # The variable is set, but is it from the command line or the environment?
43292
43293    # Try to remove the string !OBJDUMP! from our list.
43294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43296      # If it failed, the variable was not from the command line. Ignore it,
43297      # but warn the user (except for BASH, which is always set by the calling BASH).
43298      if test "xOBJDUMP" != xBASH; then
43299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43300$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43301      fi
43302      # Try to locate tool using the code snippet
43303      if test -n "$ac_tool_prefix"; then
43304  for ac_prog in gobjdump objdump
43305  do
43306    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43307set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43309$as_echo_n "checking for $ac_word... " >&6; }
43310if ${ac_cv_prog_OBJDUMP+:} false; then :
43311  $as_echo_n "(cached) " >&6
43312else
43313  if test -n "$OBJDUMP"; then
43314  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43315else
43316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43317for as_dir in $PATH
43318do
43319  IFS=$as_save_IFS
43320  test -z "$as_dir" && as_dir=.
43321    for ac_exec_ext in '' $ac_executable_extensions; do
43322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43323    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43325    break 2
43326  fi
43327done
43328  done
43329IFS=$as_save_IFS
43330
43331fi
43332fi
43333OBJDUMP=$ac_cv_prog_OBJDUMP
43334if test -n "$OBJDUMP"; then
43335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43336$as_echo "$OBJDUMP" >&6; }
43337else
43338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43339$as_echo "no" >&6; }
43340fi
43341
43342
43343    test -n "$OBJDUMP" && break
43344  done
43345fi
43346if test -z "$OBJDUMP"; then
43347  ac_ct_OBJDUMP=$OBJDUMP
43348  for ac_prog in gobjdump objdump
43349do
43350  # Extract the first word of "$ac_prog", so it can be a program name with args.
43351set dummy $ac_prog; ac_word=$2
43352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43353$as_echo_n "checking for $ac_word... " >&6; }
43354if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43355  $as_echo_n "(cached) " >&6
43356else
43357  if test -n "$ac_ct_OBJDUMP"; then
43358  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43359else
43360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43361for as_dir in $PATH
43362do
43363  IFS=$as_save_IFS
43364  test -z "$as_dir" && as_dir=.
43365    for ac_exec_ext in '' $ac_executable_extensions; do
43366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43367    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43369    break 2
43370  fi
43371done
43372  done
43373IFS=$as_save_IFS
43374
43375fi
43376fi
43377ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43378if test -n "$ac_ct_OBJDUMP"; then
43379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43380$as_echo "$ac_ct_OBJDUMP" >&6; }
43381else
43382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43383$as_echo "no" >&6; }
43384fi
43385
43386
43387  test -n "$ac_ct_OBJDUMP" && break
43388done
43389
43390  if test "x$ac_ct_OBJDUMP" = x; then
43391    OBJDUMP=""
43392  else
43393    case $cross_compiling:$ac_tool_warned in
43394yes:)
43395{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43396$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43397ac_tool_warned=yes ;;
43398esac
43399    OBJDUMP=$ac_ct_OBJDUMP
43400  fi
43401fi
43402
43403    else
43404      # If it succeeded, then it was overridden by the user. We will use it
43405      # for the tool.
43406
43407      # First remove it from the list of overridden variables, so we can test
43408      # for unknown variables in the end.
43409      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43410
43411      # Check if we try to supply an empty value
43412      if test "x$OBJDUMP" = x; then
43413        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43414$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43416$as_echo_n "checking for OBJDUMP... " >&6; }
43417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43418$as_echo "disabled" >&6; }
43419      else
43420        # Check if the provided tool contains a complete path.
43421        tool_specified="$OBJDUMP"
43422        tool_basename="${tool_specified##*/}"
43423        if test "x$tool_basename" = "x$tool_specified"; then
43424          # A command without a complete path is provided, search $PATH.
43425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43426$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43427          # Extract the first word of "$tool_basename", so it can be a program name with args.
43428set dummy $tool_basename; ac_word=$2
43429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43430$as_echo_n "checking for $ac_word... " >&6; }
43431if ${ac_cv_path_OBJDUMP+:} false; then :
43432  $as_echo_n "(cached) " >&6
43433else
43434  case $OBJDUMP in
43435  [\\/]* | ?:[\\/]*)
43436  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43437  ;;
43438  *)
43439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43440for as_dir in $PATH
43441do
43442  IFS=$as_save_IFS
43443  test -z "$as_dir" && as_dir=.
43444    for ac_exec_ext in '' $ac_executable_extensions; do
43445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43446    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43448    break 2
43449  fi
43450done
43451  done
43452IFS=$as_save_IFS
43453
43454  ;;
43455esac
43456fi
43457OBJDUMP=$ac_cv_path_OBJDUMP
43458if test -n "$OBJDUMP"; then
43459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43460$as_echo "$OBJDUMP" >&6; }
43461else
43462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43463$as_echo "no" >&6; }
43464fi
43465
43466
43467          if test "x$OBJDUMP" = x; then
43468            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43469          fi
43470        else
43471          # Otherwise we believe it is a complete path. Use it as it is.
43472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43473$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43474          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43475$as_echo_n "checking for OBJDUMP... " >&6; }
43476          if test ! -x "$tool_specified"; then
43477            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43478$as_echo "not found" >&6; }
43479            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43480          fi
43481          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43482$as_echo "$tool_specified" >&6; }
43483        fi
43484      fi
43485    fi
43486
43487  fi
43488
43489
43490  if test "x$OBJDUMP" != x; then
43491    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43492    # bails if argument is missing.
43493
43494  # Only process if variable expands to non-empty
43495
43496  if test "x$OBJDUMP" != x; then
43497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43498
43499  # First separate the path from the arguments. This will split at the first
43500  # space.
43501  complete="$OBJDUMP"
43502  path="${complete%% *}"
43503  tmp="$complete EOL"
43504  arguments="${tmp#* }"
43505
43506  # Input might be given as Windows format, start by converting to
43507  # unix format.
43508  new_path=`$CYGPATH -u "$path"`
43509
43510  # Now try to locate executable using which
43511  new_path=`$WHICH "$new_path" 2> /dev/null`
43512  # bat and cmd files are not always considered executable in cygwin causing which
43513  # to not find them
43514  if test "x$new_path" = x \
43515      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43516      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43517    new_path=`$CYGPATH -u "$path"`
43518  fi
43519  if test "x$new_path" = x; then
43520    # Oops. Which didn't find the executable.
43521    # The splitting of arguments from the executable at a space might have been incorrect,
43522    # since paths with space are more likely in Windows. Give it another try with the whole
43523    # argument.
43524    path="$complete"
43525    arguments="EOL"
43526    new_path=`$CYGPATH -u "$path"`
43527    new_path=`$WHICH "$new_path" 2> /dev/null`
43528    # bat and cmd files are not always considered executable in cygwin causing which
43529    # to not find them
43530    if test "x$new_path" = x \
43531        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43532        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43533      new_path=`$CYGPATH -u "$path"`
43534    fi
43535    if test "x$new_path" = x; then
43536      # It's still not found. Now this is an unrecoverable error.
43537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43538$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43539      has_space=`$ECHO "$complete" | $GREP " "`
43540      if test "x$has_space" != x; then
43541        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43542$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43543      fi
43544      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43545    fi
43546  fi
43547
43548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43551  # "foo.exe" is OK but "foo" is an error.
43552  #
43553  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43554  # It is also a way to make sure we got the proper file name for the real test later on.
43555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43556  if test "x$test_shortpath" = x; then
43557    # Short path failed, file does not exist as specified.
43558    # Try adding .exe or .cmd
43559    if test -f "${new_path}.exe"; then
43560      input_to_shortpath="${new_path}.exe"
43561    elif test -f "${new_path}.cmd"; then
43562      input_to_shortpath="${new_path}.cmd"
43563    else
43564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43565$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43566      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43567$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43568      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43569    fi
43570  else
43571    input_to_shortpath="$new_path"
43572  fi
43573
43574  # Call helper function which possibly converts this using DOS-style short mode.
43575  # If so, the updated path is stored in $new_path.
43576  new_path="$input_to_shortpath"
43577
43578  input_path="$input_to_shortpath"
43579  # Check if we need to convert this using DOS-style short mode. If the path
43580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43581  # take no chances and rewrite it.
43582  # Note: m4 eats our [], so we need to use [ and ] instead.
43583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43584  if test "x$has_forbidden_chars" != x; then
43585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43589      # Going to short mode and back again did indeed matter. Since short mode is
43590      # case insensitive, let's make it lowercase to improve readability.
43591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43592      # Now convert it back to Unix-style (cygpath)
43593      input_path=`$CYGPATH -u "$shortmode_path"`
43594      new_path="$input_path"
43595    fi
43596  fi
43597
43598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43599  if test "x$test_cygdrive_prefix" = x; then
43600    # As a simple fix, exclude /usr/bin since it's not a real path.
43601    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43603      # a path prefixed by /cygdrive for fixpath to work.
43604      new_path="$CYGWIN_ROOT_PATH$input_path"
43605    fi
43606  fi
43607
43608  # remove trailing .exe if any
43609  new_path="${new_path/%.exe/}"
43610
43611    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43612
43613  # First separate the path from the arguments. This will split at the first
43614  # space.
43615  complete="$OBJDUMP"
43616  path="${complete%% *}"
43617  tmp="$complete EOL"
43618  arguments="${tmp#* }"
43619
43620  # Input might be given as Windows format, start by converting to
43621  # unix format.
43622  new_path="$path"
43623
43624  windows_path="$new_path"
43625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43626    unix_path=`$CYGPATH -u "$windows_path"`
43627    new_path="$unix_path"
43628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43630    new_path="$unix_path"
43631  fi
43632
43633
43634  # Now try to locate executable using which
43635  new_path=`$WHICH "$new_path" 2> /dev/null`
43636
43637  if test "x$new_path" = x; then
43638    # Oops. Which didn't find the executable.
43639    # The splitting of arguments from the executable at a space might have been incorrect,
43640    # since paths with space are more likely in Windows. Give it another try with the whole
43641    # argument.
43642    path="$complete"
43643    arguments="EOL"
43644    new_path="$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
43656    new_path=`$WHICH "$new_path" 2> /dev/null`
43657    # bat and cmd files are not always considered executable in MSYS causing which
43658    # to not find them
43659    if test "x$new_path" = x \
43660        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43661        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43662      new_path="$path"
43663
43664  windows_path="$new_path"
43665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43666    unix_path=`$CYGPATH -u "$windows_path"`
43667    new_path="$unix_path"
43668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43670    new_path="$unix_path"
43671  fi
43672
43673    fi
43674
43675    if test "x$new_path" = x; then
43676      # It's still not found. Now this is an unrecoverable error.
43677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43678$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43679      has_space=`$ECHO "$complete" | $GREP " "`
43680      if test "x$has_space" != x; then
43681        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43683      fi
43684      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43685    fi
43686  fi
43687
43688  # Now new_path has a complete unix path to the binary
43689  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43690    # Keep paths in /bin as-is, but remove trailing .exe if any
43691    new_path="${new_path/%.exe/}"
43692    # Do not save /bin paths to all_fixpath_prefixes!
43693  else
43694    # Not in mixed or Windows style, start by that.
43695    new_path=`cmd //c echo $new_path`
43696
43697  input_path="$new_path"
43698  # Check if we need to convert this using DOS-style short mode. If the path
43699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43700  # take no chances and rewrite it.
43701  # Note: m4 eats our [], so we need to use [ and ] instead.
43702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43703  if test "x$has_forbidden_chars" != x; then
43704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43706  fi
43707
43708    # Output is in $new_path
43709
43710  windows_path="$new_path"
43711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43712    unix_path=`$CYGPATH -u "$windows_path"`
43713    new_path="$unix_path"
43714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43716    new_path="$unix_path"
43717  fi
43718
43719    # remove trailing .exe if any
43720    new_path="${new_path/%.exe/}"
43721
43722    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43723    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43724  fi
43725
43726    else
43727      # We're on a unix platform. Hooray! :)
43728      # First separate the path from the arguments. This will split at the first
43729      # space.
43730      complete="$OBJDUMP"
43731      path="${complete%% *}"
43732      tmp="$complete EOL"
43733      arguments="${tmp#* }"
43734
43735      # Cannot rely on the command "which" here since it doesn't always work.
43736      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43737      if test -z "$is_absolute_path"; then
43738        # Path to executable is not absolute. Find it.
43739        IFS_save="$IFS"
43740        IFS=:
43741        for p in $PATH; do
43742          if test -f "$p/$path" && test -x "$p/$path"; then
43743            new_path="$p/$path"
43744            break
43745          fi
43746        done
43747        IFS="$IFS_save"
43748      else
43749        # This is an absolute path, we can use it without further modifications.
43750        new_path="$path"
43751      fi
43752
43753      if test "x$new_path" = x; then
43754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43755$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43756        has_space=`$ECHO "$complete" | $GREP " "`
43757        if test "x$has_space" != x; then
43758          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43759$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43760        fi
43761        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43762      fi
43763    fi
43764
43765    # Now join together the path and the arguments once again
43766    if test "x$arguments" != xEOL; then
43767      new_complete="$new_path ${arguments% *}"
43768    else
43769      new_complete="$new_path"
43770    fi
43771
43772    if test "x$complete" != "x$new_complete"; then
43773      OBJDUMP="$new_complete"
43774      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43775$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43776    fi
43777  fi
43778
43779  fi
43780
43781
43782  # Restore old path.
43783  PATH="$OLD_PATH"
43784
43785  # Restore the flags to the user specified values.
43786  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43787  CFLAGS="$ORG_CFLAGS"
43788  CXXFLAGS="$ORG_CXXFLAGS"
43789
43790
43791# Finally do some processing after the detection phase
43792
43793  if test "x$COMPILE_TYPE" = "xcross"; then
43794    # Now we need to find a C/C++ compiler that can build executables for the
43795    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43796    # used once. Also, we need to do this without adding a tools dir to the
43797    # path, otherwise we might pick up cross-compilers which don't use standard
43798    # naming.
43799
43800    OLDPATH="$PATH"
43801
43802
43803# Check whether --with-build-devkit was given.
43804if test "${with_build_devkit+set}" = set; then :
43805  withval=$with_build_devkit;
43806fi
43807
43808    if test "x$with_build_devkit" = "xyes"; then
43809      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43810    elif test -n "$with_build_devkit"; then
43811      if test ! -d "$with_build_devkit"; then
43812        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43813      else
43814
43815  # Only process if variable expands to non-empty
43816
43817  if test "x$with_build_devkit" != x; then
43818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43819
43820  # Input might be given as Windows format, start by converting to
43821  # unix format.
43822  path="$with_build_devkit"
43823  new_path=`$CYGPATH -u "$path"`
43824
43825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43828  # "foo.exe" is OK but "foo" is an error.
43829  #
43830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43831  # It is also a way to make sure we got the proper file name for the real test later on.
43832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43833  if test "x$test_shortpath" = x; then
43834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43835$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43836    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43837  fi
43838
43839  # Call helper function which possibly converts this using DOS-style short mode.
43840  # If so, the updated path is stored in $new_path.
43841
43842  input_path="$new_path"
43843  # Check if we need to convert this using DOS-style short mode. If the path
43844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43845  # take no chances and rewrite it.
43846  # Note: m4 eats our [], so we need to use [ and ] instead.
43847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43848  if test "x$has_forbidden_chars" != x; then
43849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43853      # Going to short mode and back again did indeed matter. Since short mode is
43854      # case insensitive, let's make it lowercase to improve readability.
43855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43856      # Now convert it back to Unix-style (cygpath)
43857      input_path=`$CYGPATH -u "$shortmode_path"`
43858      new_path="$input_path"
43859    fi
43860  fi
43861
43862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43863  if test "x$test_cygdrive_prefix" = x; then
43864    # As a simple fix, exclude /usr/bin since it's not a real path.
43865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43867      # a path prefixed by /cygdrive for fixpath to work.
43868      new_path="$CYGWIN_ROOT_PATH$input_path"
43869    fi
43870  fi
43871
43872
43873  if test "x$path" != "x$new_path"; then
43874    with_build_devkit="$new_path"
43875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43876$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43877  fi
43878
43879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43880
43881  path="$with_build_devkit"
43882  has_colon=`$ECHO $path | $GREP ^.:`
43883  new_path="$path"
43884  if test "x$has_colon" = x; then
43885    # Not in mixed or Windows style, start by that.
43886    new_path=`cmd //c echo $path`
43887  fi
43888
43889
43890  input_path="$new_path"
43891  # Check if we need to convert this using DOS-style short mode. If the path
43892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43893  # take no chances and rewrite it.
43894  # Note: m4 eats our [], so we need to use [ and ] instead.
43895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43896  if test "x$has_forbidden_chars" != x; then
43897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43899  fi
43900
43901
43902  windows_path="$new_path"
43903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43904    unix_path=`$CYGPATH -u "$windows_path"`
43905    new_path="$unix_path"
43906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43908    new_path="$unix_path"
43909  fi
43910
43911  if test "x$path" != "x$new_path"; then
43912    with_build_devkit="$new_path"
43913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43914$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43915  fi
43916
43917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43919
43920    else
43921      # We're on a unix platform. Hooray! :)
43922      path="$with_build_devkit"
43923      has_space=`$ECHO "$path" | $GREP " "`
43924      if test "x$has_space" != x; then
43925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43926$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43928      fi
43929
43930      # Use eval to expand a potential ~
43931      eval path="$path"
43932      if test ! -f "$path" && test ! -d "$path"; then
43933        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43934      fi
43935
43936      if test -d "$path"; then
43937        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43938      else
43939        dir="`$DIRNAME "$path"`"
43940        base="`$BASENAME "$path"`"
43941        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43942      fi
43943    fi
43944  fi
43945
43946        BUILD_DEVKIT_ROOT="$with_build_devkit"
43947        # Check for a meta data info file in the root of the devkit
43948        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43949          # Process devkit.info so that existing devkit variables are not
43950          # modified by this
43951          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43952              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43953              -e "s/\$host/\$build/g" \
43954              $BUILD_DEVKIT_ROOT/devkit.info \
43955              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43956          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43957          # This potentially sets the following:
43958          # A descriptive name of the devkit
43959
43960  if test "x$BUILD_DEVKIT_NAME" = x; then
43961    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43962  fi
43963
43964          # Corresponds to --with-extra-path
43965
43966  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43967    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43968  fi
43969
43970          # Corresponds to --with-toolchain-path
43971
43972  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43973    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43974  fi
43975
43976          # Corresponds to --with-sysroot
43977
43978  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43979    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43980  fi
43981
43982          # Skip the Window specific parts
43983        fi
43984
43985        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43986$as_echo_n "checking for build platform devkit... " >&6; }
43987        if test "x$BUILD_DEVKIT_NAME" != x; then
43988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43989$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43990        else
43991          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43992$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43993        fi
43994
43995        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43996
43997  if test "x$BUILD_SYSROOT" != "x"; then
43998    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43999      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44000        # Solaris Studio does not have a concept of sysroot. Instead we must
44001        # make sure the default include and lib dirs are appended to each
44002        # compile and link command line. Must also add -I-xbuiltin to enable
44003        # inlining of system functions and intrinsics.
44004        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44005        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44006            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
44007            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
44008      fi
44009    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44010      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44011      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44012    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44013      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44014      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44015    fi
44016    # Propagate the sysroot args to hotspot
44017    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44018    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44019    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44020    # The global CFLAGS and LDFLAGS variables need these for configure to function
44021    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44022    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44023    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44024    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44025  fi
44026
44027  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44028    # We also need -iframework<path>/System/Library/Frameworks
44029    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44030    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44031    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44032    # set this here so it doesn't have to be peppered throughout the forest
44033    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44034    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44035  fi
44036
44037
44038
44039
44040
44041         # Fallback default of just /bin if DEVKIT_PATH is not defined
44042        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44043          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44044        fi
44045        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44046      fi
44047    fi
44048
44049    # FIXME: we should list the discovered compilers as an exclude pattern!
44050    # If we do that, we can do this detection before POST_DETECTION, and still
44051    # find the build compilers in the tools dir, if needed.
44052
44053
44054
44055  # Publish this variable in the help.
44056
44057
44058  if [ -z "${BUILD_CC+x}" ]; then
44059    # The variable is not set by user, try to locate tool using the code snippet
44060    for ac_prog in cl cc gcc
44061do
44062  # Extract the first word of "$ac_prog", so it can be a program name with args.
44063set dummy $ac_prog; ac_word=$2
44064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44065$as_echo_n "checking for $ac_word... " >&6; }
44066if ${ac_cv_path_BUILD_CC+:} false; then :
44067  $as_echo_n "(cached) " >&6
44068else
44069  case $BUILD_CC in
44070  [\\/]* | ?:[\\/]*)
44071  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44072  ;;
44073  *)
44074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44075for as_dir in $PATH
44076do
44077  IFS=$as_save_IFS
44078  test -z "$as_dir" && as_dir=.
44079    for ac_exec_ext in '' $ac_executable_extensions; do
44080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44081    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44083    break 2
44084  fi
44085done
44086  done
44087IFS=$as_save_IFS
44088
44089  ;;
44090esac
44091fi
44092BUILD_CC=$ac_cv_path_BUILD_CC
44093if test -n "$BUILD_CC"; then
44094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44095$as_echo "$BUILD_CC" >&6; }
44096else
44097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44098$as_echo "no" >&6; }
44099fi
44100
44101
44102  test -n "$BUILD_CC" && break
44103done
44104
44105  else
44106    # The variable is set, but is it from the command line or the environment?
44107
44108    # Try to remove the string !BUILD_CC! from our list.
44109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44111      # If it failed, the variable was not from the command line. Ignore it,
44112      # but warn the user (except for BASH, which is always set by the calling BASH).
44113      if test "xBUILD_CC" != xBASH; then
44114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44115$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44116      fi
44117      # Try to locate tool using the code snippet
44118      for ac_prog in cl cc gcc
44119do
44120  # Extract the first word of "$ac_prog", so it can be a program name with args.
44121set dummy $ac_prog; ac_word=$2
44122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44123$as_echo_n "checking for $ac_word... " >&6; }
44124if ${ac_cv_path_BUILD_CC+:} false; then :
44125  $as_echo_n "(cached) " >&6
44126else
44127  case $BUILD_CC in
44128  [\\/]* | ?:[\\/]*)
44129  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44130  ;;
44131  *)
44132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44133for as_dir in $PATH
44134do
44135  IFS=$as_save_IFS
44136  test -z "$as_dir" && as_dir=.
44137    for ac_exec_ext in '' $ac_executable_extensions; do
44138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44139    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44141    break 2
44142  fi
44143done
44144  done
44145IFS=$as_save_IFS
44146
44147  ;;
44148esac
44149fi
44150BUILD_CC=$ac_cv_path_BUILD_CC
44151if test -n "$BUILD_CC"; then
44152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44153$as_echo "$BUILD_CC" >&6; }
44154else
44155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44156$as_echo "no" >&6; }
44157fi
44158
44159
44160  test -n "$BUILD_CC" && break
44161done
44162
44163    else
44164      # If it succeeded, then it was overridden by the user. We will use it
44165      # for the tool.
44166
44167      # First remove it from the list of overridden variables, so we can test
44168      # for unknown variables in the end.
44169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44170
44171      # Check if we try to supply an empty value
44172      if test "x$BUILD_CC" = x; then
44173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44174$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44176$as_echo_n "checking for BUILD_CC... " >&6; }
44177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44178$as_echo "disabled" >&6; }
44179      else
44180        # Check if the provided tool contains a complete path.
44181        tool_specified="$BUILD_CC"
44182        tool_basename="${tool_specified##*/}"
44183        if test "x$tool_basename" = "x$tool_specified"; then
44184          # A command without a complete path is provided, search $PATH.
44185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44186$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44187          # Extract the first word of "$tool_basename", so it can be a program name with args.
44188set dummy $tool_basename; ac_word=$2
44189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44190$as_echo_n "checking for $ac_word... " >&6; }
44191if ${ac_cv_path_BUILD_CC+:} false; then :
44192  $as_echo_n "(cached) " >&6
44193else
44194  case $BUILD_CC in
44195  [\\/]* | ?:[\\/]*)
44196  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44197  ;;
44198  *)
44199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44200for as_dir in $PATH
44201do
44202  IFS=$as_save_IFS
44203  test -z "$as_dir" && as_dir=.
44204    for ac_exec_ext in '' $ac_executable_extensions; do
44205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44206    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44208    break 2
44209  fi
44210done
44211  done
44212IFS=$as_save_IFS
44213
44214  ;;
44215esac
44216fi
44217BUILD_CC=$ac_cv_path_BUILD_CC
44218if test -n "$BUILD_CC"; then
44219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44220$as_echo "$BUILD_CC" >&6; }
44221else
44222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44223$as_echo "no" >&6; }
44224fi
44225
44226
44227          if test "x$BUILD_CC" = x; then
44228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44229          fi
44230        else
44231          # Otherwise we believe it is a complete path. Use it as it is.
44232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44233$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44235$as_echo_n "checking for BUILD_CC... " >&6; }
44236          if test ! -x "$tool_specified"; then
44237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44238$as_echo "not found" >&6; }
44239            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44240          fi
44241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44242$as_echo "$tool_specified" >&6; }
44243        fi
44244      fi
44245    fi
44246
44247  fi
44248
44249
44250
44251  if test "x$BUILD_CC" = x; then
44252    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44253  fi
44254
44255
44256
44257  # Only process if variable expands to non-empty
44258
44259  if test "x$BUILD_CC" != x; then
44260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44261
44262  # First separate the path from the arguments. This will split at the first
44263  # space.
44264  complete="$BUILD_CC"
44265  path="${complete%% *}"
44266  tmp="$complete EOL"
44267  arguments="${tmp#* }"
44268
44269  # Input might be given as Windows format, start by converting to
44270  # unix format.
44271  new_path=`$CYGPATH -u "$path"`
44272
44273  # Now try to locate executable using which
44274  new_path=`$WHICH "$new_path" 2> /dev/null`
44275  # bat and cmd files are not always considered executable in cygwin causing which
44276  # to not find them
44277  if test "x$new_path" = x \
44278      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44279      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44280    new_path=`$CYGPATH -u "$path"`
44281  fi
44282  if test "x$new_path" = x; then
44283    # Oops. Which didn't find the executable.
44284    # The splitting of arguments from the executable at a space might have been incorrect,
44285    # since paths with space are more likely in Windows. Give it another try with the whole
44286    # argument.
44287    path="$complete"
44288    arguments="EOL"
44289    new_path=`$CYGPATH -u "$path"`
44290    new_path=`$WHICH "$new_path" 2> /dev/null`
44291    # bat and cmd files are not always considered executable in cygwin causing which
44292    # to not find them
44293    if test "x$new_path" = x \
44294        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44295        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44296      new_path=`$CYGPATH -u "$path"`
44297    fi
44298    if test "x$new_path" = x; then
44299      # It's still not found. Now this is an unrecoverable error.
44300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44301$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44302      has_space=`$ECHO "$complete" | $GREP " "`
44303      if test "x$has_space" != x; then
44304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44306      fi
44307      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44308    fi
44309  fi
44310
44311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44314  # "foo.exe" is OK but "foo" is an error.
44315  #
44316  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44317  # It is also a way to make sure we got the proper file name for the real test later on.
44318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44319  if test "x$test_shortpath" = x; then
44320    # Short path failed, file does not exist as specified.
44321    # Try adding .exe or .cmd
44322    if test -f "${new_path}.exe"; then
44323      input_to_shortpath="${new_path}.exe"
44324    elif test -f "${new_path}.cmd"; then
44325      input_to_shortpath="${new_path}.cmd"
44326    else
44327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44328$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44329      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44330$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44331      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44332    fi
44333  else
44334    input_to_shortpath="$new_path"
44335  fi
44336
44337  # Call helper function which possibly converts this using DOS-style short mode.
44338  # If so, the updated path is stored in $new_path.
44339  new_path="$input_to_shortpath"
44340
44341  input_path="$input_to_shortpath"
44342  # Check if we need to convert this using DOS-style short mode. If the path
44343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44344  # take no chances and rewrite it.
44345  # Note: m4 eats our [], so we need to use [ and ] instead.
44346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44347  if test "x$has_forbidden_chars" != x; then
44348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44352      # Going to short mode and back again did indeed matter. Since short mode is
44353      # case insensitive, let's make it lowercase to improve readability.
44354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44355      # Now convert it back to Unix-style (cygpath)
44356      input_path=`$CYGPATH -u "$shortmode_path"`
44357      new_path="$input_path"
44358    fi
44359  fi
44360
44361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44362  if test "x$test_cygdrive_prefix" = x; then
44363    # As a simple fix, exclude /usr/bin since it's not a real path.
44364    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44366      # a path prefixed by /cygdrive for fixpath to work.
44367      new_path="$CYGWIN_ROOT_PATH$input_path"
44368    fi
44369  fi
44370
44371  # remove trailing .exe if any
44372  new_path="${new_path/%.exe/}"
44373
44374    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44375
44376  # First separate the path from the arguments. This will split at the first
44377  # space.
44378  complete="$BUILD_CC"
44379  path="${complete%% *}"
44380  tmp="$complete EOL"
44381  arguments="${tmp#* }"
44382
44383  # Input might be given as Windows format, start by converting to
44384  # unix format.
44385  new_path="$path"
44386
44387  windows_path="$new_path"
44388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44389    unix_path=`$CYGPATH -u "$windows_path"`
44390    new_path="$unix_path"
44391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44393    new_path="$unix_path"
44394  fi
44395
44396
44397  # Now try to locate executable using which
44398  new_path=`$WHICH "$new_path" 2> /dev/null`
44399
44400  if test "x$new_path" = x; then
44401    # Oops. Which didn't find the executable.
44402    # The splitting of arguments from the executable at a space might have been incorrect,
44403    # since paths with space are more likely in Windows. Give it another try with the whole
44404    # argument.
44405    path="$complete"
44406    arguments="EOL"
44407    new_path="$path"
44408
44409  windows_path="$new_path"
44410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44411    unix_path=`$CYGPATH -u "$windows_path"`
44412    new_path="$unix_path"
44413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44415    new_path="$unix_path"
44416  fi
44417
44418
44419    new_path=`$WHICH "$new_path" 2> /dev/null`
44420    # bat and cmd files are not always considered executable in MSYS causing which
44421    # to not find them
44422    if test "x$new_path" = x \
44423        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44424        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44425      new_path="$path"
44426
44427  windows_path="$new_path"
44428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44429    unix_path=`$CYGPATH -u "$windows_path"`
44430    new_path="$unix_path"
44431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44433    new_path="$unix_path"
44434  fi
44435
44436    fi
44437
44438    if test "x$new_path" = x; then
44439      # It's still not found. Now this is an unrecoverable error.
44440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44441$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44442      has_space=`$ECHO "$complete" | $GREP " "`
44443      if test "x$has_space" != x; then
44444        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44445$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44446      fi
44447      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44448    fi
44449  fi
44450
44451  # Now new_path has a complete unix path to the binary
44452  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44453    # Keep paths in /bin as-is, but remove trailing .exe if any
44454    new_path="${new_path/%.exe/}"
44455    # Do not save /bin paths to all_fixpath_prefixes!
44456  else
44457    # Not in mixed or Windows style, start by that.
44458    new_path=`cmd //c echo $new_path`
44459
44460  input_path="$new_path"
44461  # Check if we need to convert this using DOS-style short mode. If the path
44462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44463  # take no chances and rewrite it.
44464  # Note: m4 eats our [], so we need to use [ and ] instead.
44465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44466  if test "x$has_forbidden_chars" != x; then
44467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44469  fi
44470
44471    # Output is in $new_path
44472
44473  windows_path="$new_path"
44474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44475    unix_path=`$CYGPATH -u "$windows_path"`
44476    new_path="$unix_path"
44477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44479    new_path="$unix_path"
44480  fi
44481
44482    # remove trailing .exe if any
44483    new_path="${new_path/%.exe/}"
44484
44485    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44486    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44487  fi
44488
44489    else
44490      # We're on a unix platform. Hooray! :)
44491      # First separate the path from the arguments. This will split at the first
44492      # space.
44493      complete="$BUILD_CC"
44494      path="${complete%% *}"
44495      tmp="$complete EOL"
44496      arguments="${tmp#* }"
44497
44498      # Cannot rely on the command "which" here since it doesn't always work.
44499      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44500      if test -z "$is_absolute_path"; then
44501        # Path to executable is not absolute. Find it.
44502        IFS_save="$IFS"
44503        IFS=:
44504        for p in $PATH; do
44505          if test -f "$p/$path" && test -x "$p/$path"; then
44506            new_path="$p/$path"
44507            break
44508          fi
44509        done
44510        IFS="$IFS_save"
44511      else
44512        # This is an absolute path, we can use it without further modifications.
44513        new_path="$path"
44514      fi
44515
44516      if test "x$new_path" = x; then
44517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44518$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44519        has_space=`$ECHO "$complete" | $GREP " "`
44520        if test "x$has_space" != x; then
44521          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44522$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44523        fi
44524        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44525      fi
44526    fi
44527
44528    # Now join together the path and the arguments once again
44529    if test "x$arguments" != xEOL; then
44530      new_complete="$new_path ${arguments% *}"
44531    else
44532      new_complete="$new_path"
44533    fi
44534
44535    if test "x$complete" != "x$new_complete"; then
44536      BUILD_CC="$new_complete"
44537      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44538$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44539    fi
44540  fi
44541
44542
44543
44544
44545  # Publish this variable in the help.
44546
44547
44548  if [ -z "${BUILD_CXX+x}" ]; then
44549    # The variable is not set by user, try to locate tool using the code snippet
44550    for ac_prog in cl CC g++
44551do
44552  # Extract the first word of "$ac_prog", so it can be a program name with args.
44553set dummy $ac_prog; ac_word=$2
44554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44555$as_echo_n "checking for $ac_word... " >&6; }
44556if ${ac_cv_path_BUILD_CXX+:} false; then :
44557  $as_echo_n "(cached) " >&6
44558else
44559  case $BUILD_CXX in
44560  [\\/]* | ?:[\\/]*)
44561  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44562  ;;
44563  *)
44564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44565for as_dir in $PATH
44566do
44567  IFS=$as_save_IFS
44568  test -z "$as_dir" && as_dir=.
44569    for ac_exec_ext in '' $ac_executable_extensions; do
44570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44571    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44573    break 2
44574  fi
44575done
44576  done
44577IFS=$as_save_IFS
44578
44579  ;;
44580esac
44581fi
44582BUILD_CXX=$ac_cv_path_BUILD_CXX
44583if test -n "$BUILD_CXX"; then
44584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44585$as_echo "$BUILD_CXX" >&6; }
44586else
44587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44588$as_echo "no" >&6; }
44589fi
44590
44591
44592  test -n "$BUILD_CXX" && break
44593done
44594
44595  else
44596    # The variable is set, but is it from the command line or the environment?
44597
44598    # Try to remove the string !BUILD_CXX! from our list.
44599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44601      # If it failed, the variable was not from the command line. Ignore it,
44602      # but warn the user (except for BASH, which is always set by the calling BASH).
44603      if test "xBUILD_CXX" != xBASH; then
44604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44605$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44606      fi
44607      # Try to locate tool using the code snippet
44608      for ac_prog in cl CC g++
44609do
44610  # Extract the first word of "$ac_prog", so it can be a program name with args.
44611set dummy $ac_prog; ac_word=$2
44612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44613$as_echo_n "checking for $ac_word... " >&6; }
44614if ${ac_cv_path_BUILD_CXX+:} false; then :
44615  $as_echo_n "(cached) " >&6
44616else
44617  case $BUILD_CXX in
44618  [\\/]* | ?:[\\/]*)
44619  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44620  ;;
44621  *)
44622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44623for as_dir in $PATH
44624do
44625  IFS=$as_save_IFS
44626  test -z "$as_dir" && as_dir=.
44627    for ac_exec_ext in '' $ac_executable_extensions; do
44628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44629    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44631    break 2
44632  fi
44633done
44634  done
44635IFS=$as_save_IFS
44636
44637  ;;
44638esac
44639fi
44640BUILD_CXX=$ac_cv_path_BUILD_CXX
44641if test -n "$BUILD_CXX"; then
44642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44643$as_echo "$BUILD_CXX" >&6; }
44644else
44645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44646$as_echo "no" >&6; }
44647fi
44648
44649
44650  test -n "$BUILD_CXX" && break
44651done
44652
44653    else
44654      # If it succeeded, then it was overridden by the user. We will use it
44655      # for the tool.
44656
44657      # First remove it from the list of overridden variables, so we can test
44658      # for unknown variables in the end.
44659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44660
44661      # Check if we try to supply an empty value
44662      if test "x$BUILD_CXX" = x; then
44663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44664$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44666$as_echo_n "checking for BUILD_CXX... " >&6; }
44667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44668$as_echo "disabled" >&6; }
44669      else
44670        # Check if the provided tool contains a complete path.
44671        tool_specified="$BUILD_CXX"
44672        tool_basename="${tool_specified##*/}"
44673        if test "x$tool_basename" = "x$tool_specified"; then
44674          # A command without a complete path is provided, search $PATH.
44675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44676$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44677          # Extract the first word of "$tool_basename", so it can be a program name with args.
44678set dummy $tool_basename; ac_word=$2
44679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44680$as_echo_n "checking for $ac_word... " >&6; }
44681if ${ac_cv_path_BUILD_CXX+:} false; then :
44682  $as_echo_n "(cached) " >&6
44683else
44684  case $BUILD_CXX in
44685  [\\/]* | ?:[\\/]*)
44686  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44687  ;;
44688  *)
44689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44690for as_dir in $PATH
44691do
44692  IFS=$as_save_IFS
44693  test -z "$as_dir" && as_dir=.
44694    for ac_exec_ext in '' $ac_executable_extensions; do
44695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44696    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44698    break 2
44699  fi
44700done
44701  done
44702IFS=$as_save_IFS
44703
44704  ;;
44705esac
44706fi
44707BUILD_CXX=$ac_cv_path_BUILD_CXX
44708if test -n "$BUILD_CXX"; then
44709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44710$as_echo "$BUILD_CXX" >&6; }
44711else
44712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44713$as_echo "no" >&6; }
44714fi
44715
44716
44717          if test "x$BUILD_CXX" = x; then
44718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44719          fi
44720        else
44721          # Otherwise we believe it is a complete path. Use it as it is.
44722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44723$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44725$as_echo_n "checking for BUILD_CXX... " >&6; }
44726          if test ! -x "$tool_specified"; then
44727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44728$as_echo "not found" >&6; }
44729            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44730          fi
44731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44732$as_echo "$tool_specified" >&6; }
44733        fi
44734      fi
44735    fi
44736
44737  fi
44738
44739
44740
44741  if test "x$BUILD_CXX" = x; then
44742    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44743  fi
44744
44745
44746
44747  # Only process if variable expands to non-empty
44748
44749  if test "x$BUILD_CXX" != x; then
44750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44751
44752  # First separate the path from the arguments. This will split at the first
44753  # space.
44754  complete="$BUILD_CXX"
44755  path="${complete%% *}"
44756  tmp="$complete EOL"
44757  arguments="${tmp#* }"
44758
44759  # Input might be given as Windows format, start by converting to
44760  # unix format.
44761  new_path=`$CYGPATH -u "$path"`
44762
44763  # Now try to locate executable using which
44764  new_path=`$WHICH "$new_path" 2> /dev/null`
44765  # bat and cmd files are not always considered executable in cygwin causing which
44766  # to not find them
44767  if test "x$new_path" = x \
44768      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44769      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44770    new_path=`$CYGPATH -u "$path"`
44771  fi
44772  if test "x$new_path" = x; then
44773    # Oops. Which didn't find the executable.
44774    # The splitting of arguments from the executable at a space might have been incorrect,
44775    # since paths with space are more likely in Windows. Give it another try with the whole
44776    # argument.
44777    path="$complete"
44778    arguments="EOL"
44779    new_path=`$CYGPATH -u "$path"`
44780    new_path=`$WHICH "$new_path" 2> /dev/null`
44781    # bat and cmd files are not always considered executable in cygwin causing which
44782    # to not find them
44783    if test "x$new_path" = x \
44784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44786      new_path=`$CYGPATH -u "$path"`
44787    fi
44788    if test "x$new_path" = x; then
44789      # It's still not found. Now this is an unrecoverable error.
44790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44791$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44792      has_space=`$ECHO "$complete" | $GREP " "`
44793      if test "x$has_space" != x; then
44794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44796      fi
44797      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44798    fi
44799  fi
44800
44801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44804  # "foo.exe" is OK but "foo" is an error.
44805  #
44806  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44807  # It is also a way to make sure we got the proper file name for the real test later on.
44808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44809  if test "x$test_shortpath" = x; then
44810    # Short path failed, file does not exist as specified.
44811    # Try adding .exe or .cmd
44812    if test -f "${new_path}.exe"; then
44813      input_to_shortpath="${new_path}.exe"
44814    elif test -f "${new_path}.cmd"; then
44815      input_to_shortpath="${new_path}.cmd"
44816    else
44817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44818$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44819      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44820$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44821      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44822    fi
44823  else
44824    input_to_shortpath="$new_path"
44825  fi
44826
44827  # Call helper function which possibly converts this using DOS-style short mode.
44828  # If so, the updated path is stored in $new_path.
44829  new_path="$input_to_shortpath"
44830
44831  input_path="$input_to_shortpath"
44832  # Check if we need to convert this using DOS-style short mode. If the path
44833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44834  # take no chances and rewrite it.
44835  # Note: m4 eats our [], so we need to use [ and ] instead.
44836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44837  if test "x$has_forbidden_chars" != x; then
44838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44842      # Going to short mode and back again did indeed matter. Since short mode is
44843      # case insensitive, let's make it lowercase to improve readability.
44844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44845      # Now convert it back to Unix-style (cygpath)
44846      input_path=`$CYGPATH -u "$shortmode_path"`
44847      new_path="$input_path"
44848    fi
44849  fi
44850
44851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44852  if test "x$test_cygdrive_prefix" = x; then
44853    # As a simple fix, exclude /usr/bin since it's not a real path.
44854    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44856      # a path prefixed by /cygdrive for fixpath to work.
44857      new_path="$CYGWIN_ROOT_PATH$input_path"
44858    fi
44859  fi
44860
44861  # remove trailing .exe if any
44862  new_path="${new_path/%.exe/}"
44863
44864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44865
44866  # First separate the path from the arguments. This will split at the first
44867  # space.
44868  complete="$BUILD_CXX"
44869  path="${complete%% *}"
44870  tmp="$complete EOL"
44871  arguments="${tmp#* }"
44872
44873  # Input might be given as Windows format, start by converting to
44874  # unix format.
44875  new_path="$path"
44876
44877  windows_path="$new_path"
44878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44879    unix_path=`$CYGPATH -u "$windows_path"`
44880    new_path="$unix_path"
44881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44883    new_path="$unix_path"
44884  fi
44885
44886
44887  # Now try to locate executable using which
44888  new_path=`$WHICH "$new_path" 2> /dev/null`
44889
44890  if test "x$new_path" = x; then
44891    # Oops. Which didn't find the executable.
44892    # The splitting of arguments from the executable at a space might have been incorrect,
44893    # since paths with space are more likely in Windows. Give it another try with the whole
44894    # argument.
44895    path="$complete"
44896    arguments="EOL"
44897    new_path="$path"
44898
44899  windows_path="$new_path"
44900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44901    unix_path=`$CYGPATH -u "$windows_path"`
44902    new_path="$unix_path"
44903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44905    new_path="$unix_path"
44906  fi
44907
44908
44909    new_path=`$WHICH "$new_path" 2> /dev/null`
44910    # bat and cmd files are not always considered executable in MSYS causing which
44911    # to not find them
44912    if test "x$new_path" = x \
44913        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44914        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44915      new_path="$path"
44916
44917  windows_path="$new_path"
44918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44919    unix_path=`$CYGPATH -u "$windows_path"`
44920    new_path="$unix_path"
44921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44923    new_path="$unix_path"
44924  fi
44925
44926    fi
44927
44928    if test "x$new_path" = x; then
44929      # It's still not found. Now this is an unrecoverable error.
44930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44931$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44932      has_space=`$ECHO "$complete" | $GREP " "`
44933      if test "x$has_space" != x; then
44934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44936      fi
44937      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44938    fi
44939  fi
44940
44941  # Now new_path has a complete unix path to the binary
44942  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44943    # Keep paths in /bin as-is, but remove trailing .exe if any
44944    new_path="${new_path/%.exe/}"
44945    # Do not save /bin paths to all_fixpath_prefixes!
44946  else
44947    # Not in mixed or Windows style, start by that.
44948    new_path=`cmd //c echo $new_path`
44949
44950  input_path="$new_path"
44951  # Check if we need to convert this using DOS-style short mode. If the path
44952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44953  # take no chances and rewrite it.
44954  # Note: m4 eats our [], so we need to use [ and ] instead.
44955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44956  if test "x$has_forbidden_chars" != x; then
44957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44959  fi
44960
44961    # Output is in $new_path
44962
44963  windows_path="$new_path"
44964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44965    unix_path=`$CYGPATH -u "$windows_path"`
44966    new_path="$unix_path"
44967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44969    new_path="$unix_path"
44970  fi
44971
44972    # remove trailing .exe if any
44973    new_path="${new_path/%.exe/}"
44974
44975    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44976    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44977  fi
44978
44979    else
44980      # We're on a unix platform. Hooray! :)
44981      # First separate the path from the arguments. This will split at the first
44982      # space.
44983      complete="$BUILD_CXX"
44984      path="${complete%% *}"
44985      tmp="$complete EOL"
44986      arguments="${tmp#* }"
44987
44988      # Cannot rely on the command "which" here since it doesn't always work.
44989      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44990      if test -z "$is_absolute_path"; then
44991        # Path to executable is not absolute. Find it.
44992        IFS_save="$IFS"
44993        IFS=:
44994        for p in $PATH; do
44995          if test -f "$p/$path" && test -x "$p/$path"; then
44996            new_path="$p/$path"
44997            break
44998          fi
44999        done
45000        IFS="$IFS_save"
45001      else
45002        # This is an absolute path, we can use it without further modifications.
45003        new_path="$path"
45004      fi
45005
45006      if test "x$new_path" = x; then
45007        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45008$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45009        has_space=`$ECHO "$complete" | $GREP " "`
45010        if test "x$has_space" != x; then
45011          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45012$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45013        fi
45014        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45015      fi
45016    fi
45017
45018    # Now join together the path and the arguments once again
45019    if test "x$arguments" != xEOL; then
45020      new_complete="$new_path ${arguments% *}"
45021    else
45022      new_complete="$new_path"
45023    fi
45024
45025    if test "x$complete" != "x$new_complete"; then
45026      BUILD_CXX="$new_complete"
45027      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45028$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45029    fi
45030  fi
45031
45032
45033
45034  # Publish this variable in the help.
45035
45036
45037  if [ -z "${BUILD_NM+x}" ]; then
45038    # The variable is not set by user, try to locate tool using the code snippet
45039    for ac_prog in nm gcc-nm
45040do
45041  # Extract the first word of "$ac_prog", so it can be a program name with args.
45042set dummy $ac_prog; ac_word=$2
45043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45044$as_echo_n "checking for $ac_word... " >&6; }
45045if ${ac_cv_path_BUILD_NM+:} false; then :
45046  $as_echo_n "(cached) " >&6
45047else
45048  case $BUILD_NM in
45049  [\\/]* | ?:[\\/]*)
45050  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45051  ;;
45052  *)
45053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45054for as_dir in $PATH
45055do
45056  IFS=$as_save_IFS
45057  test -z "$as_dir" && as_dir=.
45058    for ac_exec_ext in '' $ac_executable_extensions; do
45059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45060    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45062    break 2
45063  fi
45064done
45065  done
45066IFS=$as_save_IFS
45067
45068  ;;
45069esac
45070fi
45071BUILD_NM=$ac_cv_path_BUILD_NM
45072if test -n "$BUILD_NM"; then
45073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45074$as_echo "$BUILD_NM" >&6; }
45075else
45076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45077$as_echo "no" >&6; }
45078fi
45079
45080
45081  test -n "$BUILD_NM" && break
45082done
45083
45084  else
45085    # The variable is set, but is it from the command line or the environment?
45086
45087    # Try to remove the string !BUILD_NM! from our list.
45088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45090      # If it failed, the variable was not from the command line. Ignore it,
45091      # but warn the user (except for BASH, which is always set by the calling BASH).
45092      if test "xBUILD_NM" != xBASH; then
45093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45094$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45095      fi
45096      # Try to locate tool using the code snippet
45097      for ac_prog in nm gcc-nm
45098do
45099  # Extract the first word of "$ac_prog", so it can be a program name with args.
45100set dummy $ac_prog; ac_word=$2
45101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45102$as_echo_n "checking for $ac_word... " >&6; }
45103if ${ac_cv_path_BUILD_NM+:} false; then :
45104  $as_echo_n "(cached) " >&6
45105else
45106  case $BUILD_NM in
45107  [\\/]* | ?:[\\/]*)
45108  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45109  ;;
45110  *)
45111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45112for as_dir in $PATH
45113do
45114  IFS=$as_save_IFS
45115  test -z "$as_dir" && as_dir=.
45116    for ac_exec_ext in '' $ac_executable_extensions; do
45117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45118    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45120    break 2
45121  fi
45122done
45123  done
45124IFS=$as_save_IFS
45125
45126  ;;
45127esac
45128fi
45129BUILD_NM=$ac_cv_path_BUILD_NM
45130if test -n "$BUILD_NM"; then
45131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45132$as_echo "$BUILD_NM" >&6; }
45133else
45134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45135$as_echo "no" >&6; }
45136fi
45137
45138
45139  test -n "$BUILD_NM" && break
45140done
45141
45142    else
45143      # If it succeeded, then it was overridden by the user. We will use it
45144      # for the tool.
45145
45146      # First remove it from the list of overridden variables, so we can test
45147      # for unknown variables in the end.
45148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45149
45150      # Check if we try to supply an empty value
45151      if test "x$BUILD_NM" = x; then
45152        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45153$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45155$as_echo_n "checking for BUILD_NM... " >&6; }
45156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45157$as_echo "disabled" >&6; }
45158      else
45159        # Check if the provided tool contains a complete path.
45160        tool_specified="$BUILD_NM"
45161        tool_basename="${tool_specified##*/}"
45162        if test "x$tool_basename" = "x$tool_specified"; then
45163          # A command without a complete path is provided, search $PATH.
45164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45165$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45166          # Extract the first word of "$tool_basename", so it can be a program name with args.
45167set dummy $tool_basename; ac_word=$2
45168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45169$as_echo_n "checking for $ac_word... " >&6; }
45170if ${ac_cv_path_BUILD_NM+:} false; then :
45171  $as_echo_n "(cached) " >&6
45172else
45173  case $BUILD_NM in
45174  [\\/]* | ?:[\\/]*)
45175  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45176  ;;
45177  *)
45178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45179for as_dir in $PATH
45180do
45181  IFS=$as_save_IFS
45182  test -z "$as_dir" && as_dir=.
45183    for ac_exec_ext in '' $ac_executable_extensions; do
45184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45185    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45187    break 2
45188  fi
45189done
45190  done
45191IFS=$as_save_IFS
45192
45193  ;;
45194esac
45195fi
45196BUILD_NM=$ac_cv_path_BUILD_NM
45197if test -n "$BUILD_NM"; then
45198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45199$as_echo "$BUILD_NM" >&6; }
45200else
45201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45202$as_echo "no" >&6; }
45203fi
45204
45205
45206          if test "x$BUILD_NM" = x; then
45207            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45208          fi
45209        else
45210          # Otherwise we believe it is a complete path. Use it as it is.
45211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45212$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45213          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45214$as_echo_n "checking for BUILD_NM... " >&6; }
45215          if test ! -x "$tool_specified"; then
45216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45217$as_echo "not found" >&6; }
45218            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45219          fi
45220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45221$as_echo "$tool_specified" >&6; }
45222        fi
45223      fi
45224    fi
45225
45226  fi
45227
45228
45229
45230  # Only process if variable expands to non-empty
45231
45232  if test "x$BUILD_NM" != x; then
45233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45234
45235  # First separate the path from the arguments. This will split at the first
45236  # space.
45237  complete="$BUILD_NM"
45238  path="${complete%% *}"
45239  tmp="$complete EOL"
45240  arguments="${tmp#* }"
45241
45242  # Input might be given as Windows format, start by converting to
45243  # unix format.
45244  new_path=`$CYGPATH -u "$path"`
45245
45246  # Now try to locate executable using which
45247  new_path=`$WHICH "$new_path" 2> /dev/null`
45248  # bat and cmd files are not always considered executable in cygwin causing which
45249  # to not find them
45250  if test "x$new_path" = x \
45251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45253    new_path=`$CYGPATH -u "$path"`
45254  fi
45255  if test "x$new_path" = x; then
45256    # Oops. Which didn't find the executable.
45257    # The splitting of arguments from the executable at a space might have been incorrect,
45258    # since paths with space are more likely in Windows. Give it another try with the whole
45259    # argument.
45260    path="$complete"
45261    arguments="EOL"
45262    new_path=`$CYGPATH -u "$path"`
45263    new_path=`$WHICH "$new_path" 2> /dev/null`
45264    # bat and cmd files are not always considered executable in cygwin causing which
45265    # to not find them
45266    if test "x$new_path" = x \
45267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45269      new_path=`$CYGPATH -u "$path"`
45270    fi
45271    if test "x$new_path" = x; then
45272      # It's still not found. Now this is an unrecoverable error.
45273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45274$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45275      has_space=`$ECHO "$complete" | $GREP " "`
45276      if test "x$has_space" != x; then
45277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45279      fi
45280      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45281    fi
45282  fi
45283
45284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45287  # "foo.exe" is OK but "foo" is an error.
45288  #
45289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45290  # It is also a way to make sure we got the proper file name for the real test later on.
45291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45292  if test "x$test_shortpath" = x; then
45293    # Short path failed, file does not exist as specified.
45294    # Try adding .exe or .cmd
45295    if test -f "${new_path}.exe"; then
45296      input_to_shortpath="${new_path}.exe"
45297    elif test -f "${new_path}.cmd"; then
45298      input_to_shortpath="${new_path}.cmd"
45299    else
45300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45301$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45304      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45305    fi
45306  else
45307    input_to_shortpath="$new_path"
45308  fi
45309
45310  # Call helper function which possibly converts this using DOS-style short mode.
45311  # If so, the updated path is stored in $new_path.
45312  new_path="$input_to_shortpath"
45313
45314  input_path="$input_to_shortpath"
45315  # Check if we need to convert this using DOS-style short mode. If the path
45316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45317  # take no chances and rewrite it.
45318  # Note: m4 eats our [], so we need to use [ and ] instead.
45319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45320  if test "x$has_forbidden_chars" != x; then
45321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45325      # Going to short mode and back again did indeed matter. Since short mode is
45326      # case insensitive, let's make it lowercase to improve readability.
45327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45328      # Now convert it back to Unix-style (cygpath)
45329      input_path=`$CYGPATH -u "$shortmode_path"`
45330      new_path="$input_path"
45331    fi
45332  fi
45333
45334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45335  if test "x$test_cygdrive_prefix" = x; then
45336    # As a simple fix, exclude /usr/bin since it's not a real path.
45337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45339      # a path prefixed by /cygdrive for fixpath to work.
45340      new_path="$CYGWIN_ROOT_PATH$input_path"
45341    fi
45342  fi
45343
45344  # remove trailing .exe if any
45345  new_path="${new_path/%.exe/}"
45346
45347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45348
45349  # First separate the path from the arguments. This will split at the first
45350  # space.
45351  complete="$BUILD_NM"
45352  path="${complete%% *}"
45353  tmp="$complete EOL"
45354  arguments="${tmp#* }"
45355
45356  # Input might be given as Windows format, start by converting to
45357  # unix format.
45358  new_path="$path"
45359
45360  windows_path="$new_path"
45361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45362    unix_path=`$CYGPATH -u "$windows_path"`
45363    new_path="$unix_path"
45364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45366    new_path="$unix_path"
45367  fi
45368
45369
45370  # Now try to locate executable using which
45371  new_path=`$WHICH "$new_path" 2> /dev/null`
45372
45373  if test "x$new_path" = x; then
45374    # Oops. Which didn't find the executable.
45375    # The splitting of arguments from the executable at a space might have been incorrect,
45376    # since paths with space are more likely in Windows. Give it another try with the whole
45377    # argument.
45378    path="$complete"
45379    arguments="EOL"
45380    new_path="$path"
45381
45382  windows_path="$new_path"
45383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45384    unix_path=`$CYGPATH -u "$windows_path"`
45385    new_path="$unix_path"
45386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45388    new_path="$unix_path"
45389  fi
45390
45391
45392    new_path=`$WHICH "$new_path" 2> /dev/null`
45393    # bat and cmd files are not always considered executable in MSYS causing which
45394    # to not find them
45395    if test "x$new_path" = x \
45396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45398      new_path="$path"
45399
45400  windows_path="$new_path"
45401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45402    unix_path=`$CYGPATH -u "$windows_path"`
45403    new_path="$unix_path"
45404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45406    new_path="$unix_path"
45407  fi
45408
45409    fi
45410
45411    if test "x$new_path" = x; then
45412      # It's still not found. Now this is an unrecoverable error.
45413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45414$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45415      has_space=`$ECHO "$complete" | $GREP " "`
45416      if test "x$has_space" != x; then
45417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45419      fi
45420      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45421    fi
45422  fi
45423
45424  # Now new_path has a complete unix path to the binary
45425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45426    # Keep paths in /bin as-is, but remove trailing .exe if any
45427    new_path="${new_path/%.exe/}"
45428    # Do not save /bin paths to all_fixpath_prefixes!
45429  else
45430    # Not in mixed or Windows style, start by that.
45431    new_path=`cmd //c echo $new_path`
45432
45433  input_path="$new_path"
45434  # Check if we need to convert this using DOS-style short mode. If the path
45435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45436  # take no chances and rewrite it.
45437  # Note: m4 eats our [], so we need to use [ and ] instead.
45438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45439  if test "x$has_forbidden_chars" != x; then
45440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45442  fi
45443
45444    # Output is in $new_path
45445
45446  windows_path="$new_path"
45447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45448    unix_path=`$CYGPATH -u "$windows_path"`
45449    new_path="$unix_path"
45450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45452    new_path="$unix_path"
45453  fi
45454
45455    # remove trailing .exe if any
45456    new_path="${new_path/%.exe/}"
45457
45458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45460  fi
45461
45462    else
45463      # We're on a unix platform. Hooray! :)
45464      # First separate the path from the arguments. This will split at the first
45465      # space.
45466      complete="$BUILD_NM"
45467      path="${complete%% *}"
45468      tmp="$complete EOL"
45469      arguments="${tmp#* }"
45470
45471      # Cannot rely on the command "which" here since it doesn't always work.
45472      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45473      if test -z "$is_absolute_path"; then
45474        # Path to executable is not absolute. Find it.
45475        IFS_save="$IFS"
45476        IFS=:
45477        for p in $PATH; do
45478          if test -f "$p/$path" && test -x "$p/$path"; then
45479            new_path="$p/$path"
45480            break
45481          fi
45482        done
45483        IFS="$IFS_save"
45484      else
45485        # This is an absolute path, we can use it without further modifications.
45486        new_path="$path"
45487      fi
45488
45489      if test "x$new_path" = x; then
45490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45491$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45492        has_space=`$ECHO "$complete" | $GREP " "`
45493        if test "x$has_space" != x; then
45494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45496        fi
45497        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45498      fi
45499    fi
45500
45501    # Now join together the path and the arguments once again
45502    if test "x$arguments" != xEOL; then
45503      new_complete="$new_path ${arguments% *}"
45504    else
45505      new_complete="$new_path"
45506    fi
45507
45508    if test "x$complete" != "x$new_complete"; then
45509      BUILD_NM="$new_complete"
45510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45511$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45512    fi
45513  fi
45514
45515
45516
45517  # Publish this variable in the help.
45518
45519
45520  if [ -z "${BUILD_AR+x}" ]; then
45521    # The variable is not set by user, try to locate tool using the code snippet
45522    for ac_prog in ar gcc-ar
45523do
45524  # Extract the first word of "$ac_prog", so it can be a program name with args.
45525set dummy $ac_prog; ac_word=$2
45526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45527$as_echo_n "checking for $ac_word... " >&6; }
45528if ${ac_cv_path_BUILD_AR+:} false; then :
45529  $as_echo_n "(cached) " >&6
45530else
45531  case $BUILD_AR in
45532  [\\/]* | ?:[\\/]*)
45533  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45534  ;;
45535  *)
45536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45537for as_dir in $PATH
45538do
45539  IFS=$as_save_IFS
45540  test -z "$as_dir" && as_dir=.
45541    for ac_exec_ext in '' $ac_executable_extensions; do
45542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45543    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45545    break 2
45546  fi
45547done
45548  done
45549IFS=$as_save_IFS
45550
45551  ;;
45552esac
45553fi
45554BUILD_AR=$ac_cv_path_BUILD_AR
45555if test -n "$BUILD_AR"; then
45556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45557$as_echo "$BUILD_AR" >&6; }
45558else
45559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45560$as_echo "no" >&6; }
45561fi
45562
45563
45564  test -n "$BUILD_AR" && break
45565done
45566
45567  else
45568    # The variable is set, but is it from the command line or the environment?
45569
45570    # Try to remove the string !BUILD_AR! from our list.
45571    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45572    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45573      # If it failed, the variable was not from the command line. Ignore it,
45574      # but warn the user (except for BASH, which is always set by the calling BASH).
45575      if test "xBUILD_AR" != xBASH; then
45576        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45577$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45578      fi
45579      # Try to locate tool using the code snippet
45580      for ac_prog in ar gcc-ar
45581do
45582  # Extract the first word of "$ac_prog", so it can be a program name with args.
45583set dummy $ac_prog; ac_word=$2
45584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45585$as_echo_n "checking for $ac_word... " >&6; }
45586if ${ac_cv_path_BUILD_AR+:} false; then :
45587  $as_echo_n "(cached) " >&6
45588else
45589  case $BUILD_AR in
45590  [\\/]* | ?:[\\/]*)
45591  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45592  ;;
45593  *)
45594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45595for as_dir in $PATH
45596do
45597  IFS=$as_save_IFS
45598  test -z "$as_dir" && as_dir=.
45599    for ac_exec_ext in '' $ac_executable_extensions; do
45600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45601    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45603    break 2
45604  fi
45605done
45606  done
45607IFS=$as_save_IFS
45608
45609  ;;
45610esac
45611fi
45612BUILD_AR=$ac_cv_path_BUILD_AR
45613if test -n "$BUILD_AR"; then
45614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45615$as_echo "$BUILD_AR" >&6; }
45616else
45617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45618$as_echo "no" >&6; }
45619fi
45620
45621
45622  test -n "$BUILD_AR" && break
45623done
45624
45625    else
45626      # If it succeeded, then it was overridden by the user. We will use it
45627      # for the tool.
45628
45629      # First remove it from the list of overridden variables, so we can test
45630      # for unknown variables in the end.
45631      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45632
45633      # Check if we try to supply an empty value
45634      if test "x$BUILD_AR" = x; then
45635        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45636$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45637        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45638$as_echo_n "checking for BUILD_AR... " >&6; }
45639        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45640$as_echo "disabled" >&6; }
45641      else
45642        # Check if the provided tool contains a complete path.
45643        tool_specified="$BUILD_AR"
45644        tool_basename="${tool_specified##*/}"
45645        if test "x$tool_basename" = "x$tool_specified"; then
45646          # A command without a complete path is provided, search $PATH.
45647          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45648$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45649          # Extract the first word of "$tool_basename", so it can be a program name with args.
45650set dummy $tool_basename; ac_word=$2
45651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45652$as_echo_n "checking for $ac_word... " >&6; }
45653if ${ac_cv_path_BUILD_AR+:} false; then :
45654  $as_echo_n "(cached) " >&6
45655else
45656  case $BUILD_AR in
45657  [\\/]* | ?:[\\/]*)
45658  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45659  ;;
45660  *)
45661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45662for as_dir in $PATH
45663do
45664  IFS=$as_save_IFS
45665  test -z "$as_dir" && as_dir=.
45666    for ac_exec_ext in '' $ac_executable_extensions; do
45667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45668    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45670    break 2
45671  fi
45672done
45673  done
45674IFS=$as_save_IFS
45675
45676  ;;
45677esac
45678fi
45679BUILD_AR=$ac_cv_path_BUILD_AR
45680if test -n "$BUILD_AR"; then
45681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45682$as_echo "$BUILD_AR" >&6; }
45683else
45684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45685$as_echo "no" >&6; }
45686fi
45687
45688
45689          if test "x$BUILD_AR" = x; then
45690            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45691          fi
45692        else
45693          # Otherwise we believe it is a complete path. Use it as it is.
45694          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45695$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45696          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45697$as_echo_n "checking for BUILD_AR... " >&6; }
45698          if test ! -x "$tool_specified"; then
45699            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45700$as_echo "not found" >&6; }
45701            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45702          fi
45703          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45704$as_echo "$tool_specified" >&6; }
45705        fi
45706      fi
45707    fi
45708
45709  fi
45710
45711
45712
45713  # Only process if variable expands to non-empty
45714
45715  if test "x$BUILD_AR" != x; then
45716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45717
45718  # First separate the path from the arguments. This will split at the first
45719  # space.
45720  complete="$BUILD_AR"
45721  path="${complete%% *}"
45722  tmp="$complete EOL"
45723  arguments="${tmp#* }"
45724
45725  # Input might be given as Windows format, start by converting to
45726  # unix format.
45727  new_path=`$CYGPATH -u "$path"`
45728
45729  # Now try to locate executable using which
45730  new_path=`$WHICH "$new_path" 2> /dev/null`
45731  # bat and cmd files are not always considered executable in cygwin causing which
45732  # to not find them
45733  if test "x$new_path" = x \
45734      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45735      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45736    new_path=`$CYGPATH -u "$path"`
45737  fi
45738  if test "x$new_path" = x; then
45739    # Oops. Which didn't find the executable.
45740    # The splitting of arguments from the executable at a space might have been incorrect,
45741    # since paths with space are more likely in Windows. Give it another try with the whole
45742    # argument.
45743    path="$complete"
45744    arguments="EOL"
45745    new_path=`$CYGPATH -u "$path"`
45746    new_path=`$WHICH "$new_path" 2> /dev/null`
45747    # bat and cmd files are not always considered executable in cygwin causing which
45748    # to not find them
45749    if test "x$new_path" = x \
45750        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45751        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45752      new_path=`$CYGPATH -u "$path"`
45753    fi
45754    if test "x$new_path" = x; then
45755      # It's still not found. Now this is an unrecoverable error.
45756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45757$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45758      has_space=`$ECHO "$complete" | $GREP " "`
45759      if test "x$has_space" != x; then
45760        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45761$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45762      fi
45763      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45764    fi
45765  fi
45766
45767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45770  # "foo.exe" is OK but "foo" is an error.
45771  #
45772  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45773  # It is also a way to make sure we got the proper file name for the real test later on.
45774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45775  if test "x$test_shortpath" = x; then
45776    # Short path failed, file does not exist as specified.
45777    # Try adding .exe or .cmd
45778    if test -f "${new_path}.exe"; then
45779      input_to_shortpath="${new_path}.exe"
45780    elif test -f "${new_path}.cmd"; then
45781      input_to_shortpath="${new_path}.cmd"
45782    else
45783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45784$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45785      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45786$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45787      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45788    fi
45789  else
45790    input_to_shortpath="$new_path"
45791  fi
45792
45793  # Call helper function which possibly converts this using DOS-style short mode.
45794  # If so, the updated path is stored in $new_path.
45795  new_path="$input_to_shortpath"
45796
45797  input_path="$input_to_shortpath"
45798  # Check if we need to convert this using DOS-style short mode. If the path
45799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45800  # take no chances and rewrite it.
45801  # Note: m4 eats our [], so we need to use [ and ] instead.
45802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45803  if test "x$has_forbidden_chars" != x; then
45804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45808      # Going to short mode and back again did indeed matter. Since short mode is
45809      # case insensitive, let's make it lowercase to improve readability.
45810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45811      # Now convert it back to Unix-style (cygpath)
45812      input_path=`$CYGPATH -u "$shortmode_path"`
45813      new_path="$input_path"
45814    fi
45815  fi
45816
45817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45818  if test "x$test_cygdrive_prefix" = x; then
45819    # As a simple fix, exclude /usr/bin since it's not a real path.
45820    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45822      # a path prefixed by /cygdrive for fixpath to work.
45823      new_path="$CYGWIN_ROOT_PATH$input_path"
45824    fi
45825  fi
45826
45827  # remove trailing .exe if any
45828  new_path="${new_path/%.exe/}"
45829
45830    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45831
45832  # First separate the path from the arguments. This will split at the first
45833  # space.
45834  complete="$BUILD_AR"
45835  path="${complete%% *}"
45836  tmp="$complete EOL"
45837  arguments="${tmp#* }"
45838
45839  # Input might be given as Windows format, start by converting to
45840  # unix format.
45841  new_path="$path"
45842
45843  windows_path="$new_path"
45844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45845    unix_path=`$CYGPATH -u "$windows_path"`
45846    new_path="$unix_path"
45847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45849    new_path="$unix_path"
45850  fi
45851
45852
45853  # Now try to locate executable using which
45854  new_path=`$WHICH "$new_path" 2> /dev/null`
45855
45856  if test "x$new_path" = x; then
45857    # Oops. Which didn't find the executable.
45858    # The splitting of arguments from the executable at a space might have been incorrect,
45859    # since paths with space are more likely in Windows. Give it another try with the whole
45860    # argument.
45861    path="$complete"
45862    arguments="EOL"
45863    new_path="$path"
45864
45865  windows_path="$new_path"
45866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45867    unix_path=`$CYGPATH -u "$windows_path"`
45868    new_path="$unix_path"
45869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45871    new_path="$unix_path"
45872  fi
45873
45874
45875    new_path=`$WHICH "$new_path" 2> /dev/null`
45876    # bat and cmd files are not always considered executable in MSYS causing which
45877    # to not find them
45878    if test "x$new_path" = x \
45879        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45880        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45881      new_path="$path"
45882
45883  windows_path="$new_path"
45884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45885    unix_path=`$CYGPATH -u "$windows_path"`
45886    new_path="$unix_path"
45887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45889    new_path="$unix_path"
45890  fi
45891
45892    fi
45893
45894    if test "x$new_path" = x; then
45895      # It's still not found. Now this is an unrecoverable error.
45896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45897$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45898      has_space=`$ECHO "$complete" | $GREP " "`
45899      if test "x$has_space" != x; then
45900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45902      fi
45903      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45904    fi
45905  fi
45906
45907  # Now new_path has a complete unix path to the binary
45908  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45909    # Keep paths in /bin as-is, but remove trailing .exe if any
45910    new_path="${new_path/%.exe/}"
45911    # Do not save /bin paths to all_fixpath_prefixes!
45912  else
45913    # Not in mixed or Windows style, start by that.
45914    new_path=`cmd //c echo $new_path`
45915
45916  input_path="$new_path"
45917  # Check if we need to convert this using DOS-style short mode. If the path
45918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45919  # take no chances and rewrite it.
45920  # Note: m4 eats our [], so we need to use [ and ] instead.
45921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45922  if test "x$has_forbidden_chars" != x; then
45923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45925  fi
45926
45927    # Output is in $new_path
45928
45929  windows_path="$new_path"
45930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45931    unix_path=`$CYGPATH -u "$windows_path"`
45932    new_path="$unix_path"
45933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45935    new_path="$unix_path"
45936  fi
45937
45938    # remove trailing .exe if any
45939    new_path="${new_path/%.exe/}"
45940
45941    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45942    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45943  fi
45944
45945    else
45946      # We're on a unix platform. Hooray! :)
45947      # First separate the path from the arguments. This will split at the first
45948      # space.
45949      complete="$BUILD_AR"
45950      path="${complete%% *}"
45951      tmp="$complete EOL"
45952      arguments="${tmp#* }"
45953
45954      # Cannot rely on the command "which" here since it doesn't always work.
45955      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45956      if test -z "$is_absolute_path"; then
45957        # Path to executable is not absolute. Find it.
45958        IFS_save="$IFS"
45959        IFS=:
45960        for p in $PATH; do
45961          if test -f "$p/$path" && test -x "$p/$path"; then
45962            new_path="$p/$path"
45963            break
45964          fi
45965        done
45966        IFS="$IFS_save"
45967      else
45968        # This is an absolute path, we can use it without further modifications.
45969        new_path="$path"
45970      fi
45971
45972      if test "x$new_path" = x; then
45973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45974$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45975        has_space=`$ECHO "$complete" | $GREP " "`
45976        if test "x$has_space" != x; then
45977          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45978$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45979        fi
45980        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45981      fi
45982    fi
45983
45984    # Now join together the path and the arguments once again
45985    if test "x$arguments" != xEOL; then
45986      new_complete="$new_path ${arguments% *}"
45987    else
45988      new_complete="$new_path"
45989    fi
45990
45991    if test "x$complete" != "x$new_complete"; then
45992      BUILD_AR="$new_complete"
45993      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45994$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45995    fi
45996  fi
45997
45998
45999
46000  # Publish this variable in the help.
46001
46002
46003  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46004    # The variable is not set by user, try to locate tool using the code snippet
46005    for ac_prog in objcopy
46006do
46007  # Extract the first word of "$ac_prog", so it can be a program name with args.
46008set dummy $ac_prog; ac_word=$2
46009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46010$as_echo_n "checking for $ac_word... " >&6; }
46011if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46012  $as_echo_n "(cached) " >&6
46013else
46014  case $BUILD_OBJCOPY in
46015  [\\/]* | ?:[\\/]*)
46016  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46017  ;;
46018  *)
46019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46020for as_dir in $PATH
46021do
46022  IFS=$as_save_IFS
46023  test -z "$as_dir" && as_dir=.
46024    for ac_exec_ext in '' $ac_executable_extensions; do
46025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46026    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46028    break 2
46029  fi
46030done
46031  done
46032IFS=$as_save_IFS
46033
46034  ;;
46035esac
46036fi
46037BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46038if test -n "$BUILD_OBJCOPY"; then
46039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46040$as_echo "$BUILD_OBJCOPY" >&6; }
46041else
46042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46043$as_echo "no" >&6; }
46044fi
46045
46046
46047  test -n "$BUILD_OBJCOPY" && break
46048done
46049
46050  else
46051    # The variable is set, but is it from the command line or the environment?
46052
46053    # Try to remove the string !BUILD_OBJCOPY! from our list.
46054    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46055    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46056      # If it failed, the variable was not from the command line. Ignore it,
46057      # but warn the user (except for BASH, which is always set by the calling BASH).
46058      if test "xBUILD_OBJCOPY" != xBASH; then
46059        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46060$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46061      fi
46062      # Try to locate tool using the code snippet
46063      for ac_prog in objcopy
46064do
46065  # Extract the first word of "$ac_prog", so it can be a program name with args.
46066set dummy $ac_prog; ac_word=$2
46067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46068$as_echo_n "checking for $ac_word... " >&6; }
46069if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46070  $as_echo_n "(cached) " >&6
46071else
46072  case $BUILD_OBJCOPY in
46073  [\\/]* | ?:[\\/]*)
46074  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46075  ;;
46076  *)
46077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46078for as_dir in $PATH
46079do
46080  IFS=$as_save_IFS
46081  test -z "$as_dir" && as_dir=.
46082    for ac_exec_ext in '' $ac_executable_extensions; do
46083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46084    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46086    break 2
46087  fi
46088done
46089  done
46090IFS=$as_save_IFS
46091
46092  ;;
46093esac
46094fi
46095BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46096if test -n "$BUILD_OBJCOPY"; then
46097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46098$as_echo "$BUILD_OBJCOPY" >&6; }
46099else
46100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46101$as_echo "no" >&6; }
46102fi
46103
46104
46105  test -n "$BUILD_OBJCOPY" && break
46106done
46107
46108    else
46109      # If it succeeded, then it was overridden by the user. We will use it
46110      # for the tool.
46111
46112      # First remove it from the list of overridden variables, so we can test
46113      # for unknown variables in the end.
46114      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46115
46116      # Check if we try to supply an empty value
46117      if test "x$BUILD_OBJCOPY" = x; then
46118        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46119$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46120        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46121$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46123$as_echo "disabled" >&6; }
46124      else
46125        # Check if the provided tool contains a complete path.
46126        tool_specified="$BUILD_OBJCOPY"
46127        tool_basename="${tool_specified##*/}"
46128        if test "x$tool_basename" = "x$tool_specified"; then
46129          # A command without a complete path is provided, search $PATH.
46130          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46131$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46132          # Extract the first word of "$tool_basename", so it can be a program name with args.
46133set dummy $tool_basename; ac_word=$2
46134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46135$as_echo_n "checking for $ac_word... " >&6; }
46136if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46137  $as_echo_n "(cached) " >&6
46138else
46139  case $BUILD_OBJCOPY in
46140  [\\/]* | ?:[\\/]*)
46141  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46142  ;;
46143  *)
46144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46145for as_dir in $PATH
46146do
46147  IFS=$as_save_IFS
46148  test -z "$as_dir" && as_dir=.
46149    for ac_exec_ext in '' $ac_executable_extensions; do
46150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46151    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46153    break 2
46154  fi
46155done
46156  done
46157IFS=$as_save_IFS
46158
46159  ;;
46160esac
46161fi
46162BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46163if test -n "$BUILD_OBJCOPY"; then
46164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46165$as_echo "$BUILD_OBJCOPY" >&6; }
46166else
46167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46168$as_echo "no" >&6; }
46169fi
46170
46171
46172          if test "x$BUILD_OBJCOPY" = x; then
46173            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46174          fi
46175        else
46176          # Otherwise we believe it is a complete path. Use it as it is.
46177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46178$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46179          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46180$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46181          if test ! -x "$tool_specified"; then
46182            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46183$as_echo "not found" >&6; }
46184            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46185          fi
46186          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46187$as_echo "$tool_specified" >&6; }
46188        fi
46189      fi
46190    fi
46191
46192  fi
46193
46194
46195
46196  # Only process if variable expands to non-empty
46197
46198  if test "x$BUILD_OBJCOPY" != x; then
46199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46200
46201  # First separate the path from the arguments. This will split at the first
46202  # space.
46203  complete="$BUILD_OBJCOPY"
46204  path="${complete%% *}"
46205  tmp="$complete EOL"
46206  arguments="${tmp#* }"
46207
46208  # Input might be given as Windows format, start by converting to
46209  # unix format.
46210  new_path=`$CYGPATH -u "$path"`
46211
46212  # Now try to locate executable using which
46213  new_path=`$WHICH "$new_path" 2> /dev/null`
46214  # bat and cmd files are not always considered executable in cygwin causing which
46215  # to not find them
46216  if test "x$new_path" = x \
46217      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46218      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46219    new_path=`$CYGPATH -u "$path"`
46220  fi
46221  if test "x$new_path" = x; then
46222    # Oops. Which didn't find the executable.
46223    # The splitting of arguments from the executable at a space might have been incorrect,
46224    # since paths with space are more likely in Windows. Give it another try with the whole
46225    # argument.
46226    path="$complete"
46227    arguments="EOL"
46228    new_path=`$CYGPATH -u "$path"`
46229    new_path=`$WHICH "$new_path" 2> /dev/null`
46230    # bat and cmd files are not always considered executable in cygwin causing which
46231    # to not find them
46232    if test "x$new_path" = x \
46233        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46234        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46235      new_path=`$CYGPATH -u "$path"`
46236    fi
46237    if test "x$new_path" = x; then
46238      # It's still not found. Now this is an unrecoverable error.
46239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46240$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46241      has_space=`$ECHO "$complete" | $GREP " "`
46242      if test "x$has_space" != x; then
46243        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46244$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46245      fi
46246      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46247    fi
46248  fi
46249
46250  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46251  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46252  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46253  # "foo.exe" is OK but "foo" is an error.
46254  #
46255  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46256  # It is also a way to make sure we got the proper file name for the real test later on.
46257  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46258  if test "x$test_shortpath" = x; then
46259    # Short path failed, file does not exist as specified.
46260    # Try adding .exe or .cmd
46261    if test -f "${new_path}.exe"; then
46262      input_to_shortpath="${new_path}.exe"
46263    elif test -f "${new_path}.cmd"; then
46264      input_to_shortpath="${new_path}.cmd"
46265    else
46266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46267$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46268      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46269$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46270      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46271    fi
46272  else
46273    input_to_shortpath="$new_path"
46274  fi
46275
46276  # Call helper function which possibly converts this using DOS-style short mode.
46277  # If so, the updated path is stored in $new_path.
46278  new_path="$input_to_shortpath"
46279
46280  input_path="$input_to_shortpath"
46281  # Check if we need to convert this using DOS-style short mode. If the path
46282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46283  # take no chances and rewrite it.
46284  # Note: m4 eats our [], so we need to use [ and ] instead.
46285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46286  if test "x$has_forbidden_chars" != x; then
46287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46291      # Going to short mode and back again did indeed matter. Since short mode is
46292      # case insensitive, let's make it lowercase to improve readability.
46293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46294      # Now convert it back to Unix-style (cygpath)
46295      input_path=`$CYGPATH -u "$shortmode_path"`
46296      new_path="$input_path"
46297    fi
46298  fi
46299
46300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46301  if test "x$test_cygdrive_prefix" = x; then
46302    # As a simple fix, exclude /usr/bin since it's not a real path.
46303    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46305      # a path prefixed by /cygdrive for fixpath to work.
46306      new_path="$CYGWIN_ROOT_PATH$input_path"
46307    fi
46308  fi
46309
46310  # remove trailing .exe if any
46311  new_path="${new_path/%.exe/}"
46312
46313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46314
46315  # First separate the path from the arguments. This will split at the first
46316  # space.
46317  complete="$BUILD_OBJCOPY"
46318  path="${complete%% *}"
46319  tmp="$complete EOL"
46320  arguments="${tmp#* }"
46321
46322  # Input might be given as Windows format, start by converting to
46323  # unix format.
46324  new_path="$path"
46325
46326  windows_path="$new_path"
46327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46328    unix_path=`$CYGPATH -u "$windows_path"`
46329    new_path="$unix_path"
46330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46332    new_path="$unix_path"
46333  fi
46334
46335
46336  # Now try to locate executable using which
46337  new_path=`$WHICH "$new_path" 2> /dev/null`
46338
46339  if test "x$new_path" = x; then
46340    # Oops. Which didn't find the executable.
46341    # The splitting of arguments from the executable at a space might have been incorrect,
46342    # since paths with space are more likely in Windows. Give it another try with the whole
46343    # argument.
46344    path="$complete"
46345    arguments="EOL"
46346    new_path="$path"
46347
46348  windows_path="$new_path"
46349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46350    unix_path=`$CYGPATH -u "$windows_path"`
46351    new_path="$unix_path"
46352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46354    new_path="$unix_path"
46355  fi
46356
46357
46358    new_path=`$WHICH "$new_path" 2> /dev/null`
46359    # bat and cmd files are not always considered executable in MSYS causing which
46360    # to not find them
46361    if test "x$new_path" = x \
46362        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46363        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46364      new_path="$path"
46365
46366  windows_path="$new_path"
46367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46368    unix_path=`$CYGPATH -u "$windows_path"`
46369    new_path="$unix_path"
46370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46372    new_path="$unix_path"
46373  fi
46374
46375    fi
46376
46377    if test "x$new_path" = x; then
46378      # It's still not found. Now this is an unrecoverable error.
46379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46380$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46381      has_space=`$ECHO "$complete" | $GREP " "`
46382      if test "x$has_space" != x; then
46383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46385      fi
46386      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46387    fi
46388  fi
46389
46390  # Now new_path has a complete unix path to the binary
46391  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46392    # Keep paths in /bin as-is, but remove trailing .exe if any
46393    new_path="${new_path/%.exe/}"
46394    # Do not save /bin paths to all_fixpath_prefixes!
46395  else
46396    # Not in mixed or Windows style, start by that.
46397    new_path=`cmd //c echo $new_path`
46398
46399  input_path="$new_path"
46400  # Check if we need to convert this using DOS-style short mode. If the path
46401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46402  # take no chances and rewrite it.
46403  # Note: m4 eats our [], so we need to use [ and ] instead.
46404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46405  if test "x$has_forbidden_chars" != x; then
46406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46408  fi
46409
46410    # Output is in $new_path
46411
46412  windows_path="$new_path"
46413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46414    unix_path=`$CYGPATH -u "$windows_path"`
46415    new_path="$unix_path"
46416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46418    new_path="$unix_path"
46419  fi
46420
46421    # remove trailing .exe if any
46422    new_path="${new_path/%.exe/}"
46423
46424    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46425    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46426  fi
46427
46428    else
46429      # We're on a unix platform. Hooray! :)
46430      # First separate the path from the arguments. This will split at the first
46431      # space.
46432      complete="$BUILD_OBJCOPY"
46433      path="${complete%% *}"
46434      tmp="$complete EOL"
46435      arguments="${tmp#* }"
46436
46437      # Cannot rely on the command "which" here since it doesn't always work.
46438      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46439      if test -z "$is_absolute_path"; then
46440        # Path to executable is not absolute. Find it.
46441        IFS_save="$IFS"
46442        IFS=:
46443        for p in $PATH; do
46444          if test -f "$p/$path" && test -x "$p/$path"; then
46445            new_path="$p/$path"
46446            break
46447          fi
46448        done
46449        IFS="$IFS_save"
46450      else
46451        # This is an absolute path, we can use it without further modifications.
46452        new_path="$path"
46453      fi
46454
46455      if test "x$new_path" = x; then
46456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46457$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46458        has_space=`$ECHO "$complete" | $GREP " "`
46459        if test "x$has_space" != x; then
46460          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46461$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46462        fi
46463        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46464      fi
46465    fi
46466
46467    # Now join together the path and the arguments once again
46468    if test "x$arguments" != xEOL; then
46469      new_complete="$new_path ${arguments% *}"
46470    else
46471      new_complete="$new_path"
46472    fi
46473
46474    if test "x$complete" != "x$new_complete"; then
46475      BUILD_OBJCOPY="$new_complete"
46476      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46477$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46478    fi
46479  fi
46480
46481
46482
46483  # Publish this variable in the help.
46484
46485
46486  if [ -z "${BUILD_STRIP+x}" ]; then
46487    # The variable is not set by user, try to locate tool using the code snippet
46488    for ac_prog in strip
46489do
46490  # Extract the first word of "$ac_prog", so it can be a program name with args.
46491set dummy $ac_prog; ac_word=$2
46492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46493$as_echo_n "checking for $ac_word... " >&6; }
46494if ${ac_cv_path_BUILD_STRIP+:} false; then :
46495  $as_echo_n "(cached) " >&6
46496else
46497  case $BUILD_STRIP in
46498  [\\/]* | ?:[\\/]*)
46499  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46500  ;;
46501  *)
46502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46503for as_dir in $PATH
46504do
46505  IFS=$as_save_IFS
46506  test -z "$as_dir" && as_dir=.
46507    for ac_exec_ext in '' $ac_executable_extensions; do
46508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46509    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46511    break 2
46512  fi
46513done
46514  done
46515IFS=$as_save_IFS
46516
46517  ;;
46518esac
46519fi
46520BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46521if test -n "$BUILD_STRIP"; then
46522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46523$as_echo "$BUILD_STRIP" >&6; }
46524else
46525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46526$as_echo "no" >&6; }
46527fi
46528
46529
46530  test -n "$BUILD_STRIP" && break
46531done
46532
46533  else
46534    # The variable is set, but is it from the command line or the environment?
46535
46536    # Try to remove the string !BUILD_STRIP! from our list.
46537    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46538    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46539      # If it failed, the variable was not from the command line. Ignore it,
46540      # but warn the user (except for BASH, which is always set by the calling BASH).
46541      if test "xBUILD_STRIP" != xBASH; then
46542        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46543$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46544      fi
46545      # Try to locate tool using the code snippet
46546      for ac_prog in strip
46547do
46548  # Extract the first word of "$ac_prog", so it can be a program name with args.
46549set dummy $ac_prog; ac_word=$2
46550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46551$as_echo_n "checking for $ac_word... " >&6; }
46552if ${ac_cv_path_BUILD_STRIP+:} false; then :
46553  $as_echo_n "(cached) " >&6
46554else
46555  case $BUILD_STRIP in
46556  [\\/]* | ?:[\\/]*)
46557  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46558  ;;
46559  *)
46560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46561for as_dir in $PATH
46562do
46563  IFS=$as_save_IFS
46564  test -z "$as_dir" && as_dir=.
46565    for ac_exec_ext in '' $ac_executable_extensions; do
46566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46567    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46569    break 2
46570  fi
46571done
46572  done
46573IFS=$as_save_IFS
46574
46575  ;;
46576esac
46577fi
46578BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46579if test -n "$BUILD_STRIP"; then
46580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46581$as_echo "$BUILD_STRIP" >&6; }
46582else
46583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46584$as_echo "no" >&6; }
46585fi
46586
46587
46588  test -n "$BUILD_STRIP" && break
46589done
46590
46591    else
46592      # If it succeeded, then it was overridden by the user. We will use it
46593      # for the tool.
46594
46595      # First remove it from the list of overridden variables, so we can test
46596      # for unknown variables in the end.
46597      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46598
46599      # Check if we try to supply an empty value
46600      if test "x$BUILD_STRIP" = x; then
46601        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46602$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46604$as_echo_n "checking for BUILD_STRIP... " >&6; }
46605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46606$as_echo "disabled" >&6; }
46607      else
46608        # Check if the provided tool contains a complete path.
46609        tool_specified="$BUILD_STRIP"
46610        tool_basename="${tool_specified##*/}"
46611        if test "x$tool_basename" = "x$tool_specified"; then
46612          # A command without a complete path is provided, search $PATH.
46613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46614$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46615          # Extract the first word of "$tool_basename", so it can be a program name with args.
46616set dummy $tool_basename; ac_word=$2
46617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46618$as_echo_n "checking for $ac_word... " >&6; }
46619if ${ac_cv_path_BUILD_STRIP+:} false; then :
46620  $as_echo_n "(cached) " >&6
46621else
46622  case $BUILD_STRIP in
46623  [\\/]* | ?:[\\/]*)
46624  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46625  ;;
46626  *)
46627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46628for as_dir in $PATH
46629do
46630  IFS=$as_save_IFS
46631  test -z "$as_dir" && as_dir=.
46632    for ac_exec_ext in '' $ac_executable_extensions; do
46633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46634    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46636    break 2
46637  fi
46638done
46639  done
46640IFS=$as_save_IFS
46641
46642  ;;
46643esac
46644fi
46645BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46646if test -n "$BUILD_STRIP"; then
46647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46648$as_echo "$BUILD_STRIP" >&6; }
46649else
46650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46651$as_echo "no" >&6; }
46652fi
46653
46654
46655          if test "x$BUILD_STRIP" = x; then
46656            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46657          fi
46658        else
46659          # Otherwise we believe it is a complete path. Use it as it is.
46660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46661$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46662          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46663$as_echo_n "checking for BUILD_STRIP... " >&6; }
46664          if test ! -x "$tool_specified"; then
46665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46666$as_echo "not found" >&6; }
46667            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46668          fi
46669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46670$as_echo "$tool_specified" >&6; }
46671        fi
46672      fi
46673    fi
46674
46675  fi
46676
46677
46678
46679  # Only process if variable expands to non-empty
46680
46681  if test "x$BUILD_STRIP" != x; then
46682    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46683
46684  # First separate the path from the arguments. This will split at the first
46685  # space.
46686  complete="$BUILD_STRIP"
46687  path="${complete%% *}"
46688  tmp="$complete EOL"
46689  arguments="${tmp#* }"
46690
46691  # Input might be given as Windows format, start by converting to
46692  # unix format.
46693  new_path=`$CYGPATH -u "$path"`
46694
46695  # Now try to locate executable using which
46696  new_path=`$WHICH "$new_path" 2> /dev/null`
46697  # bat and cmd files are not always considered executable in cygwin causing which
46698  # to not find them
46699  if test "x$new_path" = x \
46700      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46701      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46702    new_path=`$CYGPATH -u "$path"`
46703  fi
46704  if test "x$new_path" = x; then
46705    # Oops. Which didn't find the executable.
46706    # The splitting of arguments from the executable at a space might have been incorrect,
46707    # since paths with space are more likely in Windows. Give it another try with the whole
46708    # argument.
46709    path="$complete"
46710    arguments="EOL"
46711    new_path=`$CYGPATH -u "$path"`
46712    new_path=`$WHICH "$new_path" 2> /dev/null`
46713    # bat and cmd files are not always considered executable in cygwin causing which
46714    # to not find them
46715    if test "x$new_path" = x \
46716        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46717        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46718      new_path=`$CYGPATH -u "$path"`
46719    fi
46720    if test "x$new_path" = x; then
46721      # It's still not found. Now this is an unrecoverable error.
46722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46723$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46724      has_space=`$ECHO "$complete" | $GREP " "`
46725      if test "x$has_space" != x; then
46726        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46727$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46728      fi
46729      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46730    fi
46731  fi
46732
46733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46736  # "foo.exe" is OK but "foo" is an error.
46737  #
46738  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46739  # It is also a way to make sure we got the proper file name for the real test later on.
46740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46741  if test "x$test_shortpath" = x; then
46742    # Short path failed, file does not exist as specified.
46743    # Try adding .exe or .cmd
46744    if test -f "${new_path}.exe"; then
46745      input_to_shortpath="${new_path}.exe"
46746    elif test -f "${new_path}.cmd"; then
46747      input_to_shortpath="${new_path}.cmd"
46748    else
46749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46750$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46751      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46752$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46753      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46754    fi
46755  else
46756    input_to_shortpath="$new_path"
46757  fi
46758
46759  # Call helper function which possibly converts this using DOS-style short mode.
46760  # If so, the updated path is stored in $new_path.
46761  new_path="$input_to_shortpath"
46762
46763  input_path="$input_to_shortpath"
46764  # Check if we need to convert this using DOS-style short mode. If the path
46765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46766  # take no chances and rewrite it.
46767  # Note: m4 eats our [], so we need to use [ and ] instead.
46768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46769  if test "x$has_forbidden_chars" != x; then
46770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46774      # Going to short mode and back again did indeed matter. Since short mode is
46775      # case insensitive, let's make it lowercase to improve readability.
46776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46777      # Now convert it back to Unix-style (cygpath)
46778      input_path=`$CYGPATH -u "$shortmode_path"`
46779      new_path="$input_path"
46780    fi
46781  fi
46782
46783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46784  if test "x$test_cygdrive_prefix" = x; then
46785    # As a simple fix, exclude /usr/bin since it's not a real path.
46786    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46788      # a path prefixed by /cygdrive for fixpath to work.
46789      new_path="$CYGWIN_ROOT_PATH$input_path"
46790    fi
46791  fi
46792
46793  # remove trailing .exe if any
46794  new_path="${new_path/%.exe/}"
46795
46796    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46797
46798  # First separate the path from the arguments. This will split at the first
46799  # space.
46800  complete="$BUILD_STRIP"
46801  path="${complete%% *}"
46802  tmp="$complete EOL"
46803  arguments="${tmp#* }"
46804
46805  # Input might be given as Windows format, start by converting to
46806  # unix format.
46807  new_path="$path"
46808
46809  windows_path="$new_path"
46810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46811    unix_path=`$CYGPATH -u "$windows_path"`
46812    new_path="$unix_path"
46813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46815    new_path="$unix_path"
46816  fi
46817
46818
46819  # Now try to locate executable using which
46820  new_path=`$WHICH "$new_path" 2> /dev/null`
46821
46822  if test "x$new_path" = x; then
46823    # Oops. Which didn't find the executable.
46824    # The splitting of arguments from the executable at a space might have been incorrect,
46825    # since paths with space are more likely in Windows. Give it another try with the whole
46826    # argument.
46827    path="$complete"
46828    arguments="EOL"
46829    new_path="$path"
46830
46831  windows_path="$new_path"
46832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46833    unix_path=`$CYGPATH -u "$windows_path"`
46834    new_path="$unix_path"
46835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46837    new_path="$unix_path"
46838  fi
46839
46840
46841    new_path=`$WHICH "$new_path" 2> /dev/null`
46842    # bat and cmd files are not always considered executable in MSYS causing which
46843    # to not find them
46844    if test "x$new_path" = x \
46845        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46846        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46847      new_path="$path"
46848
46849  windows_path="$new_path"
46850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46851    unix_path=`$CYGPATH -u "$windows_path"`
46852    new_path="$unix_path"
46853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46855    new_path="$unix_path"
46856  fi
46857
46858    fi
46859
46860    if test "x$new_path" = x; then
46861      # It's still not found. Now this is an unrecoverable error.
46862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46863$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46864      has_space=`$ECHO "$complete" | $GREP " "`
46865      if test "x$has_space" != x; then
46866        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46867$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46868      fi
46869      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46870    fi
46871  fi
46872
46873  # Now new_path has a complete unix path to the binary
46874  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46875    # Keep paths in /bin as-is, but remove trailing .exe if any
46876    new_path="${new_path/%.exe/}"
46877    # Do not save /bin paths to all_fixpath_prefixes!
46878  else
46879    # Not in mixed or Windows style, start by that.
46880    new_path=`cmd //c echo $new_path`
46881
46882  input_path="$new_path"
46883  # Check if we need to convert this using DOS-style short mode. If the path
46884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46885  # take no chances and rewrite it.
46886  # Note: m4 eats our [], so we need to use [ and ] instead.
46887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46888  if test "x$has_forbidden_chars" != x; then
46889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46891  fi
46892
46893    # Output is in $new_path
46894
46895  windows_path="$new_path"
46896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46897    unix_path=`$CYGPATH -u "$windows_path"`
46898    new_path="$unix_path"
46899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46901    new_path="$unix_path"
46902  fi
46903
46904    # remove trailing .exe if any
46905    new_path="${new_path/%.exe/}"
46906
46907    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46908    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46909  fi
46910
46911    else
46912      # We're on a unix platform. Hooray! :)
46913      # First separate the path from the arguments. This will split at the first
46914      # space.
46915      complete="$BUILD_STRIP"
46916      path="${complete%% *}"
46917      tmp="$complete EOL"
46918      arguments="${tmp#* }"
46919
46920      # Cannot rely on the command "which" here since it doesn't always work.
46921      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46922      if test -z "$is_absolute_path"; then
46923        # Path to executable is not absolute. Find it.
46924        IFS_save="$IFS"
46925        IFS=:
46926        for p in $PATH; do
46927          if test -f "$p/$path" && test -x "$p/$path"; then
46928            new_path="$p/$path"
46929            break
46930          fi
46931        done
46932        IFS="$IFS_save"
46933      else
46934        # This is an absolute path, we can use it without further modifications.
46935        new_path="$path"
46936      fi
46937
46938      if test "x$new_path" = x; then
46939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46940$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46941        has_space=`$ECHO "$complete" | $GREP " "`
46942        if test "x$has_space" != x; then
46943          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46944$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46945        fi
46946        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46947      fi
46948    fi
46949
46950    # Now join together the path and the arguments once again
46951    if test "x$arguments" != xEOL; then
46952      new_complete="$new_path ${arguments% *}"
46953    else
46954      new_complete="$new_path"
46955    fi
46956
46957    if test "x$complete" != "x$new_complete"; then
46958      BUILD_STRIP="$new_complete"
46959      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46960$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46961    fi
46962  fi
46963
46964    # Assume the C compiler is the assembler
46965    BUILD_AS="$BUILD_CC -c"
46966    # Just like for the target compiler, use the compiler as linker
46967    BUILD_LD="$BUILD_CC"
46968    BUILD_LDCXX="$BUILD_CXX"
46969
46970    PATH="$OLDPATH"
46971
46972
46973  COMPILER=$BUILD_CC
46974  COMPILER_NAME=BuildC
46975
46976  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46977    # cc -V output typically looks like
46978    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46979    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46980    # Check that this is likely to be the Solaris Studio cc.
46981    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46982    if test $? -ne 0; then
46983      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46984      { $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
46985$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46986      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46987$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46988      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46989$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46990      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46991    fi
46992    # Remove usage instructions (if present), and
46993    # collapse compiler output into a single line
46994    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46995        $SED -e 's/ *[Uu]sage:.*//'`
46996    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46997        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46998  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46999    # xlc -qversion output typically looks like
47000    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47001    #     Version: 11.01.0000.0015
47002    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47003    # Check that this is likely to be the IBM XL C compiler.
47004    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47005    if test $? -ne 0; then
47006      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47007      { $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
47008$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47009      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47010$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47011      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47012$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47013      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47014    fi
47015    # Collapse compiler output into a single line
47016    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47017    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47018        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47019  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47020    # There is no specific version flag, but all output starts with a version string.
47021    # First line typically looks something like:
47022    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47023    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47024    # Check that this is likely to be Microsoft CL.EXE.
47025    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47026    if test $? -ne 0; then
47027      { $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
47028$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47029      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47030$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47031      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47032    fi
47033    # Collapse compiler output into a single line
47034    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47035    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47036        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47037  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47038    # gcc --version output typically looks like
47039    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47040    #     Copyright (C) 2013 Free Software Foundation, Inc.
47041    #     This is free software; see the source for copying conditions.  There is NO
47042    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47043    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47044    # Check that this is likely to be GCC.
47045    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47046    if test $? -ne 0; then
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 --version was: \"$COMPILER_VERSION\"" >&5
47050$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47051      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47052    fi
47053    # Remove Copyright and legalese from version string, and
47054    # collapse into a single line
47055    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47056        $SED -e 's/ *Copyright .*//'`
47057    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47058        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47059  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47060    # clang --version output typically looks like
47061    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47062    #    clang version 3.3 (tags/RELEASE_33/final)
47063    # or
47064    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47065    #    Target: x86_64-pc-linux-gnu
47066    #    Thread model: posix
47067    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47068    # Check that this is likely to be clang
47069    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47070    if test $? -ne 0; then
47071      { $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
47072$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47073      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47074$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47075      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47076    fi
47077    # Collapse compiler output into a single line
47078    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47079    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47080        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47081  else
47082      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47083  fi
47084  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47085  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47086  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47087  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47088
47089  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47090$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47091
47092
47093  COMPILER=$BUILD_CXX
47094  COMPILER_NAME=BuildC++
47095
47096  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47097    # cc -V output typically looks like
47098    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47099    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47100    # Check that this is likely to be the Solaris Studio cc.
47101    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47102    if test $? -ne 0; then
47103      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47104      { $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
47105$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47106      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47107$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47108      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47109$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47110      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47111    fi
47112    # Remove usage instructions (if present), and
47113    # collapse compiler output into a single line
47114    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47115        $SED -e 's/ *[Uu]sage:.*//'`
47116    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47117        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47118  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47119    # xlc -qversion output typically looks like
47120    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47121    #     Version: 11.01.0000.0015
47122    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47123    # Check that this is likely to be the IBM XL C compiler.
47124    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47125    if test $? -ne 0; then
47126      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47127      { $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
47128$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47129      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47130$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47131      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47132$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47133      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47134    fi
47135    # Collapse compiler output into a single line
47136    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47137    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47138        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47139  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47140    # There is no specific version flag, but all output starts with a version string.
47141    # First line typically looks something like:
47142    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47143    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47144    # Check that this is likely to be Microsoft CL.EXE.
47145    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47146    if test $? -ne 0; then
47147      { $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
47148$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47149      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47150$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47151      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47152    fi
47153    # Collapse compiler output into a single line
47154    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47155    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47156        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47157  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47158    # gcc --version output typically looks like
47159    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47160    #     Copyright (C) 2013 Free Software Foundation, Inc.
47161    #     This is free software; see the source for copying conditions.  There is NO
47162    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47163    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47164    # Check that this is likely to be GCC.
47165    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47166    if test $? -ne 0; then
47167      { $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
47168$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47169      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47170$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47171      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47172    fi
47173    # Remove Copyright and legalese from version string, and
47174    # collapse into a single line
47175    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47176        $SED -e 's/ *Copyright .*//'`
47177    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47178        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47179  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47180    # clang --version output typically looks like
47181    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47182    #    clang version 3.3 (tags/RELEASE_33/final)
47183    # or
47184    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47185    #    Target: x86_64-pc-linux-gnu
47186    #    Thread model: posix
47187    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47188    # Check that this is likely to be clang
47189    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47190    if test $? -ne 0; then
47191      { $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
47192$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47193      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47194$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47195      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47196    fi
47197    # Collapse compiler output into a single line
47198    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47199    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47200        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47201  else
47202      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47203  fi
47204  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47205  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47206  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47207  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47208
47209  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47210$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47211
47212
47213  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47214    { $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
47215$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47216    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47217$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47218  fi
47219
47220  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47221  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47222    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47223$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47224  fi
47225
47226  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47227    { $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
47228$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47229  fi
47230
47231  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47232
47233  else
47234    # If we are not cross compiling, use the normal target compilers for
47235    # building the build platform executables.
47236    BUILD_CC="$CC"
47237    BUILD_CXX="$CXX"
47238    BUILD_LD="$LD"
47239    BUILD_LDCXX="$LDCXX"
47240    BUILD_NM="$NM"
47241    BUILD_AS="$AS"
47242    BUILD_OBJCOPY="$OBJCOPY"
47243    BUILD_STRIP="$STRIP"
47244    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47245    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47246    BUILD_AR="$AR"
47247  fi
47248
47249
47250
47251
47252
47253
47254
47255
47256
47257
47258
47259
47260  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47261    # For hotspot, we need these in Windows mixed path,
47262    # so rewrite them all. Need added .exe suffix.
47263    HOTSPOT_CXX="$CXX.exe"
47264    HOTSPOT_LD="$LD.exe"
47265    HOTSPOT_MT="$MT.exe"
47266    HOTSPOT_RC="$RC.exe"
47267
47268  unix_path="$HOTSPOT_CXX"
47269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47270    windows_path=`$CYGPATH -m "$unix_path"`
47271    HOTSPOT_CXX="$windows_path"
47272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47273    windows_path=`cmd //c echo $unix_path`
47274    HOTSPOT_CXX="$windows_path"
47275  fi
47276
47277
47278  unix_path="$HOTSPOT_LD"
47279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47280    windows_path=`$CYGPATH -m "$unix_path"`
47281    HOTSPOT_LD="$windows_path"
47282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47283    windows_path=`cmd //c echo $unix_path`
47284    HOTSPOT_LD="$windows_path"
47285  fi
47286
47287
47288  unix_path="$HOTSPOT_MT"
47289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47290    windows_path=`$CYGPATH -m "$unix_path"`
47291    HOTSPOT_MT="$windows_path"
47292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47293    windows_path=`cmd //c echo $unix_path`
47294    HOTSPOT_MT="$windows_path"
47295  fi
47296
47297
47298  unix_path="$HOTSPOT_RC"
47299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47300    windows_path=`$CYGPATH -m "$unix_path"`
47301    HOTSPOT_RC="$windows_path"
47302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47303    windows_path=`cmd //c echo $unix_path`
47304    HOTSPOT_RC="$windows_path"
47305  fi
47306
47307
47308
47309  else
47310    HOTSPOT_CXX="$CXX"
47311    HOTSPOT_LD="$LD"
47312  fi
47313
47314
47315
47316  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47317    USE_CLANG=true
47318  fi
47319
47320
47321
47322
47323
47324  # The package path is used only on macosx?
47325  # FIXME: clean this up, and/or move it elsewhere.
47326  PACKAGE_PATH=/opt/local
47327
47328
47329  # Check for extra potential brokenness.
47330  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47331    # On Windows, double-check that we got the right compiler.
47332    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47333    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47334    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47335      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47336        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
47337      fi
47338    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47339      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47340        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47341      fi
47342    fi
47343  fi
47344
47345  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47346    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47347    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47348    # This is later checked when setting flags.
47349
47350    # "-Og" suppported for GCC 4.8 and later
47351    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399    # Execute function body
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    # Execute function body
47449
47450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47451$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47452  supports=yes
47453
47454  saved_cflags="$CFLAGS"
47455  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47456  ac_ext=c
47457ac_cpp='$CPP $CPPFLAGS'
47458ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47459ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47460ac_compiler_gnu=$ac_cv_c_compiler_gnu
47461
47462  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47463/* end confdefs.h.  */
47464int i;
47465_ACEOF
47466if ac_fn_c_try_compile "$LINENO"; then :
47467
47468else
47469  supports=no
47470fi
47471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47472  ac_ext=cpp
47473ac_cpp='$CXXCPP $CPPFLAGS'
47474ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47475ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47476ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47477
47478  CFLAGS="$saved_cflags"
47479
47480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47481$as_echo "$supports" >&6; }
47482  if test "x$supports" = "xyes" ; then
47483    :
47484    C_COMP_SUPPORTS="yes"
47485  else
47486    :
47487    C_COMP_SUPPORTS="no"
47488  fi
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548    # Execute function body
47549
47550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47551$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47552  supports=yes
47553
47554  saved_cxxflags="$CXXFLAGS"
47555  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47556  ac_ext=cpp
47557ac_cpp='$CXXCPP $CPPFLAGS'
47558ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47559ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47560ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47561
47562  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47563/* end confdefs.h.  */
47564int i;
47565_ACEOF
47566if ac_fn_cxx_try_compile "$LINENO"; then :
47567
47568else
47569  supports=no
47570fi
47571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47572  ac_ext=cpp
47573ac_cpp='$CXXCPP $CPPFLAGS'
47574ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47575ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47576ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47577
47578  CXXFLAGS="$saved_cxxflags"
47579
47580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47581$as_echo "$supports" >&6; }
47582  if test "x$supports" = "xyes" ; then
47583    :
47584    CXX_COMP_SUPPORTS="yes"
47585  else
47586    :
47587    CXX_COMP_SUPPORTS="no"
47588  fi
47589
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47603$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47604  supports=no
47605  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47606
47607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47608$as_echo "$supports" >&6; }
47609  if test "x$supports" = "xyes" ; then
47610    :
47611    HAS_CFLAG_OPTIMIZE_DEBUG=true
47612  else
47613    :
47614    HAS_CFLAG_OPTIMIZE_DEBUG=false
47615  fi
47616
47617
47618
47619
47620
47621
47622
47623    # "-z relro" supported in GNU binutils 2.17 and later
47624    LINKER_RELRO_FLAG="-Wl,-z,relro"
47625
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
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    # Execute function body
47673
47674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47675$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47676  supports=yes
47677
47678  saved_ldflags="$LDFLAGS"
47679  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47680  ac_ext=c
47681ac_cpp='$CPP $CPPFLAGS'
47682ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47683ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47684ac_compiler_gnu=$ac_cv_c_compiler_gnu
47685
47686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47687/* end confdefs.h.  */
47688
47689int
47690main ()
47691{
47692
47693  ;
47694  return 0;
47695}
47696_ACEOF
47697if ac_fn_c_try_link "$LINENO"; then :
47698
47699else
47700  supports=no
47701fi
47702rm -f core conftest.err conftest.$ac_objext \
47703    conftest$ac_exeext conftest.$ac_ext
47704  ac_ext=cpp
47705ac_cpp='$CXXCPP $CPPFLAGS'
47706ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47707ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47708ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47709
47710  LDFLAGS="$saved_ldflags"
47711
47712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47713$as_echo "$supports" >&6; }
47714  if test "x$supports" = "xyes" ; then
47715    :
47716    HAS_LINKER_RELRO=true
47717  else
47718    :
47719    HAS_LINKER_RELRO=false
47720  fi
47721
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734    # "-z now" supported in GNU binutils 2.11 and later
47735    LINKER_NOW_FLAG="-Wl,-z,now"
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783    # Execute function body
47784
47785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47786$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47787  supports=yes
47788
47789  saved_ldflags="$LDFLAGS"
47790  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47791  ac_ext=c
47792ac_cpp='$CPP $CPPFLAGS'
47793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47795ac_compiler_gnu=$ac_cv_c_compiler_gnu
47796
47797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47798/* end confdefs.h.  */
47799
47800int
47801main ()
47802{
47803
47804  ;
47805  return 0;
47806}
47807_ACEOF
47808if ac_fn_c_try_link "$LINENO"; then :
47809
47810else
47811  supports=no
47812fi
47813rm -f core conftest.err conftest.$ac_objext \
47814    conftest$ac_exeext conftest.$ac_ext
47815  ac_ext=cpp
47816ac_cpp='$CXXCPP $CPPFLAGS'
47817ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47818ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47819ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47820
47821  LDFLAGS="$saved_ldflags"
47822
47823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47824$as_echo "$supports" >&6; }
47825  if test "x$supports" = "xyes" ; then
47826    :
47827    HAS_LINKER_NOW=true
47828  else
47829    :
47830    HAS_LINKER_NOW=false
47831  fi
47832
47833
47834
47835
47836
47837
47838
47839
47840
47841
47842
47843
47844  fi
47845
47846  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47847  # in executable.'
47848  USING_BROKEN_SUSE_LD=no
47849  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47851$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47852    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47853    $ECHO "int main() { }" > main.c
47854    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47855      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47856$as_echo "no" >&6; }
47857      USING_BROKEN_SUSE_LD=no
47858    else
47859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47860$as_echo "yes" >&6; }
47861      USING_BROKEN_SUSE_LD=yes
47862    fi
47863    rm -rf version-script.map main.c a.out
47864  fi
47865
47866
47867  # Setup hotspot lecagy names for toolchains
47868  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47869  if test "x$TOOLCHAIN_TYPE" = xclang; then
47870    HOTSPOT_TOOLCHAIN_TYPE=gcc
47871  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47872    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47873  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47874    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47875  fi
47876
47877
47878
47879# Setup the JTReg Regression Test Harness.
47880
47881
47882# Check whether --with-jtreg was given.
47883if test "${with_jtreg+set}" = set; then :
47884  withval=$with_jtreg;
47885else
47886  with_jtreg=no
47887fi
47888
47889
47890  if test "x$with_jtreg" = xno; then
47891    # jtreg disabled
47892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47893$as_echo_n "checking for jtreg... " >&6; }
47894    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47895$as_echo "no" >&6; }
47896  else
47897    if test "x$with_jtreg" != xyes; then
47898      # with path specified.
47899      JT_HOME="$with_jtreg"
47900    fi
47901
47902    if test "x$JT_HOME" != x; then
47903      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47904$as_echo_n "checking for jtreg... " >&6; }
47905
47906      # use JT_HOME enviroment var.
47907
47908  # Only process if variable expands to non-empty
47909
47910  if test "x$JT_HOME" != x; then
47911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47912
47913  # Input might be given as Windows format, start by converting to
47914  # unix format.
47915  path="$JT_HOME"
47916  new_path=`$CYGPATH -u "$path"`
47917
47918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47921  # "foo.exe" is OK but "foo" is an error.
47922  #
47923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47924  # It is also a way to make sure we got the proper file name for the real test later on.
47925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47926  if test "x$test_shortpath" = x; then
47927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47928$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47929    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47930  fi
47931
47932  # Call helper function which possibly converts this using DOS-style short mode.
47933  # If so, the updated path is stored in $new_path.
47934
47935  input_path="$new_path"
47936  # Check if we need to convert this using DOS-style short mode. If the path
47937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47938  # take no chances and rewrite it.
47939  # Note: m4 eats our [], so we need to use [ and ] instead.
47940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47941  if test "x$has_forbidden_chars" != x; then
47942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47946      # Going to short mode and back again did indeed matter. Since short mode is
47947      # case insensitive, let's make it lowercase to improve readability.
47948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47949      # Now convert it back to Unix-style (cygpath)
47950      input_path=`$CYGPATH -u "$shortmode_path"`
47951      new_path="$input_path"
47952    fi
47953  fi
47954
47955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47956  if test "x$test_cygdrive_prefix" = x; then
47957    # As a simple fix, exclude /usr/bin since it's not a real path.
47958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47960      # a path prefixed by /cygdrive for fixpath to work.
47961      new_path="$CYGWIN_ROOT_PATH$input_path"
47962    fi
47963  fi
47964
47965
47966  if test "x$path" != "x$new_path"; then
47967    JT_HOME="$new_path"
47968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47969$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47970  fi
47971
47972    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47973
47974  path="$JT_HOME"
47975  has_colon=`$ECHO $path | $GREP ^.:`
47976  new_path="$path"
47977  if test "x$has_colon" = x; then
47978    # Not in mixed or Windows style, start by that.
47979    new_path=`cmd //c echo $path`
47980  fi
47981
47982
47983  input_path="$new_path"
47984  # Check if we need to convert this using DOS-style short mode. If the path
47985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47986  # take no chances and rewrite it.
47987  # Note: m4 eats our [], so we need to use [ and ] instead.
47988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47989  if test "x$has_forbidden_chars" != x; then
47990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47992  fi
47993
47994
47995  windows_path="$new_path"
47996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47997    unix_path=`$CYGPATH -u "$windows_path"`
47998    new_path="$unix_path"
47999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48001    new_path="$unix_path"
48002  fi
48003
48004  if test "x$path" != "x$new_path"; then
48005    JT_HOME="$new_path"
48006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48007$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48008  fi
48009
48010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48012
48013    else
48014      # We're on a unix platform. Hooray! :)
48015      path="$JT_HOME"
48016      has_space=`$ECHO "$path" | $GREP " "`
48017      if test "x$has_space" != x; then
48018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48019$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48020        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48021      fi
48022
48023      # Use eval to expand a potential ~
48024      eval path="$path"
48025      if test ! -f "$path" && test ! -d "$path"; then
48026        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48027      fi
48028
48029      if test -d "$path"; then
48030        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48031      else
48032        dir="`$DIRNAME "$path"`"
48033        base="`$BASENAME "$path"`"
48034        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48035      fi
48036    fi
48037  fi
48038
48039
48040      # jtreg win32 script works for everybody
48041      JTREGEXE="$JT_HOME/bin/jtreg"
48042
48043      if test ! -f "$JTREGEXE"; then
48044        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48045      fi
48046
48047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48048$as_echo "$JTREGEXE" >&6; }
48049    else
48050      # try to find jtreg on path
48051
48052
48053
48054  # Publish this variable in the help.
48055
48056
48057  if [ -z "${JTREGEXE+x}" ]; then
48058    # The variable is not set by user, try to locate tool using the code snippet
48059    for ac_prog in jtreg
48060do
48061  # Extract the first word of "$ac_prog", so it can be a program name with args.
48062set dummy $ac_prog; ac_word=$2
48063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48064$as_echo_n "checking for $ac_word... " >&6; }
48065if ${ac_cv_path_JTREGEXE+:} false; then :
48066  $as_echo_n "(cached) " >&6
48067else
48068  case $JTREGEXE in
48069  [\\/]* | ?:[\\/]*)
48070  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48071  ;;
48072  *)
48073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48074for as_dir in $PATH
48075do
48076  IFS=$as_save_IFS
48077  test -z "$as_dir" && as_dir=.
48078    for ac_exec_ext in '' $ac_executable_extensions; do
48079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48080    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48082    break 2
48083  fi
48084done
48085  done
48086IFS=$as_save_IFS
48087
48088  ;;
48089esac
48090fi
48091JTREGEXE=$ac_cv_path_JTREGEXE
48092if test -n "$JTREGEXE"; then
48093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48094$as_echo "$JTREGEXE" >&6; }
48095else
48096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48097$as_echo "no" >&6; }
48098fi
48099
48100
48101  test -n "$JTREGEXE" && break
48102done
48103
48104  else
48105    # The variable is set, but is it from the command line or the environment?
48106
48107    # Try to remove the string !JTREGEXE! from our list.
48108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48110      # If it failed, the variable was not from the command line. Ignore it,
48111      # but warn the user (except for BASH, which is always set by the calling BASH).
48112      if test "xJTREGEXE" != xBASH; then
48113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48114$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48115      fi
48116      # Try to locate tool using the code snippet
48117      for ac_prog in jtreg
48118do
48119  # Extract the first word of "$ac_prog", so it can be a program name with args.
48120set dummy $ac_prog; ac_word=$2
48121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48122$as_echo_n "checking for $ac_word... " >&6; }
48123if ${ac_cv_path_JTREGEXE+:} false; then :
48124  $as_echo_n "(cached) " >&6
48125else
48126  case $JTREGEXE in
48127  [\\/]* | ?:[\\/]*)
48128  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48129  ;;
48130  *)
48131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48132for as_dir in $PATH
48133do
48134  IFS=$as_save_IFS
48135  test -z "$as_dir" && as_dir=.
48136    for ac_exec_ext in '' $ac_executable_extensions; do
48137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48138    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48140    break 2
48141  fi
48142done
48143  done
48144IFS=$as_save_IFS
48145
48146  ;;
48147esac
48148fi
48149JTREGEXE=$ac_cv_path_JTREGEXE
48150if test -n "$JTREGEXE"; then
48151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48152$as_echo "$JTREGEXE" >&6; }
48153else
48154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48155$as_echo "no" >&6; }
48156fi
48157
48158
48159  test -n "$JTREGEXE" && break
48160done
48161
48162    else
48163      # If it succeeded, then it was overridden by the user. We will use it
48164      # for the tool.
48165
48166      # First remove it from the list of overridden variables, so we can test
48167      # for unknown variables in the end.
48168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48169
48170      # Check if we try to supply an empty value
48171      if test "x$JTREGEXE" = x; then
48172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48173$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48175$as_echo_n "checking for JTREGEXE... " >&6; }
48176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48177$as_echo "disabled" >&6; }
48178      else
48179        # Check if the provided tool contains a complete path.
48180        tool_specified="$JTREGEXE"
48181        tool_basename="${tool_specified##*/}"
48182        if test "x$tool_basename" = "x$tool_specified"; then
48183          # A command without a complete path is provided, search $PATH.
48184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48185$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48186          # Extract the first word of "$tool_basename", so it can be a program name with args.
48187set dummy $tool_basename; ac_word=$2
48188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48189$as_echo_n "checking for $ac_word... " >&6; }
48190if ${ac_cv_path_JTREGEXE+:} false; then :
48191  $as_echo_n "(cached) " >&6
48192else
48193  case $JTREGEXE in
48194  [\\/]* | ?:[\\/]*)
48195  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48196  ;;
48197  *)
48198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48199for as_dir in $PATH
48200do
48201  IFS=$as_save_IFS
48202  test -z "$as_dir" && as_dir=.
48203    for ac_exec_ext in '' $ac_executable_extensions; do
48204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48205    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48207    break 2
48208  fi
48209done
48210  done
48211IFS=$as_save_IFS
48212
48213  ;;
48214esac
48215fi
48216JTREGEXE=$ac_cv_path_JTREGEXE
48217if test -n "$JTREGEXE"; then
48218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48219$as_echo "$JTREGEXE" >&6; }
48220else
48221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48222$as_echo "no" >&6; }
48223fi
48224
48225
48226          if test "x$JTREGEXE" = x; then
48227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48228          fi
48229        else
48230          # Otherwise we believe it is a complete path. Use it as it is.
48231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48232$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48234$as_echo_n "checking for JTREGEXE... " >&6; }
48235          if test ! -x "$tool_specified"; then
48236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48237$as_echo "not found" >&6; }
48238            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48239          fi
48240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48241$as_echo "$tool_specified" >&6; }
48242        fi
48243      fi
48244    fi
48245
48246  fi
48247
48248
48249
48250  if test "x$JTREGEXE" = x; then
48251    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48252  fi
48253
48254
48255      JT_HOME="`$DIRNAME $JTREGEXE`"
48256    fi
48257  fi
48258
48259
48260
48261
48262
48263
48264  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48265  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48266  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48267  #                              commands produced by the link step (currently AIX only)
48268  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48269    COMPILER_TARGET_BITS_FLAG="-q"
48270    COMPILER_COMMAND_FILE_FLAG="-f"
48271    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48272  else
48273    COMPILER_TARGET_BITS_FLAG="-m"
48274    COMPILER_COMMAND_FILE_FLAG="@"
48275    COMPILER_BINDCMD_FILE_FLAG=""
48276
48277    # The solstudio linker does not support @-files.
48278    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48279      COMPILER_COMMAND_FILE_FLAG=
48280    fi
48281
48282    # Check if @file is supported by gcc
48283    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48284      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48285$as_echo_n "checking if @file is supported by gcc... " >&6; }
48286      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48287      $ECHO "" "--version" > command.file
48288      if $CXX @command.file 2>&5 >&5; then
48289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48290$as_echo "yes" >&6; }
48291        COMPILER_COMMAND_FILE_FLAG="@"
48292      else
48293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48294$as_echo "no" >&6; }
48295        COMPILER_COMMAND_FILE_FLAG=
48296      fi
48297      rm -rf command.file
48298    fi
48299  fi
48300
48301
48302
48303
48304  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48305  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48306    ARFLAGS="-r"
48307  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48308    ARFLAGS="-X64"
48309  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48310    # lib.exe is used as AR to create static libraries.
48311    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48312  else
48313    ARFLAGS=""
48314  fi
48315
48316
48317  ## Setup strip.
48318  # FIXME: should this really be per platform, or should it be per toolchain type?
48319  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48320  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48321  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48322    STRIPFLAGS="-g"
48323  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48324    STRIPFLAGS="-x"
48325  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48326    STRIPFLAGS="-S"
48327  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48328    STRIPFLAGS="-X32_64"
48329  fi
48330
48331
48332
48333  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48334    CC_OUT_OPTION=-Fo
48335    EXE_OUT_OPTION=-out:
48336    LD_OUT_OPTION=-out:
48337    AR_OUT_OPTION=-out:
48338  else
48339    # The option used to specify the target .o,.a or .so file.
48340    # When compiling, how to specify the to be created object file.
48341    CC_OUT_OPTION='-o$(SPACE)'
48342    # When linking, how to specify the to be created executable.
48343    EXE_OUT_OPTION='-o$(SPACE)'
48344    # When linking, how to specify the to be created dynamically linkable library.
48345    LD_OUT_OPTION='-o$(SPACE)'
48346    # When archiving, how to specify the to be create static archive for object files.
48347    AR_OUT_OPTION='rcs$(SPACE)'
48348  fi
48349
48350
48351
48352
48353
48354  # On Windows, we need to set RC flags.
48355  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48356    RC_FLAGS="-nologo -l0x409"
48357    JVM_RCFLAGS="-nologo"
48358    if test "x$DEBUG_LEVEL" = xrelease; then
48359      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48360      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48361    fi
48362
48363    # The version variables used to create RC_FLAGS may be overridden
48364    # in a custom configure script, or possibly the command line.
48365    # Let those variables be expanded at make time in spec.gmk.
48366    # The \$ are escaped to the shell, and the $(...) variables
48367    # are evaluated by make.
48368    RC_FLAGS="$RC_FLAGS \
48369        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48370        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48371        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48372        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48373        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48374        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48375        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48376
48377    JVM_RCFLAGS="$JVM_RCFLAGS \
48378        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48379        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48380        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48381        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48382        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48383        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48384        -D\"HS_FNAME=jvm.dll\" \
48385        -D\"HS_INTERNAL_NAME=jvm\""
48386  fi
48387
48388
48389
48390  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48391    # silence copyright notice and other headers.
48392    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48393  fi
48394
48395
48396# Now we can test some aspects on the target using configure macros.
48397
48398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48399$as_echo_n "checking for ANSI C header files... " >&6; }
48400if ${ac_cv_header_stdc+:} false; then :
48401  $as_echo_n "(cached) " >&6
48402else
48403  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48404/* end confdefs.h.  */
48405#include <stdlib.h>
48406#include <stdarg.h>
48407#include <string.h>
48408#include <float.h>
48409
48410int
48411main ()
48412{
48413
48414  ;
48415  return 0;
48416}
48417_ACEOF
48418if ac_fn_cxx_try_compile "$LINENO"; then :
48419  ac_cv_header_stdc=yes
48420else
48421  ac_cv_header_stdc=no
48422fi
48423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48424
48425if test $ac_cv_header_stdc = yes; then
48426  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48427  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48428/* end confdefs.h.  */
48429#include <string.h>
48430
48431_ACEOF
48432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48433  $EGREP "memchr" >/dev/null 2>&1; then :
48434
48435else
48436  ac_cv_header_stdc=no
48437fi
48438rm -f conftest*
48439
48440fi
48441
48442if test $ac_cv_header_stdc = yes; then
48443  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48445/* end confdefs.h.  */
48446#include <stdlib.h>
48447
48448_ACEOF
48449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48450  $EGREP "free" >/dev/null 2>&1; then :
48451
48452else
48453  ac_cv_header_stdc=no
48454fi
48455rm -f conftest*
48456
48457fi
48458
48459if test $ac_cv_header_stdc = yes; then
48460  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48461  if test "$cross_compiling" = yes; then :
48462  :
48463else
48464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48465/* end confdefs.h.  */
48466#include <ctype.h>
48467#include <stdlib.h>
48468#if ((' ' & 0x0FF) == 0x020)
48469# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48470# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48471#else
48472# define ISLOWER(c) \
48473		   (('a' <= (c) && (c) <= 'i') \
48474		     || ('j' <= (c) && (c) <= 'r') \
48475		     || ('s' <= (c) && (c) <= 'z'))
48476# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48477#endif
48478
48479#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48480int
48481main ()
48482{
48483  int i;
48484  for (i = 0; i < 256; i++)
48485    if (XOR (islower (i), ISLOWER (i))
48486	|| toupper (i) != TOUPPER (i))
48487      return 2;
48488  return 0;
48489}
48490_ACEOF
48491if ac_fn_cxx_try_run "$LINENO"; then :
48492
48493else
48494  ac_cv_header_stdc=no
48495fi
48496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48497  conftest.$ac_objext conftest.beam conftest.$ac_ext
48498fi
48499
48500fi
48501fi
48502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48503$as_echo "$ac_cv_header_stdc" >&6; }
48504if test $ac_cv_header_stdc = yes; then
48505
48506$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48507
48508fi
48509
48510# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48511for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48512		  inttypes.h stdint.h unistd.h
48513do :
48514  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48515ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48516"
48517if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48518  cat >>confdefs.h <<_ACEOF
48519#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48520_ACEOF
48521
48522fi
48523
48524done
48525
48526
48527
48528  ###############################################################################
48529  #
48530  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48531  # (The JVM can use 32 or 64 bit Java pointers but that decision
48532  # is made at runtime.)
48533  #
48534
48535  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48536    # Always specify -m flag on Solaris
48537    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48538
48539  # When we add flags to the "official" CFLAGS etc, we need to
48540  # keep track of these additions in ADDED_CFLAGS etc. These
48541  # will later be checked to make sure only controlled additions
48542  # have been made to CFLAGS etc.
48543  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48544  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48545  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48546
48547  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48548  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48549  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48550
48551  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48552  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48553  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48554
48555  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48556  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48557  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48558
48559  elif test "x$COMPILE_TYPE" = xreduced; then
48560    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48561      # Specify -m if running reduced on unix platforms
48562
48563  # When we add flags to the "official" CFLAGS etc, we need to
48564  # keep track of these additions in ADDED_CFLAGS etc. These
48565  # will later be checked to make sure only controlled additions
48566  # have been made to CFLAGS etc.
48567  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48568  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48569  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48570
48571  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48572  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48573  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48574
48575  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48576  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48577  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48578
48579  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48580  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48581  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48582
48583    fi
48584  fi
48585  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48586    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48587    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48588    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48589  fi
48590
48591  # Make compilation sanity check
48592  for ac_header in stdio.h
48593do :
48594  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48595if test "x$ac_cv_header_stdio_h" = xyes; then :
48596  cat >>confdefs.h <<_ACEOF
48597#define HAVE_STDIO_H 1
48598_ACEOF
48599
48600else
48601
48602    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48603$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48604    if test "x$COMPILE_TYPE" = xreduced; then
48605
48606  # Print a helpful message on how to acquire the necessary build dependency.
48607  # reduced is the help tag: freetype, cups, alsa etc
48608  MISSING_DEPENDENCY=reduced
48609
48610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48611    cygwin_help $MISSING_DEPENDENCY
48612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48613    msys_help $MISSING_DEPENDENCY
48614  else
48615    PKGHANDLER_COMMAND=
48616
48617    case $PKGHANDLER in
48618      apt-get)
48619        apt_help     $MISSING_DEPENDENCY ;;
48620      yum)
48621        yum_help     $MISSING_DEPENDENCY ;;
48622      port)
48623        port_help    $MISSING_DEPENDENCY ;;
48624      pkgutil)
48625        pkgutil_help $MISSING_DEPENDENCY ;;
48626      pkgadd)
48627        pkgadd_help  $MISSING_DEPENDENCY ;;
48628    esac
48629
48630    if test "x$PKGHANDLER_COMMAND" != x; then
48631      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48632    fi
48633  fi
48634
48635      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48636$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48637    elif test "x$COMPILE_TYPE" = xcross; then
48638      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48639$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48640    fi
48641    as_fn_error $? "Cannot continue." "$LINENO" 5
48642
48643fi
48644
48645done
48646
48647
48648  # The cast to long int works around a bug in the HP C Compiler
48649# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48650# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48651# This bug is HP SR number 8606223364.
48652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48653$as_echo_n "checking size of int *... " >&6; }
48654if ${ac_cv_sizeof_int_p+:} false; then :
48655  $as_echo_n "(cached) " >&6
48656else
48657  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48658
48659else
48660  if test "$ac_cv_type_int_p" = yes; then
48661     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48663as_fn_error 77 "cannot compute sizeof (int *)
48664See \`config.log' for more details" "$LINENO" 5; }
48665   else
48666     ac_cv_sizeof_int_p=0
48667   fi
48668fi
48669
48670fi
48671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48672$as_echo "$ac_cv_sizeof_int_p" >&6; }
48673
48674
48675
48676cat >>confdefs.h <<_ACEOF
48677#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48678_ACEOF
48679
48680
48681
48682  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48683  if test "x$ac_cv_sizeof_int_p" = x; then
48684    # The test failed, lets stick to the assumed value.
48685    { $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
48686$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48687  else
48688    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48689
48690    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48691      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48692      # Let's try to implicitely set the compilers target architecture and retry the test
48693      { $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
48694$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;}
48695      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48696$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48697
48698  # When we add flags to the "official" CFLAGS etc, we need to
48699  # keep track of these additions in ADDED_CFLAGS etc. These
48700  # will later be checked to make sure only controlled additions
48701  # have been made to CFLAGS etc.
48702  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48703  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48704  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48705
48706  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48707  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48708  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48709
48710  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48711  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48712  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48713
48714  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48715  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48716  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48717
48718
48719      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48720      unset ac_cv_sizeof_int_p
48721      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48722      cat >>confdefs.h <<_ACEOF
48723#undef SIZEOF_INT_P
48724_ACEOF
48725
48726      # The cast to long int works around a bug in the HP C Compiler
48727# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48728# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48729# This bug is HP SR number 8606223364.
48730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48731$as_echo_n "checking size of int *... " >&6; }
48732if ${ac_cv_sizeof_int_p+:} false; then :
48733  $as_echo_n "(cached) " >&6
48734else
48735  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48736
48737else
48738  if test "$ac_cv_type_int_p" = yes; then
48739     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48741as_fn_error 77 "cannot compute sizeof (int *)
48742See \`config.log' for more details" "$LINENO" 5; }
48743   else
48744     ac_cv_sizeof_int_p=0
48745   fi
48746fi
48747
48748fi
48749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48750$as_echo "$ac_cv_sizeof_int_p" >&6; }
48751
48752
48753
48754cat >>confdefs.h <<_ACEOF
48755#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48756_ACEOF
48757
48758
48759
48760      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48761
48762      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48763        { $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
48764$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;}
48765        if test "x$COMPILE_TYPE" = xreduced; then
48766
48767  # Print a helpful message on how to acquire the necessary build dependency.
48768  # reduced is the help tag: freetype, cups, alsa etc
48769  MISSING_DEPENDENCY=reduced
48770
48771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48772    cygwin_help $MISSING_DEPENDENCY
48773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48774    msys_help $MISSING_DEPENDENCY
48775  else
48776    PKGHANDLER_COMMAND=
48777
48778    case $PKGHANDLER in
48779      apt-get)
48780        apt_help     $MISSING_DEPENDENCY ;;
48781      yum)
48782        yum_help     $MISSING_DEPENDENCY ;;
48783      port)
48784        port_help    $MISSING_DEPENDENCY ;;
48785      pkgutil)
48786        pkgutil_help $MISSING_DEPENDENCY ;;
48787      pkgadd)
48788        pkgadd_help  $MISSING_DEPENDENCY ;;
48789    esac
48790
48791    if test "x$PKGHANDLER_COMMAND" != x; then
48792      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48793    fi
48794  fi
48795
48796          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48797$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48798        elif test "x$COMPILE_TYPE" = xcross; then
48799          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48800$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48801        fi
48802        as_fn_error $? "Cannot continue." "$LINENO" 5
48803      fi
48804    fi
48805  fi
48806
48807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48808$as_echo_n "checking for target address size... " >&6; }
48809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48810$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48811
48812
48813  ###############################################################################
48814  #
48815  # Is the target little of big endian?
48816  #
48817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48818$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48819if ${ac_cv_c_bigendian+:} false; then :
48820  $as_echo_n "(cached) " >&6
48821else
48822  ac_cv_c_bigendian=unknown
48823    # See if we're dealing with a universal compiler.
48824    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48825/* end confdefs.h.  */
48826#ifndef __APPLE_CC__
48827	       not a universal capable compiler
48828	     #endif
48829	     typedef int dummy;
48830
48831_ACEOF
48832if ac_fn_cxx_try_compile "$LINENO"; then :
48833
48834	# Check for potential -arch flags.  It is not universal unless
48835	# there are at least two -arch flags with different values.
48836	ac_arch=
48837	ac_prev=
48838	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48839	 if test -n "$ac_prev"; then
48840	   case $ac_word in
48841	     i?86 | x86_64 | ppc | ppc64)
48842	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48843		 ac_arch=$ac_word
48844	       else
48845		 ac_cv_c_bigendian=universal
48846		 break
48847	       fi
48848	       ;;
48849	   esac
48850	   ac_prev=
48851	 elif test "x$ac_word" = "x-arch"; then
48852	   ac_prev=arch
48853	 fi
48854       done
48855fi
48856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48857    if test $ac_cv_c_bigendian = unknown; then
48858      # See if sys/param.h defines the BYTE_ORDER macro.
48859      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48860/* end confdefs.h.  */
48861#include <sys/types.h>
48862	     #include <sys/param.h>
48863
48864int
48865main ()
48866{
48867#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48868		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48869		     && LITTLE_ENDIAN)
48870	      bogus endian macros
48871	     #endif
48872
48873  ;
48874  return 0;
48875}
48876_ACEOF
48877if ac_fn_cxx_try_compile "$LINENO"; then :
48878  # It does; now see whether it defined to BIG_ENDIAN or not.
48879	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48880/* end confdefs.h.  */
48881#include <sys/types.h>
48882		#include <sys/param.h>
48883
48884int
48885main ()
48886{
48887#if BYTE_ORDER != BIG_ENDIAN
48888		 not big endian
48889		#endif
48890
48891  ;
48892  return 0;
48893}
48894_ACEOF
48895if ac_fn_cxx_try_compile "$LINENO"; then :
48896  ac_cv_c_bigendian=yes
48897else
48898  ac_cv_c_bigendian=no
48899fi
48900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48901fi
48902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48903    fi
48904    if test $ac_cv_c_bigendian = unknown; then
48905      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48906      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48907/* end confdefs.h.  */
48908#include <limits.h>
48909
48910int
48911main ()
48912{
48913#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48914	      bogus endian macros
48915	     #endif
48916
48917  ;
48918  return 0;
48919}
48920_ACEOF
48921if ac_fn_cxx_try_compile "$LINENO"; then :
48922  # It does; now see whether it defined to _BIG_ENDIAN or not.
48923	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48924/* end confdefs.h.  */
48925#include <limits.h>
48926
48927int
48928main ()
48929{
48930#ifndef _BIG_ENDIAN
48931		 not big endian
48932		#endif
48933
48934  ;
48935  return 0;
48936}
48937_ACEOF
48938if ac_fn_cxx_try_compile "$LINENO"; then :
48939  ac_cv_c_bigendian=yes
48940else
48941  ac_cv_c_bigendian=no
48942fi
48943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48944fi
48945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48946    fi
48947    if test $ac_cv_c_bigendian = unknown; then
48948      # Compile a test program.
48949      if test "$cross_compiling" = yes; then :
48950  # Try to guess by grepping values from an object file.
48951	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48952/* end confdefs.h.  */
48953short int ascii_mm[] =
48954		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48955		short int ascii_ii[] =
48956		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48957		int use_ascii (int i) {
48958		  return ascii_mm[i] + ascii_ii[i];
48959		}
48960		short int ebcdic_ii[] =
48961		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48962		short int ebcdic_mm[] =
48963		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48964		int use_ebcdic (int i) {
48965		  return ebcdic_mm[i] + ebcdic_ii[i];
48966		}
48967		extern int foo;
48968
48969int
48970main ()
48971{
48972return use_ascii (foo) == use_ebcdic (foo);
48973  ;
48974  return 0;
48975}
48976_ACEOF
48977if ac_fn_cxx_try_compile "$LINENO"; then :
48978  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48979	      ac_cv_c_bigendian=yes
48980	    fi
48981	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48982	      if test "$ac_cv_c_bigendian" = unknown; then
48983		ac_cv_c_bigendian=no
48984	      else
48985		# finding both strings is unlikely to happen, but who knows?
48986		ac_cv_c_bigendian=unknown
48987	      fi
48988	    fi
48989fi
48990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48991else
48992  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48993/* end confdefs.h.  */
48994$ac_includes_default
48995int
48996main ()
48997{
48998
48999	     /* Are we little or big endian?  From Harbison&Steele.  */
49000	     union
49001	     {
49002	       long int l;
49003	       char c[sizeof (long int)];
49004	     } u;
49005	     u.l = 1;
49006	     return u.c[sizeof (long int) - 1] == 1;
49007
49008  ;
49009  return 0;
49010}
49011_ACEOF
49012if ac_fn_cxx_try_run "$LINENO"; then :
49013  ac_cv_c_bigendian=no
49014else
49015  ac_cv_c_bigendian=yes
49016fi
49017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49018  conftest.$ac_objext conftest.beam conftest.$ac_ext
49019fi
49020
49021    fi
49022fi
49023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49024$as_echo "$ac_cv_c_bigendian" >&6; }
49025 case $ac_cv_c_bigendian in #(
49026   yes)
49027     ENDIAN="big";; #(
49028   no)
49029     ENDIAN="little" ;; #(
49030   universal)
49031     ENDIAN="universal_endianness"
49032     ;; #(
49033   *)
49034     ENDIAN="unknown" ;;
49035 esac
49036
49037
49038  if test "x$ENDIAN" = xuniversal_endianness; then
49039    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49040  fi
49041  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49042    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
49043  fi
49044
49045
49046# Configure flags for the tools
49047
49048  ###############################################################################
49049  #
49050  # How to compile shared libraries.
49051  #
49052
49053  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49054    PICFLAG="-fPIC"
49055    C_FLAG_REORDER=''
49056    CXX_FLAG_REORDER=''
49057
49058    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49059      # Linking is different on MacOSX
49060      if test "x$STATIC_BUILD" = xtrue; then
49061        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49062      else
49063        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49064        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49065      fi
49066      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49067      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49068      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49069      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49070    else
49071      # Default works for linux, might work on other platforms as well.
49072      SHARED_LIBRARY_FLAGS='-shared'
49073      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49074      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49075      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49076      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49077    fi
49078  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49079    C_FLAG_REORDER=''
49080    CXX_FLAG_REORDER=''
49081
49082    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49083      # Linking is different on MacOSX
49084      PICFLAG=''
49085      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49086      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49087      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49088      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49089      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49090
49091      if test "x$STATIC_BUILD" = xfalse; then
49092        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49093      fi
49094    else
49095      # Default works for linux, might work on other platforms as well.
49096      PICFLAG='-fPIC'
49097      SHARED_LIBRARY_FLAGS='-shared'
49098      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49099      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49100      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49101      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49102    fi
49103  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49104    PICFLAG="-KPIC"
49105    C_FLAG_REORDER='-xF'
49106    CXX_FLAG_REORDER='-xF'
49107    SHARED_LIBRARY_FLAGS="-G"
49108    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49109    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49110    SET_SHARED_LIBRARY_NAME='-h $1'
49111    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49112  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49113    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49114    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49115    # will have to patch this single instruction with a call to some out-of-order code which
49116    # does the load from the TOC. This is of course slow. But in that case we also would have
49117    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49118    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49119    # can be patched directly by the linker and does not require a jump to out-of-order code.
49120    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49121    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49122    # loads for accessing a global variable). But there are rumors that this may be seen as a
49123    # 'performance feature' because of improved code locality of the symbols used in a
49124    # compilation unit.
49125    PICFLAG="-qpic"
49126    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49127    C_FLAG_REORDER=''
49128    CXX_FLAG_REORDER=''
49129    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49130    SET_EXECUTABLE_ORIGIN=""
49131    SET_SHARED_LIBRARY_ORIGIN=''
49132    SET_SHARED_LIBRARY_NAME=''
49133    SET_SHARED_LIBRARY_MAPFILE=''
49134  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49135    PICFLAG=""
49136    C_FLAG_REORDER=''
49137    CXX_FLAG_REORDER=''
49138    SHARED_LIBRARY_FLAGS="-dll"
49139    SET_EXECUTABLE_ORIGIN=''
49140    SET_SHARED_LIBRARY_ORIGIN=''
49141    SET_SHARED_LIBRARY_NAME=''
49142    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49143  fi
49144
49145
49146
49147
49148
49149
49150
49151
49152
49153  # The (cross) compiler is now configured, we can now test capabilities
49154  # of the target platform.
49155
49156
49157
49158  ###############################################################################
49159  #
49160  # Setup the opt flags for different compilers
49161  # and different operating systems.
49162  #
49163
49164  # FIXME: this was indirectly the old default, but just inherited.
49165  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49166  #   C_FLAG_DEPS="-MMD -MF"
49167  # fi
49168
49169  # Generate make dependency files
49170  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49171    C_FLAG_DEPS="-MMD -MF"
49172  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49173    C_FLAG_DEPS="-MMD -MF"
49174  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49175    C_FLAG_DEPS="-xMMD -xMF"
49176  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49177    C_FLAG_DEPS="-qmakedep=gcc -MF"
49178  fi
49179  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49180
49181
49182
49183  # Debug symbols
49184  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49185    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49186      # reduce from default "-g2" option to save space
49187      CFLAGS_DEBUG_SYMBOLS="-g1"
49188      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49189    else
49190      CFLAGS_DEBUG_SYMBOLS="-g"
49191      CXXFLAGS_DEBUG_SYMBOLS="-g"
49192    fi
49193  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49194    CFLAGS_DEBUG_SYMBOLS="-g"
49195    CXXFLAGS_DEBUG_SYMBOLS="-g"
49196  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49197    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49198    # -g0 enables debug symbols without disabling inlining.
49199    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49200  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49201    CFLAGS_DEBUG_SYMBOLS="-g"
49202    CXXFLAGS_DEBUG_SYMBOLS="-g"
49203  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49204    CFLAGS_DEBUG_SYMBOLS="-Zi"
49205    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49206  fi
49207
49208
49209
49210  # Debug symbols for JVM_CFLAGS
49211  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49212    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49213    if test "x$DEBUG_LEVEL" = xslowdebug; then
49214      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49215    else
49216      # -g0 does not disable inlining, which -g does.
49217      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49218    fi
49219  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49220    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49221  else
49222    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49223  fi
49224
49225
49226  # bounds, memory and behavior checking options
49227  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49228    case $DEBUG_LEVEL in
49229    release )
49230      # no adjustment
49231      ;;
49232    fastdebug )
49233      # no adjustment
49234      ;;
49235    slowdebug )
49236      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49237      # get's added conditionally on whether we produce debug symbols or not.
49238      # This is most likely not really correct.
49239
49240      # Add runtime stack smashing and undefined behavior checks.
49241      # Not all versions of gcc support -fstack-protector
49242      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285    # Execute function body
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    # Execute function body
49335
49336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49337$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49338  supports=yes
49339
49340  saved_cflags="$CFLAGS"
49341  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49342  ac_ext=c
49343ac_cpp='$CPP $CPPFLAGS'
49344ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49345ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49346ac_compiler_gnu=$ac_cv_c_compiler_gnu
49347
49348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49349/* end confdefs.h.  */
49350int i;
49351_ACEOF
49352if ac_fn_c_try_compile "$LINENO"; then :
49353
49354else
49355  supports=no
49356fi
49357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49358  ac_ext=cpp
49359ac_cpp='$CXXCPP $CPPFLAGS'
49360ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49361ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49362ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49363
49364  CFLAGS="$saved_cflags"
49365
49366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49367$as_echo "$supports" >&6; }
49368  if test "x$supports" = "xyes" ; then
49369    :
49370    C_COMP_SUPPORTS="yes"
49371  else
49372    :
49373    C_COMP_SUPPORTS="no"
49374  fi
49375
49376
49377
49378
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434    # Execute function body
49435
49436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49437$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49438  supports=yes
49439
49440  saved_cxxflags="$CXXFLAGS"
49441  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49442  ac_ext=cpp
49443ac_cpp='$CXXCPP $CPPFLAGS'
49444ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49445ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49446ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49447
49448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49449/* end confdefs.h.  */
49450int i;
49451_ACEOF
49452if ac_fn_cxx_try_compile "$LINENO"; then :
49453
49454else
49455  supports=no
49456fi
49457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49458  ac_ext=cpp
49459ac_cpp='$CXXCPP $CPPFLAGS'
49460ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49461ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49462ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49463
49464  CXXFLAGS="$saved_cxxflags"
49465
49466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49467$as_echo "$supports" >&6; }
49468  if test "x$supports" = "xyes" ; then
49469    :
49470    CXX_COMP_SUPPORTS="yes"
49471  else
49472    :
49473    CXX_COMP_SUPPORTS="no"
49474  fi
49475
49476
49477
49478
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49489$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49490  supports=no
49491  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49492
49493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49494$as_echo "$supports" >&6; }
49495  if test "x$supports" = "xyes" ; then
49496    :
49497
49498  else
49499    :
49500    STACK_PROTECTOR_CFLAG=""
49501  fi
49502
49503
49504
49505
49506
49507
49508
49509      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49510      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49511      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49512        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49513      fi
49514      ;;
49515    esac
49516  fi
49517
49518  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49519    if test "x$DEBUG_LEVEL" != xrelease; then
49520      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49521        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49522      fi
49523    fi
49524  fi
49525
49526  # Optimization levels
49527  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49528    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49529
49530    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49531      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49532      C_O_FLAG_HIGHEST_JVM="-xO4"
49533      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49534      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49535      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49536      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49537      C_O_FLAG_DEBUG_JVM=""
49538      C_O_FLAG_NONE="-xregs=no%frameptr"
49539      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49540      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49541      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49542      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49543      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49544      CXX_O_FLAG_DEBUG_JVM=""
49545      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49546      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49547        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49548        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49549      fi
49550    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49551      C_O_FLAG_HIGHEST_JVM="-xO4"
49552      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49553      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49554      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49555      C_O_FLAG_DEBUG=""
49556      C_O_FLAG_DEBUG_JVM=""
49557      C_O_FLAG_NONE=""
49558      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49559      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49560      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49561      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49562      CXX_O_FLAG_DEBUG=""
49563      CXX_O_FLAG_DEBUG_JVM=""
49564      CXX_O_FLAG_NONE=""
49565    fi
49566  else
49567    # The remaining toolchains share opt flags between CC and CXX;
49568    # setup for C and duplicate afterwards.
49569    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49570      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49571        # On MacOSX we optimize for size, something
49572        # we should do for all platforms?
49573        C_O_FLAG_HIGHEST_JVM="-Os"
49574        C_O_FLAG_HIGHEST="-Os"
49575        C_O_FLAG_HI="-Os"
49576        C_O_FLAG_NORM="-Os"
49577        C_O_FLAG_SIZE="-Os"
49578      else
49579        C_O_FLAG_HIGHEST_JVM="-O3"
49580        C_O_FLAG_HIGHEST="-O3"
49581        C_O_FLAG_HI="-O3"
49582        C_O_FLAG_NORM="-O2"
49583        C_O_FLAG_SIZE="-Os"
49584      fi
49585      C_O_FLAG_DEBUG="-O0"
49586      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49587        C_O_FLAG_DEBUG_JVM=""
49588      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49589        C_O_FLAG_DEBUG_JVM="-O0"
49590      fi
49591      C_O_FLAG_NONE="-O0"
49592    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49593      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49594        # On MacOSX we optimize for size, something
49595        # we should do for all platforms?
49596        C_O_FLAG_HIGHEST_JVM="-Os"
49597        C_O_FLAG_HIGHEST="-Os"
49598        C_O_FLAG_HI="-Os"
49599        C_O_FLAG_NORM="-Os"
49600        C_O_FLAG_SIZE="-Os"
49601      else
49602        C_O_FLAG_HIGHEST_JVM="-O3"
49603        C_O_FLAG_HIGHEST="-O3"
49604        C_O_FLAG_HI="-O3"
49605        C_O_FLAG_NORM="-O2"
49606        C_O_FLAG_SIZE="-Os"
49607      fi
49608      C_O_FLAG_DEBUG="-O0"
49609      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49610        C_O_FLAG_DEBUG_JVM=""
49611      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49612        C_O_FLAG_DEBUG_JVM="-O0"
49613      fi
49614      C_O_FLAG_NONE="-O0"
49615    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49616      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49617      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49618      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49619      C_O_FLAG_NORM="-O2"
49620      C_O_FLAG_DEBUG="-qnoopt"
49621      # FIXME: Value below not verified.
49622      C_O_FLAG_DEBUG_JVM=""
49623      C_O_FLAG_NONE="-qnoopt"
49624    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49625      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49626      C_O_FLAG_HIGHEST="-O2"
49627      C_O_FLAG_HI="-O1"
49628      C_O_FLAG_NORM="-O1"
49629      C_O_FLAG_DEBUG="-Od"
49630      C_O_FLAG_DEBUG_JVM=""
49631      C_O_FLAG_NONE="-Od"
49632      C_O_FLAG_SIZE="-Os"
49633    fi
49634    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49635    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49636    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49637    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49638    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49639    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49640    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49641    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49642  fi
49643
49644  # Adjust optimization flags according to debug level.
49645  case $DEBUG_LEVEL in
49646    release )
49647      # no adjustment
49648      ;;
49649    fastdebug )
49650      # Not quite so much optimization
49651      C_O_FLAG_HI="$C_O_FLAG_NORM"
49652      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49653      ;;
49654    slowdebug )
49655      # Disable optimization
49656      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49657      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49658      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49659      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49660      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49661      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49662      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49663      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49664      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49665      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49666      ;;
49667  esac
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687  # Special extras...
49688  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49689    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49690      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49691      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49692    fi
49693    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49694    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49695  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49696    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49697    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49698  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49699    CXXSTD_CXXFLAG="-std=gnu++98"
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742    # Execute function body
49743
49744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49745$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49746  supports=yes
49747
49748  saved_cxxflags="$CXXFLAGS"
49749  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49750  ac_ext=cpp
49751ac_cpp='$CXXCPP $CPPFLAGS'
49752ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49753ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49754ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49755
49756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49757/* end confdefs.h.  */
49758int i;
49759_ACEOF
49760if ac_fn_cxx_try_compile "$LINENO"; then :
49761
49762else
49763  supports=no
49764fi
49765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49766  ac_ext=cpp
49767ac_cpp='$CXXCPP $CPPFLAGS'
49768ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49769ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49770ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49771
49772  CXXFLAGS="$saved_cxxflags"
49773
49774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49775$as_echo "$supports" >&6; }
49776  if test "x$supports" = "xyes" ; then
49777    :
49778
49779  else
49780    :
49781    CXXSTD_CXXFLAG=""
49782  fi
49783
49784
49785
49786
49787
49788
49789
49790
49791
49792
49793
49794
49795    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49796
49797  fi
49798  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49799    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49800    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49801    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49802    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49803    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49804  fi
49805
49806  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49807    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49808    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49809    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49810  fi
49811
49812  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49813  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49814  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49815
49816  ###############################################################################
49817  #
49818  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49819  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49820  #
49821
49822  # Setup compiler/platform specific flags into
49823  #    CFLAGS_JDK    - C Compiler flags
49824  #    CXXFLAGS_JDK  - C++ Compiler flags
49825  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49826  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49827    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49828    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49829    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49830    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49831      # Force compatibility with i586 on 32 bit intel platforms.
49832      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49833      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49834    fi
49835    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49836        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49837    case $OPENJDK_TARGET_CPU_ARCH in
49838      arm )
49839        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49840        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49841        ;;
49842      ppc )
49843        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49844        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49845        ;;
49846      * )
49847        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49848        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49849        ;;
49850    esac
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905    # Execute function body
49906
49907  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49908  REFERENCE_VERSION=6
49909
49910  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49911    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49912  fi
49913
49914  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49915    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49916  fi
49917
49918  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49919  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49920
49921  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49922    :
49923
49924  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49925  # runs afoul of the more aggressive versions of these optimisations.
49926  # Notably, value range propagation now assumes that the this pointer of C++
49927  # member functions is non-null.
49928  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969
49970
49971    # Execute function body
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020    # Execute function body
50021
50022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50023$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50024  supports=yes
50025
50026  saved_cflags="$CFLAGS"
50027  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
50028  ac_ext=c
50029ac_cpp='$CPP $CPPFLAGS'
50030ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50031ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50032ac_compiler_gnu=$ac_cv_c_compiler_gnu
50033
50034  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50035/* end confdefs.h.  */
50036int i;
50037_ACEOF
50038if ac_fn_c_try_compile "$LINENO"; then :
50039
50040else
50041  supports=no
50042fi
50043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50044  ac_ext=cpp
50045ac_cpp='$CXXCPP $CPPFLAGS'
50046ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50047ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50048ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50049
50050  CFLAGS="$saved_cflags"
50051
50052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50053$as_echo "$supports" >&6; }
50054  if test "x$supports" = "xyes" ; then
50055    :
50056    C_COMP_SUPPORTS="yes"
50057  else
50058    :
50059    C_COMP_SUPPORTS="no"
50060  fi
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
50114
50115
50116
50117
50118
50119
50120    # Execute function body
50121
50122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50123$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50124  supports=yes
50125
50126  saved_cxxflags="$CXXFLAGS"
50127  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
50128  ac_ext=cpp
50129ac_cpp='$CXXCPP $CPPFLAGS'
50130ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50131ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50132ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50133
50134  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50135/* end confdefs.h.  */
50136int i;
50137_ACEOF
50138if ac_fn_cxx_try_compile "$LINENO"; then :
50139
50140else
50141  supports=no
50142fi
50143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50144  ac_ext=cpp
50145ac_cpp='$CXXCPP $CPPFLAGS'
50146ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50147ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50148ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50149
50150  CXXFLAGS="$saved_cxxflags"
50151
50152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50153$as_echo "$supports" >&6; }
50154  if test "x$supports" = "xyes" ; then
50155    :
50156    CXX_COMP_SUPPORTS="yes"
50157  else
50158    :
50159    CXX_COMP_SUPPORTS="no"
50160  fi
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50175$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50176  supports=no
50177  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50178
50179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50180$as_echo "$supports" >&6; }
50181  if test "x$supports" = "xyes" ; then
50182    :
50183
50184  else
50185    :
50186    NO_NULL_POINTER_CHECK_CFLAG=""
50187  fi
50188
50189
50190
50191
50192
50193
50194
50195  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218
50219
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238    # Execute function body
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275
50276
50277
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287    # Execute function body
50288
50289  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50290$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50291  supports=yes
50292
50293  saved_cflags="$CFLAGS"
50294  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
50295  ac_ext=c
50296ac_cpp='$CPP $CPPFLAGS'
50297ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50298ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50299ac_compiler_gnu=$ac_cv_c_compiler_gnu
50300
50301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50302/* end confdefs.h.  */
50303int i;
50304_ACEOF
50305if ac_fn_c_try_compile "$LINENO"; then :
50306
50307else
50308  supports=no
50309fi
50310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50311  ac_ext=cpp
50312ac_cpp='$CXXCPP $CPPFLAGS'
50313ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50314ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50315ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50316
50317  CFLAGS="$saved_cflags"
50318
50319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50320$as_echo "$supports" >&6; }
50321  if test "x$supports" = "xyes" ; then
50322    :
50323    C_COMP_SUPPORTS="yes"
50324  else
50325    :
50326    C_COMP_SUPPORTS="no"
50327  fi
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366
50367
50368
50369
50370
50371
50372
50373
50374
50375
50376
50377
50378
50379
50380
50381
50382
50383
50384
50385
50386
50387    # Execute function body
50388
50389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50390$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50391  supports=yes
50392
50393  saved_cxxflags="$CXXFLAGS"
50394  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
50395  ac_ext=cpp
50396ac_cpp='$CXXCPP $CPPFLAGS'
50397ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50398ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50399ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50400
50401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50402/* end confdefs.h.  */
50403int i;
50404_ACEOF
50405if ac_fn_cxx_try_compile "$LINENO"; then :
50406
50407else
50408  supports=no
50409fi
50410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50411  ac_ext=cpp
50412ac_cpp='$CXXCPP $CPPFLAGS'
50413ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50414ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50415ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50416
50417  CXXFLAGS="$saved_cxxflags"
50418
50419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50420$as_echo "$supports" >&6; }
50421  if test "x$supports" = "xyes" ; then
50422    :
50423    CXX_COMP_SUPPORTS="yes"
50424  else
50425    :
50426    CXX_COMP_SUPPORTS="no"
50427  fi
50428
50429
50430
50431
50432
50433
50434
50435
50436
50437
50438
50439
50440
50441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50442$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50443  supports=no
50444  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50445
50446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50447$as_echo "$supports" >&6; }
50448  if test "x$supports" = "xyes" ; then
50449    :
50450
50451  else
50452    :
50453    NO_LIFETIME_DSE_CFLAG=""
50454  fi
50455
50456
50457
50458
50459
50460
50461  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50462
50463
50464
50465  else
50466    :
50467
50468  fi
50469
50470
50471
50472
50473
50474
50475
50476
50477
50478
50479
50480
50481
50482
50483  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50484    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50485
50486    # Restrict the debug information created by Clang to avoid
50487    # too big object files and speed the build up a little bit
50488    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50489    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50490    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50491      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50492        # Force compatibility with i586 on 32 bit intel platforms.
50493        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50494        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50495      fi
50496      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50497      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50498          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50499      case $OPENJDK_TARGET_CPU_ARCH in
50500        ppc )
50501          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50502          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50503          ;;
50504        * )
50505          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50506          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50507          ;;
50508      esac
50509    fi
50510  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50511    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50512    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50513    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50514      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50515    fi
50516
50517    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50518    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50519  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50520    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50521    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50522    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50523  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50524    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50525        -MD -Zc:wchar_t- -W3 -wd4800 \
50526        -DWIN32_LEAN_AND_MEAN \
50527        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50528        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50529        -DWIN32 -DIAL"
50530    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50531      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50532    else
50533      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50534    fi
50535    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50536    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50537    # studio.
50538    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50539      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50540      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50541      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50542    fi
50543  fi
50544
50545  ###############################################################################
50546
50547  # Adjust flags according to debug level.
50548  case $DEBUG_LEVEL in
50549    fastdebug | slowdebug )
50550      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50551      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50552      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50553      ;;
50554    release )
50555      ;;
50556    * )
50557      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50558      ;;
50559  esac
50560
50561  # Set some common defines. These works for all compilers, but assume
50562  # -D is universally accepted.
50563
50564  # Setup endianness
50565  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50566    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50567    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50568    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50569    #   Note: -Dmacro         is the same as    #define macro 1
50570    #         -Dmacro=        is the same as    #define macro
50571    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50572      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50573    else
50574      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50575    fi
50576  else
50577    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50578    # are defined in the system?
50579    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50580      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50581    else
50582      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50583    fi
50584  fi
50585
50586  # Setup target OS define. Use OS target name but in upper case.
50587  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50588  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50589
50590  # Setup target CPU
50591  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50592      $OPENJDK_TARGET_ADD_LP64 \
50593      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50594
50595  # Setup debug/release defines
50596  if test "x$DEBUG_LEVEL" = xrelease; then
50597    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50598    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50599      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50600    fi
50601  else
50602    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50603  fi
50604
50605  # Set some additional per-OS defines.
50606  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50607    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50608    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50609        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50610  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50611    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50612    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50613        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50614  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50615    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50616    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50617    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50618    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50619        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50620        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50621        -fno-omit-frame-pointer"
50622  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50623    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50624    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50625    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50626        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50627        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50628  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50629    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50630  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50631    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50632    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50633  fi
50634
50635  # Set some additional per-CPU defines.
50636  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50637    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50638  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50639    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50640  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50641    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50642      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50643      # fixes `relocation truncated to fit' error for gcc 4.1.
50644      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50645      # Use ppc64 instructions, but schedule for power5
50646      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50647    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50648      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50649    fi
50650  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50651    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50652      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50653      # Little endian machine uses ELFv2 ABI.
50654      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50655      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50656      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50657    fi
50658  fi
50659
50660  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50661    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50662  fi
50663
50664  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50665    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50666      # Solaris does not have _LP64=1 in the old build.
50667      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50668      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50669    fi
50670  fi
50671
50672  # Set JVM_CFLAGS warning handling
50673  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50674    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50675        -Wunused-value -Woverloaded-virtual"
50676
50677    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732    # Execute function body
50733
50734  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50735  REFERENCE_VERSION=4.8
50736
50737  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50738    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50739  fi
50740
50741  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50742    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50743  fi
50744
50745  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50746  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50747
50748  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50749    :
50750
50751            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50752            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50753
50754
50755  else
50756    :
50757
50758  fi
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770
50771
50772
50773    fi
50774    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50775      # Non-zero builds have stricter warnings
50776      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50777    else
50778      if test "x$TOOLCHAIN_TYPE" = xclang; then
50779        # Some versions of llvm do not like -Wundef
50780        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50781      fi
50782    fi
50783  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50784    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50785        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50786  fi
50787
50788  # Additional macosx handling
50789  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50790    # Setting these parameters makes it an error to link to macosx APIs that are
50791    # newer than the given OS version and makes the linked binaries compatible
50792    # even if built on a newer version of the OS.
50793    # The expected format is X.Y.Z
50794    MACOSX_VERSION_MIN=10.7.0
50795
50796
50797    # The macro takes the version with no dots, ex: 1070
50798    # Let the flags variables get resolved in make for easier override on make
50799    # command line.
50800    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50801    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50802  fi
50803
50804  # Setup some hard coded includes
50805  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50806      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50807      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50808      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50809      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50810      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50811
50812  # The shared libraries are compiled using the picflag.
50813  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50814      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50815  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50816      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50817
50818  # Executable flags
50819  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50820  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50821
50822
50823
50824
50825
50826
50827  # Setup LDFLAGS et al.
50828  #
50829
50830  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50831    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50832    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50833    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50834    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50835      LDFLAGS_SAFESH="-safeseh"
50836      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50837      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50838      # NOTE: Old build added -machine. Probably not needed.
50839      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50840    else
50841      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50842    fi
50843  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50844      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50845      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50846        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50847        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50848    fi
50849  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50850    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50851    # We have previously set HAS_GNU_HASH if this is the case
50852    if test -n "$HAS_GNU_HASH"; then
50853      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50854      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50855      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50856    fi
50857      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50858        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50859    fi
50860    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50861      # And since we now know that the linker is gnu, then add -z defs, to forbid
50862      # undefined symbols in object files.
50863      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50864      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50865      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50866      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50867      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50868      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50869        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50870      fi
50871      case $DEBUG_LEVEL in
50872        release )
50873          # tell linker to optimize libraries.
50874          # Should this be supplied to the OSS linker as well?
50875          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50876          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50877          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50878          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50879            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50880          fi
50881          ;;
50882        slowdebug )
50883          # Hotspot always let the linker optimize
50884          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50885          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50886            # do relocations at load
50887            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50888            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50889            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50890          fi
50891          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50892            # mark relocations read only
50893            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50894            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50895            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50896          fi
50897          ;;
50898        fastdebug )
50899          # Hotspot always let the linker optimize
50900          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50901          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50902            # mark relocations read only
50903            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50904            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50905            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50906          fi
50907          ;;
50908        * )
50909          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50910          ;;
50911        esac
50912    fi
50913  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50914    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50915    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50916    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50917    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50918    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50919    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50920      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50921    fi
50922  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50923    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50924    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50925    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50926  fi
50927
50928  # Customize LDFLAGS for executables
50929
50930  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50931
50932  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50933    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50934      LDFLAGS_STACK_SIZE=1048576
50935    else
50936      LDFLAGS_STACK_SIZE=327680
50937    fi
50938    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50939  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50940    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50941  fi
50942
50943  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50944
50945  # Customize LDFLAGS for libs
50946  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50947
50948  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50949  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50950    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50951        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50952    JDKLIB_LIBS=""
50953  else
50954    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50955        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50956
50957    if test "xTARGET" = "xTARGET"; then
50958    # On some platforms (mac) the linker warns about non existing -L dirs.
50959    # Add server first if available. Linking aginst client does not always produce the same results.
50960      # Only add client/minimal dir if client/minimal is being built.
50961    # Default to server for other variants.
50962      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50963        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50964      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50965        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50966      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50967        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50968    else
50969        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50970    fi
50971    elif test "xTARGET" = "xBUILD"; then
50972      # When building a buildjdk, it's always only the server variant
50973      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50974          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50975    fi
50976
50977    JDKLIB_LIBS="-ljava -ljvm"
50978    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50979      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50980    fi
50981
50982  fi
50983
50984  # Set JVM_LIBS (per os)
50985  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50986    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50987  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50988    # FIXME: This hard-coded path is not really proper.
50989    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50990      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50991    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50992      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50993    fi
50994    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50995        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50996  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50997    JVM_LIBS="$JVM_LIBS -lm"
50998  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50999    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51000  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51001    JVM_LIBS="$JVM_LIBS -lm"
51002  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51003    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51004        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51005        wsock32.lib winmm.lib version.lib psapi.lib"
51006    fi
51007
51008  # Set JVM_ASFLAGS
51009  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51010    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51011      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51012    fi
51013  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51014    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51015  fi
51016
51017  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51018
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033  # Special extras...
51034  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51035    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51036      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51037      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51038    fi
51039    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51040    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51041  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51042    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51043    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51044  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51045    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078
51079
51080
51081
51082
51083
51084
51085
51086
51087
51088    # Execute function body
51089
51090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51091$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51092  supports=yes
51093
51094  saved_cxxflags="$CXXFLAGS"
51095  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51096  ac_ext=cpp
51097ac_cpp='$CXXCPP $CPPFLAGS'
51098ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51099ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51100ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51101
51102  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51103/* end confdefs.h.  */
51104int i;
51105_ACEOF
51106if ac_fn_cxx_try_compile "$LINENO"; then :
51107
51108else
51109  supports=no
51110fi
51111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51112  ac_ext=cpp
51113ac_cpp='$CXXCPP $CPPFLAGS'
51114ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51115ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51116ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51117
51118  CXXFLAGS="$saved_cxxflags"
51119
51120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51121$as_echo "$supports" >&6; }
51122  if test "x$supports" = "xyes" ; then
51123    :
51124
51125  else
51126    :
51127    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51128  fi
51129
51130
51131
51132
51133
51134
51135
51136
51137
51138
51139
51140
51141    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51142
51143  fi
51144  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51145    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51146    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51147    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
51148    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51149    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51150  fi
51151
51152  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51153    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51154    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51155    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
51156  fi
51157
51158  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51159  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51160  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51161
51162  ###############################################################################
51163  #
51164  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51165  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51166  #
51167
51168  # Setup compiler/platform specific flags into
51169  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51170  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51171  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51172  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51173    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51174    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51175    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51176    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51177      # Force compatibility with i586 on 32 bit intel platforms.
51178      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51179      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51180    fi
51181    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51182        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51183    case $OPENJDK_BUILD_CPU_ARCH in
51184      arm )
51185        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51186        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51187        ;;
51188      ppc )
51189        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51190        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51191        ;;
51192      * )
51193        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51194        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51195        ;;
51196    esac
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220
51221
51222
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239
51240
51241
51242
51243
51244
51245
51246
51247
51248
51249
51250
51251    # Execute function body
51252
51253  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51254  REFERENCE_VERSION=6
51255
51256  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51257    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
51258  fi
51259
51260  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51261    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51262  fi
51263
51264  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51265  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51266
51267  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51268    :
51269
51270  else
51271    :
51272
51273  fi
51274
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51289    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51290
51291    # Restrict the debug information created by Clang to avoid
51292    # too big object files and speed the build up a little bit
51293    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51294    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51295    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51296      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51297        # Force compatibility with i586 on 32 bit intel platforms.
51298        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51299        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51300      fi
51301      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51302      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51303          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51304      case $OPENJDK_BUILD_CPU_ARCH in
51305        ppc )
51306          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51307          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51308          ;;
51309        * )
51310          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51311          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51312          ;;
51313      esac
51314    fi
51315  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51316    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51317    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51318    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51319      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51320    fi
51321
51322    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51323    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51324  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51325    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51326    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51327    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51328  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51329    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51330        -MD -Zc:wchar_t- -W3 -wd4800 \
51331        -DWIN32_LEAN_AND_MEAN \
51332        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51333        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51334        -DWIN32 -DIAL"
51335    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51336      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51337    else
51338      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51339    fi
51340    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51341    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51342    # studio.
51343    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51344      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51345      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51346      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51347    fi
51348  fi
51349
51350  ###############################################################################
51351
51352  # Adjust flags according to debug level.
51353  case $DEBUG_LEVEL in
51354    fastdebug | slowdebug )
51355      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51356      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51357      JAVAC_FLAGS="$JAVAC_FLAGS -g"
51358      ;;
51359    release )
51360      ;;
51361    * )
51362      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51363      ;;
51364  esac
51365
51366  # Set some common defines. These works for all compilers, but assume
51367  # -D is universally accepted.
51368
51369  # Setup endianness
51370  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51371    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51372    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51373    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51374    #   Note: -Dmacro         is the same as    #define macro 1
51375    #         -Dmacro=        is the same as    #define macro
51376    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51377      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51378    else
51379      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51380    fi
51381  else
51382    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51383    # are defined in the system?
51384    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51385      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51386    else
51387      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51388    fi
51389  fi
51390
51391  # Setup target OS define. Use OS target name but in upper case.
51392  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51393  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51394
51395  # Setup target CPU
51396  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51397      $OPENJDK_BUILD_ADD_LP64 \
51398      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51399
51400  # Setup debug/release defines
51401  if test "x$DEBUG_LEVEL" = xrelease; then
51402    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51403    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51404      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51405    fi
51406  else
51407    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51408  fi
51409
51410  # Set some additional per-OS defines.
51411  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51412    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51413    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
51414        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51415  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51416    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51417    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51418        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
51419  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51420    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51421    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51422    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51423    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51424        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51425        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51426        -fno-omit-frame-pointer"
51427  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51428    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51429    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51430    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51431        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51432        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51433  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51434    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51435  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51436    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51437    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51438  fi
51439
51440  # Set some additional per-CPU defines.
51441  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51442    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51443  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51444    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51445  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51446    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51447      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51448      # fixes `relocation truncated to fit' error for gcc 4.1.
51449      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51450      # Use ppc64 instructions, but schedule for power5
51451      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51452    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51453      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51454    fi
51455  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51456    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51457      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51458      # Little endian machine uses ELFv2 ABI.
51459      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51460      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51461      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
51462    fi
51463  fi
51464
51465  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51466    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51467  fi
51468
51469  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51470    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51471      # Solaris does not have _LP64=1 in the old build.
51472      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51473      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51474    fi
51475  fi
51476
51477  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51478  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51479    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51480        -Wunused-value -Woverloaded-virtual"
51481
51482    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537    # Execute function body
51538
51539  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51540  REFERENCE_VERSION=4.8
51541
51542  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51543    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51544  fi
51545
51546  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51547    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51548  fi
51549
51550  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51551  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51552
51553  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51554    :
51555
51556            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51557            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51558
51559
51560  else
51561    :
51562
51563  fi
51564
51565
51566
51567
51568
51569
51570
51571
51572
51573
51574
51575
51576
51577
51578    fi
51579    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51580      # Non-zero builds have stricter warnings
51581      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51582    else
51583      if test "x$TOOLCHAIN_TYPE" = xclang; then
51584        # Some versions of llvm do not like -Wundef
51585        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51586      fi
51587    fi
51588  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51589    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51590        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51591  fi
51592
51593  # Additional macosx handling
51594  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51595    # Setting these parameters makes it an error to link to macosx APIs that are
51596    # newer than the given OS version and makes the linked binaries compatible
51597    # even if built on a newer version of the OS.
51598    # The expected format is X.Y.Z
51599    MACOSX_VERSION_MIN=10.7.0
51600
51601
51602    # The macro takes the version with no dots, ex: 1070
51603    # Let the flags variables get resolved in make for easier override on make
51604    # command line.
51605    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)"
51606    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51607  fi
51608
51609  # Setup some hard coded includes
51610  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51611      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51612      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51613      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51614      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51615      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51616
51617  # The shared libraries are compiled using the picflag.
51618  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51619      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51620  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51621      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51622
51623  # Executable flags
51624  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51625  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51626
51627
51628
51629
51630
51631
51632  # Setup LDFLAGS et al.
51633  #
51634
51635  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51636    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51637    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51638    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51639    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51640      LDFLAGS_SAFESH="-safeseh"
51641      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51642      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51643      # NOTE: Old build added -machine. Probably not needed.
51644      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51645    else
51646      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51647    fi
51648  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51649      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51650      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51651        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51652        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51653    fi
51654  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51655    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51656    # We have previously set HAS_GNU_HASH if this is the case
51657    if test -n "$HAS_GNU_HASH"; then
51658      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51659      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51660      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51661    fi
51662      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51663        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51664    fi
51665    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51666      # And since we now know that the linker is gnu, then add -z defs, to forbid
51667      # undefined symbols in object files.
51668      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51669      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51670      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51671      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51672      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51673      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51674        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51675      fi
51676      case $DEBUG_LEVEL in
51677        release )
51678          # tell linker to optimize libraries.
51679          # Should this be supplied to the OSS linker as well?
51680          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51681          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51682          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51683          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51684            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51685          fi
51686          ;;
51687        slowdebug )
51688          # Hotspot always let the linker optimize
51689          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51690          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51691            # do relocations at load
51692            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51693            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51694            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51695          fi
51696          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51697            # mark relocations read only
51698            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51699            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51700            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51701          fi
51702          ;;
51703        fastdebug )
51704          # Hotspot always let the linker optimize
51705          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51706          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51707            # mark relocations read only
51708            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51709            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51710            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51711          fi
51712          ;;
51713        * )
51714          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51715          ;;
51716        esac
51717    fi
51718  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51719    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51720    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
51721    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51722    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51723    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51724    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51725      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51726    fi
51727  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51728    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51729    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51730    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51731  fi
51732
51733  # Customize LDFLAGS for executables
51734
51735  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51736
51737  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51738    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51739      LDFLAGS_STACK_SIZE=1048576
51740    else
51741      LDFLAGS_STACK_SIZE=327680
51742    fi
51743    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51744  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51745    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51746  fi
51747
51748  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51749
51750  # Customize LDFLAGS for libs
51751  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51752
51753  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51754  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51755    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51756        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51757    OPENJDK_BUILD_JDKLIB_LIBS=""
51758  else
51759    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51760        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51761
51762    if test "xBUILD" = "xTARGET"; then
51763    # On some platforms (mac) the linker warns about non existing -L dirs.
51764    # Add server first if available. Linking aginst client does not always produce the same results.
51765      # Only add client/minimal dir if client/minimal is being built.
51766    # Default to server for other variants.
51767      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51768        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51769      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51770        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51771      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51772        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51773    else
51774        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51775    fi
51776    elif test "xBUILD" = "xBUILD"; then
51777      # When building a buildjdk, it's always only the server variant
51778      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51779          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51780    fi
51781
51782    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51783    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51784      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51785    fi
51786
51787  fi
51788
51789  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51790  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51791    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51792  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51793    # FIXME: This hard-coded path is not really proper.
51794    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51795      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51796    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51797      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51798    fi
51799    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51800        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51801  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51802    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51803  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51804    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51805  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51806    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51807  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51808    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51809        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51810        wsock32.lib winmm.lib version.lib psapi.lib"
51811    fi
51812
51813  # Set OPENJDK_BUILD_JVM_ASFLAGS
51814  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51815    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51816      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51817    fi
51818  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51819    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51820  fi
51821
51822  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838  # Tests are only ever compiled for TARGET
51839  # Flags for compiling test libraries
51840  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51841  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51842
51843  # Flags for compiling test executables
51844  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51845  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51846
51847
51848
51849
51850
51851
51852  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51853  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51854
51855
51856
51857
51858
51859
51860  # Some Zero and Shark settings.
51861  # ZERO_ARCHFLAG tells the compiler which mode to build for
51862  case "${OPENJDK_TARGET_CPU}" in
51863    s390)
51864      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51865      ;;
51866    *)
51867      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51868  esac
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
51903
51904
51905
51906
51907
51908
51909
51910
51911    # Execute function body
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
51952
51953
51954
51955
51956
51957
51958
51959
51960    # Execute function body
51961
51962  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51963$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51964  supports=yes
51965
51966  saved_cflags="$CFLAGS"
51967  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51968  ac_ext=c
51969ac_cpp='$CPP $CPPFLAGS'
51970ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51971ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51972ac_compiler_gnu=$ac_cv_c_compiler_gnu
51973
51974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51975/* end confdefs.h.  */
51976int i;
51977_ACEOF
51978if ac_fn_c_try_compile "$LINENO"; then :
51979
51980else
51981  supports=no
51982fi
51983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51984  ac_ext=cpp
51985ac_cpp='$CXXCPP $CPPFLAGS'
51986ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51987ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51988ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51989
51990  CFLAGS="$saved_cflags"
51991
51992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51993$as_echo "$supports" >&6; }
51994  if test "x$supports" = "xyes" ; then
51995    :
51996    C_COMP_SUPPORTS="yes"
51997  else
51998    :
51999    C_COMP_SUPPORTS="no"
52000  fi
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
52052
52053
52054
52055
52056
52057
52058
52059
52060    # Execute function body
52061
52062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
52063$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
52064  supports=yes
52065
52066  saved_cxxflags="$CXXFLAGS"
52067  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
52068  ac_ext=cpp
52069ac_cpp='$CXXCPP $CPPFLAGS'
52070ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52071ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52072ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52073
52074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52075/* end confdefs.h.  */
52076int i;
52077_ACEOF
52078if ac_fn_cxx_try_compile "$LINENO"; then :
52079
52080else
52081  supports=no
52082fi
52083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52084  ac_ext=cpp
52085ac_cpp='$CXXCPP $CPPFLAGS'
52086ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52087ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52088ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52089
52090  CXXFLAGS="$saved_cxxflags"
52091
52092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52093$as_echo "$supports" >&6; }
52094  if test "x$supports" = "xyes" ; then
52095    :
52096    CXX_COMP_SUPPORTS="yes"
52097  else
52098    :
52099    CXX_COMP_SUPPORTS="no"
52100  fi
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
52115$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
52116  supports=no
52117  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52118
52119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52120$as_echo "$supports" >&6; }
52121  if test "x$supports" = "xyes" ; then
52122    :
52123
52124  else
52125    :
52126    ZERO_ARCHFLAG=""
52127  fi
52128
52129
52130
52131
52132
52133
52134
52135
52136  # Check that the compiler supports -mX (or -qX on AIX) flags
52137  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52138
52139
52140
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    # Execute function body
52186
52187
52188
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    # Execute function body
52235
52236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52237$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52238  supports=yes
52239
52240  saved_cflags="$CFLAGS"
52241  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52242  ac_ext=c
52243ac_cpp='$CPP $CPPFLAGS'
52244ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52245ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52246ac_compiler_gnu=$ac_cv_c_compiler_gnu
52247
52248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52249/* end confdefs.h.  */
52250int i;
52251_ACEOF
52252if ac_fn_c_try_compile "$LINENO"; then :
52253
52254else
52255  supports=no
52256fi
52257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52258  ac_ext=cpp
52259ac_cpp='$CXXCPP $CPPFLAGS'
52260ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52261ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52262ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52263
52264  CFLAGS="$saved_cflags"
52265
52266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52267$as_echo "$supports" >&6; }
52268  if test "x$supports" = "xyes" ; then
52269    :
52270    C_COMP_SUPPORTS="yes"
52271  else
52272    :
52273    C_COMP_SUPPORTS="no"
52274  fi
52275
52276
52277
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    # Execute function body
52335
52336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52337$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52338  supports=yes
52339
52340  saved_cxxflags="$CXXFLAGS"
52341  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52342  ac_ext=cpp
52343ac_cpp='$CXXCPP $CPPFLAGS'
52344ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52345ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52346ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52347
52348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52349/* end confdefs.h.  */
52350int i;
52351_ACEOF
52352if ac_fn_cxx_try_compile "$LINENO"; then :
52353
52354else
52355  supports=no
52356fi
52357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52358  ac_ext=cpp
52359ac_cpp='$CXXCPP $CPPFLAGS'
52360ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52361ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52362ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52363
52364  CXXFLAGS="$saved_cxxflags"
52365
52366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52367$as_echo "$supports" >&6; }
52368  if test "x$supports" = "xyes" ; then
52369    :
52370    CXX_COMP_SUPPORTS="yes"
52371  else
52372    :
52373    CXX_COMP_SUPPORTS="no"
52374  fi
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52389$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52390  supports=no
52391  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52392
52393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52394$as_echo "$supports" >&6; }
52395  if test "x$supports" = "xyes" ; then
52396    :
52397    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52398  else
52399    :
52400    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52401  fi
52402
52403
52404
52405
52406
52407
52408
52409
52410  # Check whether --enable-warnings-as-errors was given.
52411if test "${enable_warnings_as_errors+set}" = set; then :
52412  enableval=$enable_warnings_as_errors;
52413fi
52414
52415
52416  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52417$as_echo_n "checking if native warnings are errors... " >&6; }
52418  if test "x$enable_warnings_as_errors" = "xyes"; then
52419    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
52420$as_echo "yes (explicitely set)" >&6; }
52421    WARNINGS_AS_ERRORS=true
52422  elif test "x$enable_warnings_as_errors" = "xno"; then
52423    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52424$as_echo "no" >&6; }
52425    WARNINGS_AS_ERRORS=false
52426  elif test "x$enable_warnings_as_errors" = "x"; then
52427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52428$as_echo "yes (default)" >&6; }
52429    WARNINGS_AS_ERRORS=true
52430  else
52431    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52432  fi
52433
52434  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52435    # Set legacy hotspot variable
52436    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52437  else
52438    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52439  fi
52440
52441
52442
52443
52444  case "${TOOLCHAIN_TYPE}" in
52445    microsoft)
52446      DISABLE_WARNING_PREFIX="-wd"
52447      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52448      ;;
52449    solstudio)
52450      DISABLE_WARNING_PREFIX="-erroff="
52451      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52452      ;;
52453    gcc)
52454      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502    # Execute function body
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551    # Execute function body
52552
52553  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52554$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52555  supports=yes
52556
52557  saved_cflags="$CFLAGS"
52558  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52559  ac_ext=c
52560ac_cpp='$CPP $CPPFLAGS'
52561ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52562ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52563ac_compiler_gnu=$ac_cv_c_compiler_gnu
52564
52565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52566/* end confdefs.h.  */
52567int i;
52568_ACEOF
52569if ac_fn_c_try_compile "$LINENO"; then :
52570
52571else
52572  supports=no
52573fi
52574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52575  ac_ext=cpp
52576ac_cpp='$CXXCPP $CPPFLAGS'
52577ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52578ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52579ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52580
52581  CFLAGS="$saved_cflags"
52582
52583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52584$as_echo "$supports" >&6; }
52585  if test "x$supports" = "xyes" ; then
52586    :
52587    C_COMP_SUPPORTS="yes"
52588  else
52589    :
52590    C_COMP_SUPPORTS="no"
52591  fi
52592
52593
52594
52595
52596
52597
52598
52599
52600
52601
52602
52603
52604
52605
52606
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643
52644
52645
52646
52647
52648
52649
52650
52651    # Execute function body
52652
52653  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52654$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52655  supports=yes
52656
52657  saved_cxxflags="$CXXFLAGS"
52658  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52659  ac_ext=cpp
52660ac_cpp='$CXXCPP $CPPFLAGS'
52661ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52662ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52663ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52664
52665  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52666/* end confdefs.h.  */
52667int i;
52668_ACEOF
52669if ac_fn_cxx_try_compile "$LINENO"; then :
52670
52671else
52672  supports=no
52673fi
52674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52675  ac_ext=cpp
52676ac_cpp='$CXXCPP $CPPFLAGS'
52677ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52678ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52679ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52680
52681  CXXFLAGS="$saved_cxxflags"
52682
52683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52684$as_echo "$supports" >&6; }
52685  if test "x$supports" = "xyes" ; then
52686    :
52687    CXX_COMP_SUPPORTS="yes"
52688  else
52689    :
52690    CXX_COMP_SUPPORTS="no"
52691  fi
52692
52693
52694
52695
52696
52697
52698
52699
52700
52701
52702
52703
52704
52705  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52706$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52707  supports=no
52708  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52709
52710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52711$as_echo "$supports" >&6; }
52712  if test "x$supports" = "xyes" ; then
52713    :
52714    GCC_CAN_DISABLE_WARNINGS=true
52715  else
52716    :
52717    GCC_CAN_DISABLE_WARNINGS=false
52718
52719  fi
52720
52721
52722
52723
52724
52725
52726      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52727        DISABLE_WARNING_PREFIX="-Wno-"
52728      else
52729        DISABLE_WARNING_PREFIX=
52730      fi
52731      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52732      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52733      # CFLAGS since any target specific flags will likely not work with the
52734      # build compiler
52735      CC_OLD="$CC"
52736      CXX_OLD="$CXX"
52737      CC="$BUILD_CC"
52738      CXX="$BUILD_CXX"
52739      CFLAGS_OLD="$CFLAGS"
52740      CFLAGS=""
52741
52742
52743
52744
52745
52746
52747
52748
52749
52750
52751
52752
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775
52776
52777
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788    # Execute function body
52789
52790
52791
52792
52793
52794
52795
52796
52797
52798
52799
52800
52801
52802
52803
52804
52805
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833
52834
52835
52836
52837    # Execute function body
52838
52839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52840$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52841  supports=yes
52842
52843  saved_cflags="$CFLAGS"
52844  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52845  ac_ext=c
52846ac_cpp='$CPP $CPPFLAGS'
52847ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52848ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52849ac_compiler_gnu=$ac_cv_c_compiler_gnu
52850
52851  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52852/* end confdefs.h.  */
52853int i;
52854_ACEOF
52855if ac_fn_c_try_compile "$LINENO"; then :
52856
52857else
52858  supports=no
52859fi
52860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52861  ac_ext=cpp
52862ac_cpp='$CXXCPP $CPPFLAGS'
52863ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52864ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52865ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52866
52867  CFLAGS="$saved_cflags"
52868
52869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52870$as_echo "$supports" >&6; }
52871  if test "x$supports" = "xyes" ; then
52872    :
52873    C_COMP_SUPPORTS="yes"
52874  else
52875    :
52876    C_COMP_SUPPORTS="no"
52877  fi
52878
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929
52930
52931
52932
52933
52934
52935
52936
52937    # Execute function body
52938
52939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52940$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52941  supports=yes
52942
52943  saved_cxxflags="$CXXFLAGS"
52944  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52945  ac_ext=cpp
52946ac_cpp='$CXXCPP $CPPFLAGS'
52947ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52948ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52949ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52950
52951  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52952/* end confdefs.h.  */
52953int i;
52954_ACEOF
52955if ac_fn_cxx_try_compile "$LINENO"; then :
52956
52957else
52958  supports=no
52959fi
52960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52961  ac_ext=cpp
52962ac_cpp='$CXXCPP $CPPFLAGS'
52963ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52964ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52965ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52966
52967  CXXFLAGS="$saved_cxxflags"
52968
52969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52970$as_echo "$supports" >&6; }
52971  if test "x$supports" = "xyes" ; then
52972    :
52973    CXX_COMP_SUPPORTS="yes"
52974  else
52975    :
52976    CXX_COMP_SUPPORTS="no"
52977  fi
52978
52979
52980
52981
52982
52983
52984
52985
52986
52987
52988
52989
52990
52991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52992$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52993  supports=no
52994  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52995
52996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52997$as_echo "$supports" >&6; }
52998  if test "x$supports" = "xyes" ; then
52999    :
53000    BUILD_CC_CAN_DISABLE_WARNINGS=true
53001  else
53002    :
53003    BUILD_CC_CAN_DISABLE_WARNINGS=false
53004
53005  fi
53006
53007
53008
53009
53010
53011
53012      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53013        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53014      else
53015        BUILD_CC_DISABLE_WARNING_PREFIX=
53016      fi
53017      CC="$CC_OLD"
53018      CXX="$CXX_OLD"
53019      CFLAGS="$CFLAGS_OLD"
53020      ;;
53021    clang)
53022      DISABLE_WARNING_PREFIX="-Wno-"
53023      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53024      ;;
53025    xlc)
53026      DISABLE_WARNING_PREFIX="-qsuppress="
53027      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53028      ;;
53029  esac
53030
53031
53032
53033
53034
53035# Setup debug symbols (need objcopy from the toolchain for that)
53036
53037  #
53038  # NATIVE_DEBUG_SYMBOLS
53039  # This must be done after the toolchain is setup, since we're looking at objcopy.
53040  #
53041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53042$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53043
53044# Check whether --with-native-debug-symbols was given.
53045if test "${with_native_debug_symbols+set}" = set; then :
53046  withval=$with_native_debug_symbols;
53047        if test "x$OPENJDK_TARGET_OS" = xaix; then
53048          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53049            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53050          fi
53051        fi
53052
53053else
53054
53055        if test "x$OPENJDK_TARGET_OS" = xaix; then
53056          # AIX doesn't support 'zipped' so use 'internal' as default
53057          with_native_debug_symbols="internal"
53058        else
53059          if test "x$STATIC_BUILD" = xtrue; then
53060            with_native_debug_symbols="none"
53061          else
53062            with_native_debug_symbols="zipped"
53063          fi
53064        fi
53065
53066fi
53067
53068  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53070$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53071
53072  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53073
53074    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53075      if test "x$OBJCOPY" = x; then
53076        # enabling of enable-debug-symbols and can't find objcopy
53077        # this is an error
53078        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53079      fi
53080    fi
53081
53082    COMPILE_WITH_DEBUG_SYMBOLS=true
53083    COPY_DEBUG_SYMBOLS=true
53084    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53085
53086    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
53087    DEBUG_BINARIES=false
53088    STRIP_POLICY=min_strip
53089
53090  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53091    COMPILE_WITH_DEBUG_SYMBOLS=false
53092    COPY_DEBUG_SYMBOLS=false
53093    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53094
53095    DEBUG_BINARIES=false
53096    STRIP_POLICY=no_strip
53097  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53098    COMPILE_WITH_DEBUG_SYMBOLS=true
53099    COPY_DEBUG_SYMBOLS=false
53100    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53101
53102    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
53103    DEBUG_BINARIES=true
53104    STRIP_POLICY=no_strip
53105    STRIP=""
53106
53107  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53108
53109    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53110      if test "x$OBJCOPY" = x; then
53111        # enabling of enable-debug-symbols and can't find objcopy
53112        # this is an error
53113        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53114      fi
53115    fi
53116
53117    COMPILE_WITH_DEBUG_SYMBOLS=true
53118    COPY_DEBUG_SYMBOLS=true
53119    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53120
53121    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
53122    DEBUG_BINARIES=false
53123    STRIP_POLICY=min_strip
53124  else
53125    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53126  fi
53127
53128  # --enable-debug-symbols is deprecated.
53129  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53130
53131  # Check whether --enable-debug-symbols was given.
53132if test "${enable_debug_symbols+set}" = set; then :
53133  enableval=$enable_debug_symbols;
53134fi
53135
53136  if test "x$enable_debug_symbols" != x; then
53137    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53138$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53139
53140    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53141      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53142$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53143    fi
53144
53145  fi
53146
53147
53148  # --enable-zip-debug-info is deprecated.
53149  # Please use --with-native-debug-symbols=zipped .
53150
53151  # Check whether --enable-zip-debug-info was given.
53152if test "${enable_zip_debug_info+set}" = set; then :
53153  enableval=$enable_zip_debug_info;
53154fi
53155
53156  if test "x$enable_zip_debug_info" != x; then
53157    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53158$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53159
53160    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53161      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53162$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53163    fi
53164
53165  fi
53166
53167
53168
53169
53170
53171
53172  # Legacy values
53173
53174
53175
53176
53177  # Check whether --enable-native-coverage was given.
53178if test "${enable_native_coverage+set}" = set; then :
53179  enableval=$enable_native_coverage;
53180fi
53181
53182  GCOV_ENABLED="false"
53183  if test "x$enable_native_coverage" = "xyes"; then
53184    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53185      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53186$as_echo_n "checking if native coverage is enabled... " >&6; }
53187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53188$as_echo "yes" >&6; }
53189      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53190      GCOV_LDFLAGS="-fprofile-arcs"
53191      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
53192      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
53193      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
53194      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53195      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53196      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53197      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53198      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53199      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53200      GCOV_ENABLED="true"
53201    else
53202      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53203    fi
53204  elif test "x$enable_native_coverage" = "xno"; then
53205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53206$as_echo_n "checking if native coverage is enabled... " >&6; }
53207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53208$as_echo "no" >&6; }
53209  elif test "x$enable_native_coverage" != "x"; then
53210    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53211  fi
53212
53213
53214
53215
53216# Need toolchain to setup dtrace
53217
53218  # Test for dtrace dependencies
53219  # Check whether --enable-dtrace was given.
53220if test "${enable_dtrace+set}" = set; then :
53221  enableval=$enable_dtrace;
53222fi
53223
53224
53225  DTRACE_DEP_MISSING=false
53226
53227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53228$as_echo_n "checking for dtrace tool... " >&6; }
53229  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53231$as_echo "$DTRACE" >&6; }
53232  else
53233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53234$as_echo "not found, cannot build dtrace" >&6; }
53235    DTRACE_DEP_MISSING=true
53236  fi
53237
53238  for ac_header in sys/sdt.h
53239do :
53240  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53241if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53242  cat >>confdefs.h <<_ACEOF
53243#define HAVE_SYS_SDT_H 1
53244_ACEOF
53245 DTRACE_HEADERS_OK=yes
53246else
53247  DTRACE_HEADERS_OK=no
53248fi
53249
53250done
53251
53252  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53253    DTRACE_DEP_MISSING=true
53254  fi
53255
53256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53257$as_echo_n "checking if dtrace should be built... " >&6; }
53258  if test "x$enable_dtrace" = "xyes"; then
53259    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53260      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53261$as_echo "no, missing dependencies" >&6; }
53262
53263  # Print a helpful message on how to acquire the necessary build dependency.
53264  # dtrace is the help tag: freetype, cups, alsa etc
53265  MISSING_DEPENDENCY=dtrace
53266
53267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53268    cygwin_help $MISSING_DEPENDENCY
53269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53270    msys_help $MISSING_DEPENDENCY
53271  else
53272    PKGHANDLER_COMMAND=
53273
53274    case $PKGHANDLER in
53275      apt-get)
53276        apt_help     $MISSING_DEPENDENCY ;;
53277      yum)
53278        yum_help     $MISSING_DEPENDENCY ;;
53279      port)
53280        port_help    $MISSING_DEPENDENCY ;;
53281      pkgutil)
53282        pkgutil_help $MISSING_DEPENDENCY ;;
53283      pkgadd)
53284        pkgadd_help  $MISSING_DEPENDENCY ;;
53285    esac
53286
53287    if test "x$PKGHANDLER_COMMAND" != x; then
53288      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53289    fi
53290  fi
53291
53292      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53293    else
53294      INCLUDE_DTRACE=true
53295      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53296$as_echo "yes, forced" >&6; }
53297    fi
53298  elif test "x$enable_dtrace" = "xno"; then
53299    INCLUDE_DTRACE=false
53300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53301$as_echo "no, forced" >&6; }
53302  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53303    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
53304      INCLUDE_DTRACE=false
53305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
53306$as_echo "no, non-open linux build" >&6; }
53307    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53308      INCLUDE_DTRACE=false
53309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53310$as_echo "no, missing dependencies" >&6; }
53311    else
53312      INCLUDE_DTRACE=true
53313      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53314$as_echo "yes, dependencies present" >&6; }
53315    fi
53316  else
53317    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53318  fi
53319
53320
53321
53322  # The user can in some cases supply additional jvm features. For the custom
53323  # variant, this defines the entire variant.
53324
53325# Check whether --with-jvm-features was given.
53326if test "${with_jvm_features+set}" = set; then :
53327  withval=$with_jvm_features;
53328fi
53329
53330  if test "x$with_jvm_features" != x; then
53331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
53332$as_echo_n "checking additional JVM features... " >&6; }
53333    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
53334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
53335$as_echo "$JVM_FEATURES" >&6; }
53336  fi
53337
53338  # Verify that dependencies are met for explicitly set features.
53339  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
53340    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
53341  fi
53342
53343  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
53344    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
53345  fi
53346
53347  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
53348    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
53349  fi
53350
53351  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53352    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
53353  fi
53354
53355  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53356    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
53357  fi
53358
53359  # Turn on additional features based on other parts of configure
53360  if test "x$INCLUDE_DTRACE" = "xtrue"; then
53361    JVM_FEATURES="$JVM_FEATURES dtrace"
53362  else
53363    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
53364      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
53365    fi
53366  fi
53367
53368  if test "x$STATIC_BUILD" = "xtrue"; then
53369    JVM_FEATURES="$JVM_FEATURES static-build"
53370  else
53371    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
53372      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
53373    fi
53374  fi
53375
53376  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53377    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
53378      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
53379    fi
53380  fi
53381
53382  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53383    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
53384      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
53385    fi
53386  fi
53387
53388  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
53389  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
53390      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
53391      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
53392    JVM_FEATURES_jvmci="jvmci"
53393  else
53394    JVM_FEATURES_jvmci=""
53395  fi
53396
53397  # All variants but minimal (and custom) get these features
53398  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
53399
53400  # Enable features depending on variant.
53401  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
53402  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
53403  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
53404  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
53405  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
53406  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
53407  JVM_FEATURES_custom="$JVM_FEATURES"
53408
53409
53410
53411
53412
53413
53414
53415
53416
53417  # Used for verification of Makefiles by check-jvm-feature
53418
53419
53420  # We don't support --with-jvm-interpreter anymore, use zero instead.
53421
53422
53423# Check whether --with-jvm-interpreter was given.
53424if test "${with_jvm_interpreter+set}" = set; then :
53425  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
53426$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
53427fi
53428
53429
53430
53431
53432  # Check whether --enable-hotspot-gtest was given.
53433if test "${enable_hotspot_gtest+set}" = set; then :
53434  enableval=$enable_hotspot_gtest;
53435fi
53436
53437
53438  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53439    GTEST_DIR_EXISTS="true"
53440  else
53441    GTEST_DIR_EXISTS="false"
53442  fi
53443
53444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53445$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53446  if test "x$enable_hotspot_gtest" = "xyes"; then
53447    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53448      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53449$as_echo "yes, forced" >&6; }
53450      BUILD_GTEST="true"
53451    else
53452      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53453    fi
53454  elif test "x$enable_hotspot_gtest" = "xno"; then
53455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53456$as_echo "no, forced" >&6; }
53457    BUILD_GTEST="false"
53458  elif test "x$enable_hotspot_gtest" = "x"; then
53459    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
53460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53461$as_echo "yes" >&6; }
53462      BUILD_GTEST="true"
53463    else
53464      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53465$as_echo "no" >&6; }
53466      BUILD_GTEST="false"
53467    fi
53468  else
53469    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53470  fi
53471
53472
53473
53474
53475###############################################################################
53476#
53477# Check dependencies for external and internal libraries.
53478#
53479###############################################################################
53480
53481# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53482
53483  # When using cygwin or msys, we need a wrapper binary that renames
53484  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53485  # @files and rewrites these too! This wrapper binary is
53486  # called fixpath.
53487  FIXPATH=
53488  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53490$as_echo_n "checking if fixpath can be created... " >&6; }
53491    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53492    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53493    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53494    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53495      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53496      FIXPATH="$FIXPATH_BIN -c"
53497    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53498      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53499      # @ was chosen as separator to minimize risk of other tools messing around with it
53500      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53501          | tr ' ' '\n' | grep '^/./' | sort | uniq`
53502      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53503      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53504    fi
53505    FIXPATH_SRC_W="$FIXPATH_SRC"
53506    FIXPATH_BIN_W="$FIXPATH_BIN"
53507
53508  unix_path="$FIXPATH_SRC_W"
53509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53510    windows_path=`$CYGPATH -m "$unix_path"`
53511    FIXPATH_SRC_W="$windows_path"
53512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53513    windows_path=`cmd //c echo $unix_path`
53514    FIXPATH_SRC_W="$windows_path"
53515  fi
53516
53517
53518  unix_path="$FIXPATH_BIN_W"
53519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53520    windows_path=`$CYGPATH -m "$unix_path"`
53521    FIXPATH_BIN_W="$windows_path"
53522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53523    windows_path=`cmd //c echo $unix_path`
53524    FIXPATH_BIN_W="$windows_path"
53525  fi
53526
53527    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53528    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53529    cd $FIXPATH_DIR
53530    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53531    cd $CURDIR
53532
53533    if test ! -x $FIXPATH_BIN; then
53534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53535$as_echo "no" >&6; }
53536      cat $FIXPATH_DIR/fixpath1.log
53537      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53538    fi
53539    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53540$as_echo "yes" >&6; }
53541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53542$as_echo_n "checking if fixpath.exe works... " >&6; }
53543    cd $FIXPATH_DIR
53544    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53545        > $FIXPATH_DIR/fixpath2.log 2>&1
53546    cd $CURDIR
53547    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53549$as_echo "no" >&6; }
53550      cat $FIXPATH_DIR/fixpath2.log
53551      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53552    fi
53553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53554$as_echo "yes" >&6; }
53555
53556    FIXPATH_DETACH_FLAG="--detach"
53557  fi
53558
53559
53560
53561
53562
53563
53564  # Check if X11 is needed
53565  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53566    # No X11 support on windows or macosx
53567    NEEDS_LIB_X11=false
53568  else
53569    if test "x$SUPPORT_HEADFUL" = xno; then
53570      # No X11 support if building headless-only
53571      NEEDS_LIB_X11=false
53572    else
53573      # All other instances need X11
53574      NEEDS_LIB_X11=true
53575    fi
53576  fi
53577
53578  # Check if cups is needed
53579  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53580    # Windows have a separate print system
53581    NEEDS_LIB_CUPS=false
53582  else
53583    NEEDS_LIB_CUPS=true
53584  fi
53585
53586  # Check if freetype is needed
53587  if test "x$OPENJDK" = "xtrue"; then
53588    NEEDS_LIB_FREETYPE=true
53589  else
53590    NEEDS_LIB_FREETYPE=false
53591  fi
53592
53593  # Check if alsa is needed
53594  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53595    NEEDS_LIB_ALSA=true
53596  else
53597    NEEDS_LIB_ALSA=false
53598  fi
53599
53600  # Check if ffi is needed
53601  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53602    NEEDS_LIB_FFI=true
53603  else
53604    NEEDS_LIB_FFI=false
53605  fi
53606
53607
53608  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53609  # dynamic build is configured on command line.
53610
53611# Check whether --with-stdc++lib was given.
53612if test "${with_stdc__lib+set}" = set; then :
53613  withval=$with_stdc__lib;
53614        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53615                && test "x$with_stdc__lib" != xdefault; then
53616          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53617        fi
53618
53619else
53620  with_stdc__lib=default
53621
53622fi
53623
53624
53625  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53626    # Test if -lstdc++ works.
53627    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53628$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53629    ac_ext=cpp
53630ac_cpp='$CXXCPP $CPPFLAGS'
53631ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53632ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53633ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53634
53635    OLD_CXXFLAGS="$CXXFLAGS"
53636    CXXFLAGS="$CXXFLAGS -lstdc++"
53637    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53638/* end confdefs.h.  */
53639
53640int
53641main ()
53642{
53643return 0;
53644  ;
53645  return 0;
53646}
53647_ACEOF
53648if ac_fn_cxx_try_link "$LINENO"; then :
53649  has_dynamic_libstdcxx=yes
53650else
53651  has_dynamic_libstdcxx=no
53652fi
53653rm -f core conftest.err conftest.$ac_objext \
53654    conftest$ac_exeext conftest.$ac_ext
53655    CXXFLAGS="$OLD_CXXFLAGS"
53656    ac_ext=cpp
53657ac_cpp='$CXXCPP $CPPFLAGS'
53658ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53659ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53660ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53661
53662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53663$as_echo "$has_dynamic_libstdcxx" >&6; }
53664
53665    # Test if stdc++ can be linked statically.
53666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53667$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53668    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53669    ac_ext=cpp
53670ac_cpp='$CXXCPP $CPPFLAGS'
53671ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53672ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53673ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53674
53675    OLD_LIBS="$LIBS"
53676    OLD_CXX="$CXX"
53677    LIBS="$STATIC_STDCXX_FLAGS"
53678    CXX="$CC"
53679    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53680/* end confdefs.h.  */
53681
53682int
53683main ()
53684{
53685return 0;
53686  ;
53687  return 0;
53688}
53689_ACEOF
53690if ac_fn_cxx_try_link "$LINENO"; then :
53691  has_static_libstdcxx=yes
53692else
53693  has_static_libstdcxx=no
53694fi
53695rm -f core conftest.err conftest.$ac_objext \
53696    conftest$ac_exeext conftest.$ac_ext
53697    LIBS="$OLD_LIBS"
53698    CXX="$OLD_CXX"
53699    ac_ext=cpp
53700ac_cpp='$CXXCPP $CPPFLAGS'
53701ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53702ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53703ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53704
53705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53706$as_echo "$has_static_libstdcxx" >&6; }
53707
53708    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53709      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53710    fi
53711
53712    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53713      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53714    fi
53715
53716    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53717      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53718    fi
53719
53720    # If dynamic was requested, it's available since it would fail above otherwise.
53721    # If dynamic wasn't requested, go with static unless it isn't available.
53722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53723$as_echo_n "checking how to link with libstdc++... " >&6; }
53724    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53725      LIBCXX="$LIBCXX -lstdc++"
53726      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53727      JVM_LIBS="-lstdc++ $JVM_LIBS"
53728      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53729      # just use the same setting as for the TARGET toolchain.
53730      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53731      LDCXX="$CXX"
53732      STATIC_CXX_SETTING="STATIC_CXX=false"
53733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53734$as_echo "dynamic" >&6; }
53735    else
53736      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53737      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53738      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53739      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53740      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53741      # just use the same setting as for the TARGET toolchain.
53742      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53743      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53744      LDCXX="$CC"
53745      STATIC_CXX_SETTING="STATIC_CXX=true"
53746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53747$as_echo "static" >&6; }
53748    fi
53749  fi
53750
53751
53752  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53753  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53754    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53755  fi
53756
53757  # TODO better (platform agnostic) test
53758  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53759    LIBCXX="-lstdc++"
53760  fi
53761
53762
53763  # Setup Windows runtime dlls
53764  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53765
53766
53767# Check whether --with-msvcr-dll was given.
53768if test "${with_msvcr_dll+set}" = set; then :
53769  withval=$with_msvcr_dll;
53770fi
53771
53772
53773  if test "x$with_msvcr_dll" != x; then
53774    # If given explicitely by user, do not probe. If not present, fail directly.
53775
53776  DLL_NAME="$MSVCR_NAME"
53777  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53778  METHOD="--with-msvcr-dll"
53779  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53780    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53781$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53782
53783    # Need to check if the found msvcr is correct architecture
53784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53785$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53786    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53787    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53788      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53789      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53790      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53791        CORRECT_MSVCR_ARCH="PE32 executable"
53792      else
53793        CORRECT_MSVCR_ARCH="PE32+ executable"
53794      fi
53795    else
53796      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53797        CORRECT_MSVCR_ARCH=386
53798      else
53799        CORRECT_MSVCR_ARCH=x86-64
53800      fi
53801    fi
53802    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53804$as_echo "ok" >&6; }
53805      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53806
53807  # Only process if variable expands to non-empty
53808
53809  if test "x$MSVC_DLL" != x; then
53810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53811
53812  # Input might be given as Windows format, start by converting to
53813  # unix format.
53814  path="$MSVC_DLL"
53815  new_path=`$CYGPATH -u "$path"`
53816
53817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53820  # "foo.exe" is OK but "foo" is an error.
53821  #
53822  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53823  # It is also a way to make sure we got the proper file name for the real test later on.
53824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53825  if test "x$test_shortpath" = x; then
53826    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53827$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53828    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53829  fi
53830
53831  # Call helper function which possibly converts this using DOS-style short mode.
53832  # If so, the updated path is stored in $new_path.
53833
53834  input_path="$new_path"
53835  # Check if we need to convert this using DOS-style short mode. If the path
53836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53837  # take no chances and rewrite it.
53838  # Note: m4 eats our [], so we need to use [ and ] instead.
53839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53840  if test "x$has_forbidden_chars" != x; then
53841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53845      # Going to short mode and back again did indeed matter. Since short mode is
53846      # case insensitive, let's make it lowercase to improve readability.
53847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53848      # Now convert it back to Unix-style (cygpath)
53849      input_path=`$CYGPATH -u "$shortmode_path"`
53850      new_path="$input_path"
53851    fi
53852  fi
53853
53854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53855  if test "x$test_cygdrive_prefix" = x; then
53856    # As a simple fix, exclude /usr/bin since it's not a real path.
53857    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53859      # a path prefixed by /cygdrive for fixpath to work.
53860      new_path="$CYGWIN_ROOT_PATH$input_path"
53861    fi
53862  fi
53863
53864
53865  if test "x$path" != "x$new_path"; then
53866    MSVC_DLL="$new_path"
53867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53868$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53869  fi
53870
53871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53872
53873  path="$MSVC_DLL"
53874  has_colon=`$ECHO $path | $GREP ^.:`
53875  new_path="$path"
53876  if test "x$has_colon" = x; then
53877    # Not in mixed or Windows style, start by that.
53878    new_path=`cmd //c echo $path`
53879  fi
53880
53881
53882  input_path="$new_path"
53883  # Check if we need to convert this using DOS-style short mode. If the path
53884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53885  # take no chances and rewrite it.
53886  # Note: m4 eats our [], so we need to use [ and ] instead.
53887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53888  if test "x$has_forbidden_chars" != x; then
53889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53891  fi
53892
53893
53894  windows_path="$new_path"
53895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53896    unix_path=`$CYGPATH -u "$windows_path"`
53897    new_path="$unix_path"
53898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53900    new_path="$unix_path"
53901  fi
53902
53903  if test "x$path" != "x$new_path"; then
53904    MSVC_DLL="$new_path"
53905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53906$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53907  fi
53908
53909  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53910  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53911
53912    else
53913      # We're on a unix platform. Hooray! :)
53914      path="$MSVC_DLL"
53915      has_space=`$ECHO "$path" | $GREP " "`
53916      if test "x$has_space" != x; then
53917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53918$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53919        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53920      fi
53921
53922      # Use eval to expand a potential ~
53923      eval path="$path"
53924      if test ! -f "$path" && test ! -d "$path"; then
53925        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53926      fi
53927
53928      if test -d "$path"; then
53929        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53930      else
53931        dir="`$DIRNAME "$path"`"
53932        base="`$BASENAME "$path"`"
53933        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53934      fi
53935    fi
53936  fi
53937
53938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53939$as_echo_n "checking for $DLL_NAME... " >&6; }
53940      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53941$as_echo "$MSVC_DLL" >&6; }
53942    else
53943      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53944$as_echo "incorrect, ignoring" >&6; }
53945      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53946$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53947    fi
53948  fi
53949
53950    if test "x$MSVC_DLL" = x; then
53951      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53952    fi
53953    MSVCR_DLL="$MSVC_DLL"
53954  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53955
53956  DLL_NAME="$MSVCR_NAME"
53957  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53958  METHOD="devkit"
53959  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53960    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53961$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53962
53963    # Need to check if the found msvcr is correct architecture
53964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53965$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53966    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53968      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53969      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53970      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53971        CORRECT_MSVCR_ARCH="PE32 executable"
53972      else
53973        CORRECT_MSVCR_ARCH="PE32+ executable"
53974      fi
53975    else
53976      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53977        CORRECT_MSVCR_ARCH=386
53978      else
53979        CORRECT_MSVCR_ARCH=x86-64
53980      fi
53981    fi
53982    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53983      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53984$as_echo "ok" >&6; }
53985      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53986
53987  # Only process if variable expands to non-empty
53988
53989  if test "x$MSVC_DLL" != x; then
53990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53991
53992  # Input might be given as Windows format, start by converting to
53993  # unix format.
53994  path="$MSVC_DLL"
53995  new_path=`$CYGPATH -u "$path"`
53996
53997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54000  # "foo.exe" is OK but "foo" is an error.
54001  #
54002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54003  # It is also a way to make sure we got the proper file name for the real test later on.
54004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54005  if test "x$test_shortpath" = x; then
54006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54007$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54008    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54009  fi
54010
54011  # Call helper function which possibly converts this using DOS-style short mode.
54012  # If so, the updated path is stored in $new_path.
54013
54014  input_path="$new_path"
54015  # Check if we need to convert this using DOS-style short mode. If the path
54016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54017  # take no chances and rewrite it.
54018  # Note: m4 eats our [], so we need to use [ and ] instead.
54019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54020  if test "x$has_forbidden_chars" != x; then
54021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54025      # Going to short mode and back again did indeed matter. Since short mode is
54026      # case insensitive, let's make it lowercase to improve readability.
54027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54028      # Now convert it back to Unix-style (cygpath)
54029      input_path=`$CYGPATH -u "$shortmode_path"`
54030      new_path="$input_path"
54031    fi
54032  fi
54033
54034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54035  if test "x$test_cygdrive_prefix" = x; then
54036    # As a simple fix, exclude /usr/bin since it's not a real path.
54037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54039      # a path prefixed by /cygdrive for fixpath to work.
54040      new_path="$CYGWIN_ROOT_PATH$input_path"
54041    fi
54042  fi
54043
54044
54045  if test "x$path" != "x$new_path"; then
54046    MSVC_DLL="$new_path"
54047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54048$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54049  fi
54050
54051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54052
54053  path="$MSVC_DLL"
54054  has_colon=`$ECHO $path | $GREP ^.:`
54055  new_path="$path"
54056  if test "x$has_colon" = x; then
54057    # Not in mixed or Windows style, start by that.
54058    new_path=`cmd //c echo $path`
54059  fi
54060
54061
54062  input_path="$new_path"
54063  # Check if we need to convert this using DOS-style short mode. If the path
54064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54065  # take no chances and rewrite it.
54066  # Note: m4 eats our [], so we need to use [ and ] instead.
54067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54068  if test "x$has_forbidden_chars" != x; then
54069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54071  fi
54072
54073
54074  windows_path="$new_path"
54075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54076    unix_path=`$CYGPATH -u "$windows_path"`
54077    new_path="$unix_path"
54078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54080    new_path="$unix_path"
54081  fi
54082
54083  if test "x$path" != "x$new_path"; then
54084    MSVC_DLL="$new_path"
54085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54086$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54087  fi
54088
54089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54091
54092    else
54093      # We're on a unix platform. Hooray! :)
54094      path="$MSVC_DLL"
54095      has_space=`$ECHO "$path" | $GREP " "`
54096      if test "x$has_space" != x; then
54097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54098$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54099        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54100      fi
54101
54102      # Use eval to expand a potential ~
54103      eval path="$path"
54104      if test ! -f "$path" && test ! -d "$path"; then
54105        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54106      fi
54107
54108      if test -d "$path"; then
54109        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54110      else
54111        dir="`$DIRNAME "$path"`"
54112        base="`$BASENAME "$path"`"
54113        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54114      fi
54115    fi
54116  fi
54117
54118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54119$as_echo_n "checking for $DLL_NAME... " >&6; }
54120      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54121$as_echo "$MSVC_DLL" >&6; }
54122    else
54123      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54124$as_echo "incorrect, ignoring" >&6; }
54125      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54126$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54127    fi
54128  fi
54129
54130    if test "x$MSVC_DLL" = x; then
54131      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54132    fi
54133    MSVCR_DLL="$MSVC_DLL"
54134  else
54135
54136  DLL_NAME="${MSVCR_NAME}"
54137  MSVC_DLL=
54138
54139  if test "x$MSVC_DLL" = x; then
54140    # Probe: Using well-known location from Visual Studio 10.0
54141    if test "x$VCINSTALLDIR" != x; then
54142      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54143
54144  windows_path="$CYGWIN_VC_INSTALL_DIR"
54145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54146    unix_path=`$CYGPATH -u "$windows_path"`
54147    CYGWIN_VC_INSTALL_DIR="$unix_path"
54148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54150    CYGWIN_VC_INSTALL_DIR="$unix_path"
54151  fi
54152
54153      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54154        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54155      else
54156        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54157      fi
54158      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54159
54160  DLL_NAME="$DLL_NAME"
54161  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54162  METHOD="well-known location in VCINSTALLDIR"
54163  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54164    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54165$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54166
54167    # Need to check if the found msvcr is correct architecture
54168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54169$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54170    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54172      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54173      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54174      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54175        CORRECT_MSVCR_ARCH="PE32 executable"
54176      else
54177        CORRECT_MSVCR_ARCH="PE32+ executable"
54178      fi
54179    else
54180      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54181        CORRECT_MSVCR_ARCH=386
54182      else
54183        CORRECT_MSVCR_ARCH=x86-64
54184      fi
54185    fi
54186    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54188$as_echo "ok" >&6; }
54189      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54190
54191  # Only process if variable expands to non-empty
54192
54193  if test "x$MSVC_DLL" != x; then
54194    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54195
54196  # Input might be given as Windows format, start by converting to
54197  # unix format.
54198  path="$MSVC_DLL"
54199  new_path=`$CYGPATH -u "$path"`
54200
54201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54204  # "foo.exe" is OK but "foo" is an error.
54205  #
54206  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54207  # It is also a way to make sure we got the proper file name for the real test later on.
54208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54209  if test "x$test_shortpath" = x; then
54210    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54211$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54212    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54213  fi
54214
54215  # Call helper function which possibly converts this using DOS-style short mode.
54216  # If so, the updated path is stored in $new_path.
54217
54218  input_path="$new_path"
54219  # Check if we need to convert this using DOS-style short mode. If the path
54220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54221  # take no chances and rewrite it.
54222  # Note: m4 eats our [], so we need to use [ and ] instead.
54223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54224  if test "x$has_forbidden_chars" != x; then
54225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54229      # Going to short mode and back again did indeed matter. Since short mode is
54230      # case insensitive, let's make it lowercase to improve readability.
54231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54232      # Now convert it back to Unix-style (cygpath)
54233      input_path=`$CYGPATH -u "$shortmode_path"`
54234      new_path="$input_path"
54235    fi
54236  fi
54237
54238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54239  if test "x$test_cygdrive_prefix" = x; then
54240    # As a simple fix, exclude /usr/bin since it's not a real path.
54241    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54243      # a path prefixed by /cygdrive for fixpath to work.
54244      new_path="$CYGWIN_ROOT_PATH$input_path"
54245    fi
54246  fi
54247
54248
54249  if test "x$path" != "x$new_path"; then
54250    MSVC_DLL="$new_path"
54251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54252$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54253  fi
54254
54255    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54256
54257  path="$MSVC_DLL"
54258  has_colon=`$ECHO $path | $GREP ^.:`
54259  new_path="$path"
54260  if test "x$has_colon" = x; then
54261    # Not in mixed or Windows style, start by that.
54262    new_path=`cmd //c echo $path`
54263  fi
54264
54265
54266  input_path="$new_path"
54267  # Check if we need to convert this using DOS-style short mode. If the path
54268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54269  # take no chances and rewrite it.
54270  # Note: m4 eats our [], so we need to use [ and ] instead.
54271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54272  if test "x$has_forbidden_chars" != x; then
54273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54275  fi
54276
54277
54278  windows_path="$new_path"
54279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54280    unix_path=`$CYGPATH -u "$windows_path"`
54281    new_path="$unix_path"
54282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54284    new_path="$unix_path"
54285  fi
54286
54287  if test "x$path" != "x$new_path"; then
54288    MSVC_DLL="$new_path"
54289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54290$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54291  fi
54292
54293  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54294  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54295
54296    else
54297      # We're on a unix platform. Hooray! :)
54298      path="$MSVC_DLL"
54299      has_space=`$ECHO "$path" | $GREP " "`
54300      if test "x$has_space" != x; then
54301        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54302$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54303        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54304      fi
54305
54306      # Use eval to expand a potential ~
54307      eval path="$path"
54308      if test ! -f "$path" && test ! -d "$path"; then
54309        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54310      fi
54311
54312      if test -d "$path"; then
54313        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54314      else
54315        dir="`$DIRNAME "$path"`"
54316        base="`$BASENAME "$path"`"
54317        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54318      fi
54319    fi
54320  fi
54321
54322      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54323$as_echo_n "checking for $DLL_NAME... " >&6; }
54324      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54325$as_echo "$MSVC_DLL" >&6; }
54326    else
54327      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54328$as_echo "incorrect, ignoring" >&6; }
54329      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54330$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54331    fi
54332  fi
54333
54334    fi
54335  fi
54336
54337  if test "x$MSVC_DLL" = x; then
54338    # Probe: Check in the Boot JDK directory.
54339    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54340
54341  DLL_NAME="$DLL_NAME"
54342  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54343  METHOD="well-known location in Boot JDK"
54344  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54345    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54346$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54347
54348    # Need to check if the found msvcr is correct architecture
54349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54350$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54351    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54353      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54354      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54355      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54356        CORRECT_MSVCR_ARCH="PE32 executable"
54357      else
54358        CORRECT_MSVCR_ARCH="PE32+ executable"
54359      fi
54360    else
54361      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54362        CORRECT_MSVCR_ARCH=386
54363      else
54364        CORRECT_MSVCR_ARCH=x86-64
54365      fi
54366    fi
54367    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54369$as_echo "ok" >&6; }
54370      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54371
54372  # Only process if variable expands to non-empty
54373
54374  if test "x$MSVC_DLL" != x; then
54375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54376
54377  # Input might be given as Windows format, start by converting to
54378  # unix format.
54379  path="$MSVC_DLL"
54380  new_path=`$CYGPATH -u "$path"`
54381
54382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54385  # "foo.exe" is OK but "foo" is an error.
54386  #
54387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54388  # It is also a way to make sure we got the proper file name for the real test later on.
54389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54390  if test "x$test_shortpath" = x; then
54391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54392$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54393    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54394  fi
54395
54396  # Call helper function which possibly converts this using DOS-style short mode.
54397  # If so, the updated path is stored in $new_path.
54398
54399  input_path="$new_path"
54400  # Check if we need to convert this using DOS-style short mode. If the path
54401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54402  # take no chances and rewrite it.
54403  # Note: m4 eats our [], so we need to use [ and ] instead.
54404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54405  if test "x$has_forbidden_chars" != x; then
54406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54410      # Going to short mode and back again did indeed matter. Since short mode is
54411      # case insensitive, let's make it lowercase to improve readability.
54412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54413      # Now convert it back to Unix-style (cygpath)
54414      input_path=`$CYGPATH -u "$shortmode_path"`
54415      new_path="$input_path"
54416    fi
54417  fi
54418
54419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54420  if test "x$test_cygdrive_prefix" = x; then
54421    # As a simple fix, exclude /usr/bin since it's not a real path.
54422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54424      # a path prefixed by /cygdrive for fixpath to work.
54425      new_path="$CYGWIN_ROOT_PATH$input_path"
54426    fi
54427  fi
54428
54429
54430  if test "x$path" != "x$new_path"; then
54431    MSVC_DLL="$new_path"
54432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54433$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54434  fi
54435
54436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54437
54438  path="$MSVC_DLL"
54439  has_colon=`$ECHO $path | $GREP ^.:`
54440  new_path="$path"
54441  if test "x$has_colon" = x; then
54442    # Not in mixed or Windows style, start by that.
54443    new_path=`cmd //c echo $path`
54444  fi
54445
54446
54447  input_path="$new_path"
54448  # Check if we need to convert this using DOS-style short mode. If the path
54449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54450  # take no chances and rewrite it.
54451  # Note: m4 eats our [], so we need to use [ and ] instead.
54452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54453  if test "x$has_forbidden_chars" != x; then
54454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54456  fi
54457
54458
54459  windows_path="$new_path"
54460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54461    unix_path=`$CYGPATH -u "$windows_path"`
54462    new_path="$unix_path"
54463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54465    new_path="$unix_path"
54466  fi
54467
54468  if test "x$path" != "x$new_path"; then
54469    MSVC_DLL="$new_path"
54470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54471$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54472  fi
54473
54474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54476
54477    else
54478      # We're on a unix platform. Hooray! :)
54479      path="$MSVC_DLL"
54480      has_space=`$ECHO "$path" | $GREP " "`
54481      if test "x$has_space" != x; then
54482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54483$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54484        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54485      fi
54486
54487      # Use eval to expand a potential ~
54488      eval path="$path"
54489      if test ! -f "$path" && test ! -d "$path"; then
54490        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54491      fi
54492
54493      if test -d "$path"; then
54494        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54495      else
54496        dir="`$DIRNAME "$path"`"
54497        base="`$BASENAME "$path"`"
54498        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54499      fi
54500    fi
54501  fi
54502
54503      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54504$as_echo_n "checking for $DLL_NAME... " >&6; }
54505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54506$as_echo "$MSVC_DLL" >&6; }
54507    else
54508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54509$as_echo "incorrect, ignoring" >&6; }
54510      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54511$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54512    fi
54513  fi
54514
54515  fi
54516
54517  if test "x$MSVC_DLL" = x; then
54518    # Probe: Look in the Windows system32 directory
54519    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54520
54521  windows_path="$CYGWIN_SYSTEMROOT"
54522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54523    unix_path=`$CYGPATH -u "$windows_path"`
54524    CYGWIN_SYSTEMROOT="$unix_path"
54525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54527    CYGWIN_SYSTEMROOT="$unix_path"
54528  fi
54529
54530    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54531
54532  DLL_NAME="$DLL_NAME"
54533  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54534  METHOD="well-known location in SYSTEMROOT"
54535  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54536    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54537$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54538
54539    # Need to check if the found msvcr is correct architecture
54540    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54541$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54542    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54544      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54545      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54546      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54547        CORRECT_MSVCR_ARCH="PE32 executable"
54548      else
54549        CORRECT_MSVCR_ARCH="PE32+ executable"
54550      fi
54551    else
54552      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54553        CORRECT_MSVCR_ARCH=386
54554      else
54555        CORRECT_MSVCR_ARCH=x86-64
54556      fi
54557    fi
54558    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54559      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54560$as_echo "ok" >&6; }
54561      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54562
54563  # Only process if variable expands to non-empty
54564
54565  if test "x$MSVC_DLL" != x; then
54566    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54567
54568  # Input might be given as Windows format, start by converting to
54569  # unix format.
54570  path="$MSVC_DLL"
54571  new_path=`$CYGPATH -u "$path"`
54572
54573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54576  # "foo.exe" is OK but "foo" is an error.
54577  #
54578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54579  # It is also a way to make sure we got the proper file name for the real test later on.
54580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54581  if test "x$test_shortpath" = x; then
54582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54583$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54584    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54585  fi
54586
54587  # Call helper function which possibly converts this using DOS-style short mode.
54588  # If so, the updated path is stored in $new_path.
54589
54590  input_path="$new_path"
54591  # Check if we need to convert this using DOS-style short mode. If the path
54592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54593  # take no chances and rewrite it.
54594  # Note: m4 eats our [], so we need to use [ and ] instead.
54595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54596  if test "x$has_forbidden_chars" != x; then
54597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54601      # Going to short mode and back again did indeed matter. Since short mode is
54602      # case insensitive, let's make it lowercase to improve readability.
54603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54604      # Now convert it back to Unix-style (cygpath)
54605      input_path=`$CYGPATH -u "$shortmode_path"`
54606      new_path="$input_path"
54607    fi
54608  fi
54609
54610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54611  if test "x$test_cygdrive_prefix" = x; then
54612    # As a simple fix, exclude /usr/bin since it's not a real path.
54613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54615      # a path prefixed by /cygdrive for fixpath to work.
54616      new_path="$CYGWIN_ROOT_PATH$input_path"
54617    fi
54618  fi
54619
54620
54621  if test "x$path" != "x$new_path"; then
54622    MSVC_DLL="$new_path"
54623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54624$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54625  fi
54626
54627    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54628
54629  path="$MSVC_DLL"
54630  has_colon=`$ECHO $path | $GREP ^.:`
54631  new_path="$path"
54632  if test "x$has_colon" = x; then
54633    # Not in mixed or Windows style, start by that.
54634    new_path=`cmd //c echo $path`
54635  fi
54636
54637
54638  input_path="$new_path"
54639  # Check if we need to convert this using DOS-style short mode. If the path
54640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54641  # take no chances and rewrite it.
54642  # Note: m4 eats our [], so we need to use [ and ] instead.
54643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54644  if test "x$has_forbidden_chars" != x; then
54645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54647  fi
54648
54649
54650  windows_path="$new_path"
54651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54652    unix_path=`$CYGPATH -u "$windows_path"`
54653    new_path="$unix_path"
54654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54656    new_path="$unix_path"
54657  fi
54658
54659  if test "x$path" != "x$new_path"; then
54660    MSVC_DLL="$new_path"
54661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54662$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54663  fi
54664
54665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54667
54668    else
54669      # We're on a unix platform. Hooray! :)
54670      path="$MSVC_DLL"
54671      has_space=`$ECHO "$path" | $GREP " "`
54672      if test "x$has_space" != x; then
54673        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54674$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54675        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54676      fi
54677
54678      # Use eval to expand a potential ~
54679      eval path="$path"
54680      if test ! -f "$path" && test ! -d "$path"; then
54681        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54682      fi
54683
54684      if test -d "$path"; then
54685        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54686      else
54687        dir="`$DIRNAME "$path"`"
54688        base="`$BASENAME "$path"`"
54689        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54690      fi
54691    fi
54692  fi
54693
54694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54695$as_echo_n "checking for $DLL_NAME... " >&6; }
54696      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54697$as_echo "$MSVC_DLL" >&6; }
54698    else
54699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54700$as_echo "incorrect, ignoring" >&6; }
54701      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54702$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54703    fi
54704  fi
54705
54706  fi
54707
54708  if test "x$MSVC_DLL" = x; then
54709    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54710    if test "x$VS100COMNTOOLS" != x; then
54711      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54712
54713  windows_path="$CYGWIN_VS_TOOLS_DIR"
54714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54715    unix_path=`$CYGPATH -u "$windows_path"`
54716    CYGWIN_VS_TOOLS_DIR="$unix_path"
54717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54719    CYGWIN_VS_TOOLS_DIR="$unix_path"
54720  fi
54721
54722      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54723        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54724	    | $GREP -i /x64/ | $HEAD --lines 1`
54725      else
54726        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54727	    | $GREP -i /x86/ | $HEAD --lines 1`
54728      fi
54729
54730  DLL_NAME="$DLL_NAME"
54731  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54732  METHOD="search of VS100COMNTOOLS"
54733  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54734    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54735$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54736
54737    # Need to check if the found msvcr is correct architecture
54738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54739$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54740    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54742      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54743      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54744      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54745        CORRECT_MSVCR_ARCH="PE32 executable"
54746      else
54747        CORRECT_MSVCR_ARCH="PE32+ executable"
54748      fi
54749    else
54750      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54751        CORRECT_MSVCR_ARCH=386
54752      else
54753        CORRECT_MSVCR_ARCH=x86-64
54754      fi
54755    fi
54756    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54758$as_echo "ok" >&6; }
54759      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54760
54761  # Only process if variable expands to non-empty
54762
54763  if test "x$MSVC_DLL" != x; then
54764    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54765
54766  # Input might be given as Windows format, start by converting to
54767  # unix format.
54768  path="$MSVC_DLL"
54769  new_path=`$CYGPATH -u "$path"`
54770
54771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54774  # "foo.exe" is OK but "foo" is an error.
54775  #
54776  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54777  # It is also a way to make sure we got the proper file name for the real test later on.
54778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54779  if test "x$test_shortpath" = x; then
54780    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54781$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54782    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54783  fi
54784
54785  # Call helper function which possibly converts this using DOS-style short mode.
54786  # If so, the updated path is stored in $new_path.
54787
54788  input_path="$new_path"
54789  # Check if we need to convert this using DOS-style short mode. If the path
54790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54791  # take no chances and rewrite it.
54792  # Note: m4 eats our [], so we need to use [ and ] instead.
54793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54794  if test "x$has_forbidden_chars" != x; then
54795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54799      # Going to short mode and back again did indeed matter. Since short mode is
54800      # case insensitive, let's make it lowercase to improve readability.
54801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54802      # Now convert it back to Unix-style (cygpath)
54803      input_path=`$CYGPATH -u "$shortmode_path"`
54804      new_path="$input_path"
54805    fi
54806  fi
54807
54808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54809  if test "x$test_cygdrive_prefix" = x; then
54810    # As a simple fix, exclude /usr/bin since it's not a real path.
54811    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54813      # a path prefixed by /cygdrive for fixpath to work.
54814      new_path="$CYGWIN_ROOT_PATH$input_path"
54815    fi
54816  fi
54817
54818
54819  if test "x$path" != "x$new_path"; then
54820    MSVC_DLL="$new_path"
54821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54822$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54823  fi
54824
54825    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54826
54827  path="$MSVC_DLL"
54828  has_colon=`$ECHO $path | $GREP ^.:`
54829  new_path="$path"
54830  if test "x$has_colon" = x; then
54831    # Not in mixed or Windows style, start by that.
54832    new_path=`cmd //c echo $path`
54833  fi
54834
54835
54836  input_path="$new_path"
54837  # Check if we need to convert this using DOS-style short mode. If the path
54838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54839  # take no chances and rewrite it.
54840  # Note: m4 eats our [], so we need to use [ and ] instead.
54841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54842  if test "x$has_forbidden_chars" != x; then
54843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54845  fi
54846
54847
54848  windows_path="$new_path"
54849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54850    unix_path=`$CYGPATH -u "$windows_path"`
54851    new_path="$unix_path"
54852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54854    new_path="$unix_path"
54855  fi
54856
54857  if test "x$path" != "x$new_path"; then
54858    MSVC_DLL="$new_path"
54859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54860$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54861  fi
54862
54863  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54864  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54865
54866    else
54867      # We're on a unix platform. Hooray! :)
54868      path="$MSVC_DLL"
54869      has_space=`$ECHO "$path" | $GREP " "`
54870      if test "x$has_space" != x; then
54871        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54872$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54873        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54874      fi
54875
54876      # Use eval to expand a potential ~
54877      eval path="$path"
54878      if test ! -f "$path" && test ! -d "$path"; then
54879        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54880      fi
54881
54882      if test -d "$path"; then
54883        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54884      else
54885        dir="`$DIRNAME "$path"`"
54886        base="`$BASENAME "$path"`"
54887        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54888      fi
54889    fi
54890  fi
54891
54892      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54893$as_echo_n "checking for $DLL_NAME... " >&6; }
54894      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54895$as_echo "$MSVC_DLL" >&6; }
54896    else
54897      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54898$as_echo "incorrect, ignoring" >&6; }
54899      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54900$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54901    fi
54902  fi
54903
54904    fi
54905  fi
54906
54907  if test "x$MSVC_DLL" = x; then
54908    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54909    # (This was the original behaviour; kept since it might turn something up)
54910    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54911      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54912        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54913	    | $GREP x64 | $HEAD --lines 1`
54914      else
54915        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54916	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54917        if test "x$POSSIBLE_MSVC_DLL" = x; then
54918          # We're grasping at straws now...
54919          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54920	      | $HEAD --lines 1`
54921        fi
54922      fi
54923
54924
54925  DLL_NAME="$DLL_NAME"
54926  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54927  METHOD="search of VCINSTALLDIR"
54928  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54929    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54930$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54931
54932    # Need to check if the found msvcr is correct architecture
54933    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54934$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54935    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54936    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54937      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54938      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54939      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54940        CORRECT_MSVCR_ARCH="PE32 executable"
54941      else
54942        CORRECT_MSVCR_ARCH="PE32+ executable"
54943      fi
54944    else
54945      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54946        CORRECT_MSVCR_ARCH=386
54947      else
54948        CORRECT_MSVCR_ARCH=x86-64
54949      fi
54950    fi
54951    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54953$as_echo "ok" >&6; }
54954      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54955
54956  # Only process if variable expands to non-empty
54957
54958  if test "x$MSVC_DLL" != x; then
54959    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54960
54961  # Input might be given as Windows format, start by converting to
54962  # unix format.
54963  path="$MSVC_DLL"
54964  new_path=`$CYGPATH -u "$path"`
54965
54966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54969  # "foo.exe" is OK but "foo" is an error.
54970  #
54971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54972  # It is also a way to make sure we got the proper file name for the real test later on.
54973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54974  if test "x$test_shortpath" = x; then
54975    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54976$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54977    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54978  fi
54979
54980  # Call helper function which possibly converts this using DOS-style short mode.
54981  # If so, the updated path is stored in $new_path.
54982
54983  input_path="$new_path"
54984  # Check if we need to convert this using DOS-style short mode. If the path
54985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54986  # take no chances and rewrite it.
54987  # Note: m4 eats our [], so we need to use [ and ] instead.
54988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54989  if test "x$has_forbidden_chars" != x; then
54990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54994      # Going to short mode and back again did indeed matter. Since short mode is
54995      # case insensitive, let's make it lowercase to improve readability.
54996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54997      # Now convert it back to Unix-style (cygpath)
54998      input_path=`$CYGPATH -u "$shortmode_path"`
54999      new_path="$input_path"
55000    fi
55001  fi
55002
55003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55004  if test "x$test_cygdrive_prefix" = x; then
55005    # As a simple fix, exclude /usr/bin since it's not a real path.
55006    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55008      # a path prefixed by /cygdrive for fixpath to work.
55009      new_path="$CYGWIN_ROOT_PATH$input_path"
55010    fi
55011  fi
55012
55013
55014  if test "x$path" != "x$new_path"; then
55015    MSVC_DLL="$new_path"
55016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55017$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55018  fi
55019
55020    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55021
55022  path="$MSVC_DLL"
55023  has_colon=`$ECHO $path | $GREP ^.:`
55024  new_path="$path"
55025  if test "x$has_colon" = x; then
55026    # Not in mixed or Windows style, start by that.
55027    new_path=`cmd //c echo $path`
55028  fi
55029
55030
55031  input_path="$new_path"
55032  # Check if we need to convert this using DOS-style short mode. If the path
55033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55034  # take no chances and rewrite it.
55035  # Note: m4 eats our [], so we need to use [ and ] instead.
55036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55037  if test "x$has_forbidden_chars" != x; then
55038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55040  fi
55041
55042
55043  windows_path="$new_path"
55044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55045    unix_path=`$CYGPATH -u "$windows_path"`
55046    new_path="$unix_path"
55047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55049    new_path="$unix_path"
55050  fi
55051
55052  if test "x$path" != "x$new_path"; then
55053    MSVC_DLL="$new_path"
55054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55055$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55056  fi
55057
55058  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55059  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55060
55061    else
55062      # We're on a unix platform. Hooray! :)
55063      path="$MSVC_DLL"
55064      has_space=`$ECHO "$path" | $GREP " "`
55065      if test "x$has_space" != x; then
55066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55067$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55068        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55069      fi
55070
55071      # Use eval to expand a potential ~
55072      eval path="$path"
55073      if test ! -f "$path" && test ! -d "$path"; then
55074        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55075      fi
55076
55077      if test -d "$path"; then
55078        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55079      else
55080        dir="`$DIRNAME "$path"`"
55081        base="`$BASENAME "$path"`"
55082        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55083      fi
55084    fi
55085  fi
55086
55087      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55088$as_echo_n "checking for $DLL_NAME... " >&6; }
55089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55090$as_echo "$MSVC_DLL" >&6; }
55091    else
55092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55093$as_echo "incorrect, ignoring" >&6; }
55094      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55095$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55096    fi
55097  fi
55098
55099    fi
55100  fi
55101
55102  if test "x$MSVC_DLL" = x; then
55103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55104$as_echo_n "checking for $DLL_NAME... " >&6; }
55105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55106$as_echo "no" >&6; }
55107    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55108  fi
55109
55110    MSVCR_DLL="$MSVC_DLL"
55111  fi
55112
55113
55114
55115# Check whether --with-msvcp-dll was given.
55116if test "${with_msvcp_dll+set}" = set; then :
55117  withval=$with_msvcp_dll;
55118fi
55119
55120
55121  if test "x$MSVCP_NAME" != "x"; then
55122    if test "x$with_msvcp_dll" != x; then
55123      # If given explicitely by user, do not probe. If not present, fail directly.
55124
55125  DLL_NAME="$MSVCP_NAME"
55126  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55127  METHOD="--with-msvcp-dll"
55128  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55129    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55130$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55131
55132    # Need to check if the found msvcr is correct architecture
55133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55134$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55135    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55136    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55137      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55138      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55139      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55140        CORRECT_MSVCR_ARCH="PE32 executable"
55141      else
55142        CORRECT_MSVCR_ARCH="PE32+ executable"
55143      fi
55144    else
55145      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55146        CORRECT_MSVCR_ARCH=386
55147      else
55148        CORRECT_MSVCR_ARCH=x86-64
55149      fi
55150    fi
55151    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55153$as_echo "ok" >&6; }
55154      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55155
55156  # Only process if variable expands to non-empty
55157
55158  if test "x$MSVC_DLL" != x; then
55159    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55160
55161  # Input might be given as Windows format, start by converting to
55162  # unix format.
55163  path="$MSVC_DLL"
55164  new_path=`$CYGPATH -u "$path"`
55165
55166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55169  # "foo.exe" is OK but "foo" is an error.
55170  #
55171  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55172  # It is also a way to make sure we got the proper file name for the real test later on.
55173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55174  if test "x$test_shortpath" = x; then
55175    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55176$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55177    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55178  fi
55179
55180  # Call helper function which possibly converts this using DOS-style short mode.
55181  # If so, the updated path is stored in $new_path.
55182
55183  input_path="$new_path"
55184  # Check if we need to convert this using DOS-style short mode. If the path
55185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55186  # take no chances and rewrite it.
55187  # Note: m4 eats our [], so we need to use [ and ] instead.
55188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55189  if test "x$has_forbidden_chars" != x; then
55190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55194      # Going to short mode and back again did indeed matter. Since short mode is
55195      # case insensitive, let's make it lowercase to improve readability.
55196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55197      # Now convert it back to Unix-style (cygpath)
55198      input_path=`$CYGPATH -u "$shortmode_path"`
55199      new_path="$input_path"
55200    fi
55201  fi
55202
55203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55204  if test "x$test_cygdrive_prefix" = x; then
55205    # As a simple fix, exclude /usr/bin since it's not a real path.
55206    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55208      # a path prefixed by /cygdrive for fixpath to work.
55209      new_path="$CYGWIN_ROOT_PATH$input_path"
55210    fi
55211  fi
55212
55213
55214  if test "x$path" != "x$new_path"; then
55215    MSVC_DLL="$new_path"
55216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55217$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55218  fi
55219
55220    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55221
55222  path="$MSVC_DLL"
55223  has_colon=`$ECHO $path | $GREP ^.:`
55224  new_path="$path"
55225  if test "x$has_colon" = x; then
55226    # Not in mixed or Windows style, start by that.
55227    new_path=`cmd //c echo $path`
55228  fi
55229
55230
55231  input_path="$new_path"
55232  # Check if we need to convert this using DOS-style short mode. If the path
55233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55234  # take no chances and rewrite it.
55235  # Note: m4 eats our [], so we need to use [ and ] instead.
55236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55237  if test "x$has_forbidden_chars" != x; then
55238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55240  fi
55241
55242
55243  windows_path="$new_path"
55244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55245    unix_path=`$CYGPATH -u "$windows_path"`
55246    new_path="$unix_path"
55247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55249    new_path="$unix_path"
55250  fi
55251
55252  if test "x$path" != "x$new_path"; then
55253    MSVC_DLL="$new_path"
55254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55255$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55256  fi
55257
55258  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55259  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55260
55261    else
55262      # We're on a unix platform. Hooray! :)
55263      path="$MSVC_DLL"
55264      has_space=`$ECHO "$path" | $GREP " "`
55265      if test "x$has_space" != x; then
55266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55267$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55268        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55269      fi
55270
55271      # Use eval to expand a potential ~
55272      eval path="$path"
55273      if test ! -f "$path" && test ! -d "$path"; then
55274        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55275      fi
55276
55277      if test -d "$path"; then
55278        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55279      else
55280        dir="`$DIRNAME "$path"`"
55281        base="`$BASENAME "$path"`"
55282        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55283      fi
55284    fi
55285  fi
55286
55287      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55288$as_echo_n "checking for $DLL_NAME... " >&6; }
55289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55290$as_echo "$MSVC_DLL" >&6; }
55291    else
55292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55293$as_echo "incorrect, ignoring" >&6; }
55294      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55295$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55296    fi
55297  fi
55298
55299      if test "x$MSVC_DLL" = x; then
55300        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55301      fi
55302      MSVCP_DLL="$MSVC_DLL"
55303    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55304
55305  DLL_NAME="$MSVCP_NAME"
55306  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55307  METHOD="devkit"
55308  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55309    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55310$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55311
55312    # Need to check if the found msvcr is correct architecture
55313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55314$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55315    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55317      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55318      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55319      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55320        CORRECT_MSVCR_ARCH="PE32 executable"
55321      else
55322        CORRECT_MSVCR_ARCH="PE32+ executable"
55323      fi
55324    else
55325      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55326        CORRECT_MSVCR_ARCH=386
55327      else
55328        CORRECT_MSVCR_ARCH=x86-64
55329      fi
55330    fi
55331    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55333$as_echo "ok" >&6; }
55334      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55335
55336  # Only process if variable expands to non-empty
55337
55338  if test "x$MSVC_DLL" != x; then
55339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55340
55341  # Input might be given as Windows format, start by converting to
55342  # unix format.
55343  path="$MSVC_DLL"
55344  new_path=`$CYGPATH -u "$path"`
55345
55346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55349  # "foo.exe" is OK but "foo" is an error.
55350  #
55351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55352  # It is also a way to make sure we got the proper file name for the real test later on.
55353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55354  if test "x$test_shortpath" = x; then
55355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55356$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55357    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55358  fi
55359
55360  # Call helper function which possibly converts this using DOS-style short mode.
55361  # If so, the updated path is stored in $new_path.
55362
55363  input_path="$new_path"
55364  # Check if we need to convert this using DOS-style short mode. If the path
55365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55366  # take no chances and rewrite it.
55367  # Note: m4 eats our [], so we need to use [ and ] instead.
55368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55369  if test "x$has_forbidden_chars" != x; then
55370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55374      # Going to short mode and back again did indeed matter. Since short mode is
55375      # case insensitive, let's make it lowercase to improve readability.
55376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55377      # Now convert it back to Unix-style (cygpath)
55378      input_path=`$CYGPATH -u "$shortmode_path"`
55379      new_path="$input_path"
55380    fi
55381  fi
55382
55383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55384  if test "x$test_cygdrive_prefix" = x; then
55385    # As a simple fix, exclude /usr/bin since it's not a real path.
55386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55388      # a path prefixed by /cygdrive for fixpath to work.
55389      new_path="$CYGWIN_ROOT_PATH$input_path"
55390    fi
55391  fi
55392
55393
55394  if test "x$path" != "x$new_path"; then
55395    MSVC_DLL="$new_path"
55396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55397$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55398  fi
55399
55400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55401
55402  path="$MSVC_DLL"
55403  has_colon=`$ECHO $path | $GREP ^.:`
55404  new_path="$path"
55405  if test "x$has_colon" = x; then
55406    # Not in mixed or Windows style, start by that.
55407    new_path=`cmd //c echo $path`
55408  fi
55409
55410
55411  input_path="$new_path"
55412  # Check if we need to convert this using DOS-style short mode. If the path
55413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55414  # take no chances and rewrite it.
55415  # Note: m4 eats our [], so we need to use [ and ] instead.
55416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55417  if test "x$has_forbidden_chars" != x; then
55418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55420  fi
55421
55422
55423  windows_path="$new_path"
55424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55425    unix_path=`$CYGPATH -u "$windows_path"`
55426    new_path="$unix_path"
55427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55429    new_path="$unix_path"
55430  fi
55431
55432  if test "x$path" != "x$new_path"; then
55433    MSVC_DLL="$new_path"
55434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55435$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55436  fi
55437
55438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55440
55441    else
55442      # We're on a unix platform. Hooray! :)
55443      path="$MSVC_DLL"
55444      has_space=`$ECHO "$path" | $GREP " "`
55445      if test "x$has_space" != x; then
55446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55447$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55449      fi
55450
55451      # Use eval to expand a potential ~
55452      eval path="$path"
55453      if test ! -f "$path" && test ! -d "$path"; then
55454        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55455      fi
55456
55457      if test -d "$path"; then
55458        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55459      else
55460        dir="`$DIRNAME "$path"`"
55461        base="`$BASENAME "$path"`"
55462        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55463      fi
55464    fi
55465  fi
55466
55467      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55468$as_echo_n "checking for $DLL_NAME... " >&6; }
55469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55470$as_echo "$MSVC_DLL" >&6; }
55471    else
55472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55473$as_echo "incorrect, ignoring" >&6; }
55474      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55475$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55476    fi
55477  fi
55478
55479      if test "x$MSVC_DLL" = x; then
55480        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55481      fi
55482      MSVCP_DLL="$MSVC_DLL"
55483    else
55484
55485  DLL_NAME="${MSVCP_NAME}"
55486  MSVC_DLL=
55487
55488  if test "x$MSVC_DLL" = x; then
55489    # Probe: Using well-known location from Visual Studio 10.0
55490    if test "x$VCINSTALLDIR" != x; then
55491      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55492
55493  windows_path="$CYGWIN_VC_INSTALL_DIR"
55494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55495    unix_path=`$CYGPATH -u "$windows_path"`
55496    CYGWIN_VC_INSTALL_DIR="$unix_path"
55497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55499    CYGWIN_VC_INSTALL_DIR="$unix_path"
55500  fi
55501
55502      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55503        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55504      else
55505        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55506      fi
55507      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55508
55509  DLL_NAME="$DLL_NAME"
55510  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55511  METHOD="well-known location in VCINSTALLDIR"
55512  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55513    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55514$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55515
55516    # Need to check if the found msvcr is correct architecture
55517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55518$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55519    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55521      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55522      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55523      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55524        CORRECT_MSVCR_ARCH="PE32 executable"
55525      else
55526        CORRECT_MSVCR_ARCH="PE32+ executable"
55527      fi
55528    else
55529      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55530        CORRECT_MSVCR_ARCH=386
55531      else
55532        CORRECT_MSVCR_ARCH=x86-64
55533      fi
55534    fi
55535    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55536      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55537$as_echo "ok" >&6; }
55538      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55539
55540  # Only process if variable expands to non-empty
55541
55542  if test "x$MSVC_DLL" != x; then
55543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55544
55545  # Input might be given as Windows format, start by converting to
55546  # unix format.
55547  path="$MSVC_DLL"
55548  new_path=`$CYGPATH -u "$path"`
55549
55550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55553  # "foo.exe" is OK but "foo" is an error.
55554  #
55555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55556  # It is also a way to make sure we got the proper file name for the real test later on.
55557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55558  if test "x$test_shortpath" = x; then
55559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55560$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55561    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55562  fi
55563
55564  # Call helper function which possibly converts this using DOS-style short mode.
55565  # If so, the updated path is stored in $new_path.
55566
55567  input_path="$new_path"
55568  # Check if we need to convert this using DOS-style short mode. If the path
55569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55570  # take no chances and rewrite it.
55571  # Note: m4 eats our [], so we need to use [ and ] instead.
55572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55573  if test "x$has_forbidden_chars" != x; then
55574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55578      # Going to short mode and back again did indeed matter. Since short mode is
55579      # case insensitive, let's make it lowercase to improve readability.
55580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55581      # Now convert it back to Unix-style (cygpath)
55582      input_path=`$CYGPATH -u "$shortmode_path"`
55583      new_path="$input_path"
55584    fi
55585  fi
55586
55587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55588  if test "x$test_cygdrive_prefix" = x; then
55589    # As a simple fix, exclude /usr/bin since it's not a real path.
55590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55592      # a path prefixed by /cygdrive for fixpath to work.
55593      new_path="$CYGWIN_ROOT_PATH$input_path"
55594    fi
55595  fi
55596
55597
55598  if test "x$path" != "x$new_path"; then
55599    MSVC_DLL="$new_path"
55600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55601$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55602  fi
55603
55604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55605
55606  path="$MSVC_DLL"
55607  has_colon=`$ECHO $path | $GREP ^.:`
55608  new_path="$path"
55609  if test "x$has_colon" = x; then
55610    # Not in mixed or Windows style, start by that.
55611    new_path=`cmd //c echo $path`
55612  fi
55613
55614
55615  input_path="$new_path"
55616  # Check if we need to convert this using DOS-style short mode. If the path
55617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55618  # take no chances and rewrite it.
55619  # Note: m4 eats our [], so we need to use [ and ] instead.
55620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55621  if test "x$has_forbidden_chars" != x; then
55622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55624  fi
55625
55626
55627  windows_path="$new_path"
55628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55629    unix_path=`$CYGPATH -u "$windows_path"`
55630    new_path="$unix_path"
55631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55633    new_path="$unix_path"
55634  fi
55635
55636  if test "x$path" != "x$new_path"; then
55637    MSVC_DLL="$new_path"
55638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55639$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55640  fi
55641
55642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55644
55645    else
55646      # We're on a unix platform. Hooray! :)
55647      path="$MSVC_DLL"
55648      has_space=`$ECHO "$path" | $GREP " "`
55649      if test "x$has_space" != x; then
55650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55651$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55653      fi
55654
55655      # Use eval to expand a potential ~
55656      eval path="$path"
55657      if test ! -f "$path" && test ! -d "$path"; then
55658        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55659      fi
55660
55661      if test -d "$path"; then
55662        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55663      else
55664        dir="`$DIRNAME "$path"`"
55665        base="`$BASENAME "$path"`"
55666        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55667      fi
55668    fi
55669  fi
55670
55671      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55672$as_echo_n "checking for $DLL_NAME... " >&6; }
55673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55674$as_echo "$MSVC_DLL" >&6; }
55675    else
55676      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55677$as_echo "incorrect, ignoring" >&6; }
55678      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55679$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55680    fi
55681  fi
55682
55683    fi
55684  fi
55685
55686  if test "x$MSVC_DLL" = x; then
55687    # Probe: Check in the Boot JDK directory.
55688    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55689
55690  DLL_NAME="$DLL_NAME"
55691  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55692  METHOD="well-known location in Boot JDK"
55693  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55694    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55695$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55696
55697    # Need to check if the found msvcr is correct architecture
55698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55699$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55700    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55701    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55702      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55703      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55704      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55705        CORRECT_MSVCR_ARCH="PE32 executable"
55706      else
55707        CORRECT_MSVCR_ARCH="PE32+ executable"
55708      fi
55709    else
55710      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55711        CORRECT_MSVCR_ARCH=386
55712      else
55713        CORRECT_MSVCR_ARCH=x86-64
55714      fi
55715    fi
55716    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55717      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55718$as_echo "ok" >&6; }
55719      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55720
55721  # Only process if variable expands to non-empty
55722
55723  if test "x$MSVC_DLL" != x; then
55724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55725
55726  # Input might be given as Windows format, start by converting to
55727  # unix format.
55728  path="$MSVC_DLL"
55729  new_path=`$CYGPATH -u "$path"`
55730
55731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55734  # "foo.exe" is OK but "foo" is an error.
55735  #
55736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55737  # It is also a way to make sure we got the proper file name for the real test later on.
55738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55739  if test "x$test_shortpath" = x; then
55740    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55741$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55742    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55743  fi
55744
55745  # Call helper function which possibly converts this using DOS-style short mode.
55746  # If so, the updated path is stored in $new_path.
55747
55748  input_path="$new_path"
55749  # Check if we need to convert this using DOS-style short mode. If the path
55750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55751  # take no chances and rewrite it.
55752  # Note: m4 eats our [], so we need to use [ and ] instead.
55753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55754  if test "x$has_forbidden_chars" != x; then
55755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55759      # Going to short mode and back again did indeed matter. Since short mode is
55760      # case insensitive, let's make it lowercase to improve readability.
55761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55762      # Now convert it back to Unix-style (cygpath)
55763      input_path=`$CYGPATH -u "$shortmode_path"`
55764      new_path="$input_path"
55765    fi
55766  fi
55767
55768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55769  if test "x$test_cygdrive_prefix" = x; then
55770    # As a simple fix, exclude /usr/bin since it's not a real path.
55771    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55773      # a path prefixed by /cygdrive for fixpath to work.
55774      new_path="$CYGWIN_ROOT_PATH$input_path"
55775    fi
55776  fi
55777
55778
55779  if test "x$path" != "x$new_path"; then
55780    MSVC_DLL="$new_path"
55781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55782$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55783  fi
55784
55785    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55786
55787  path="$MSVC_DLL"
55788  has_colon=`$ECHO $path | $GREP ^.:`
55789  new_path="$path"
55790  if test "x$has_colon" = x; then
55791    # Not in mixed or Windows style, start by that.
55792    new_path=`cmd //c echo $path`
55793  fi
55794
55795
55796  input_path="$new_path"
55797  # Check if we need to convert this using DOS-style short mode. If the path
55798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55799  # take no chances and rewrite it.
55800  # Note: m4 eats our [], so we need to use [ and ] instead.
55801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55802  if test "x$has_forbidden_chars" != x; then
55803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55805  fi
55806
55807
55808  windows_path="$new_path"
55809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55810    unix_path=`$CYGPATH -u "$windows_path"`
55811    new_path="$unix_path"
55812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55814    new_path="$unix_path"
55815  fi
55816
55817  if test "x$path" != "x$new_path"; then
55818    MSVC_DLL="$new_path"
55819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55820$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55821  fi
55822
55823  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55824  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55825
55826    else
55827      # We're on a unix platform. Hooray! :)
55828      path="$MSVC_DLL"
55829      has_space=`$ECHO "$path" | $GREP " "`
55830      if test "x$has_space" != x; then
55831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55832$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55833        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55834      fi
55835
55836      # Use eval to expand a potential ~
55837      eval path="$path"
55838      if test ! -f "$path" && test ! -d "$path"; then
55839        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55840      fi
55841
55842      if test -d "$path"; then
55843        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55844      else
55845        dir="`$DIRNAME "$path"`"
55846        base="`$BASENAME "$path"`"
55847        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55848      fi
55849    fi
55850  fi
55851
55852      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55853$as_echo_n "checking for $DLL_NAME... " >&6; }
55854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55855$as_echo "$MSVC_DLL" >&6; }
55856    else
55857      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55858$as_echo "incorrect, ignoring" >&6; }
55859      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55860$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55861    fi
55862  fi
55863
55864  fi
55865
55866  if test "x$MSVC_DLL" = x; then
55867    # Probe: Look in the Windows system32 directory
55868    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55869
55870  windows_path="$CYGWIN_SYSTEMROOT"
55871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55872    unix_path=`$CYGPATH -u "$windows_path"`
55873    CYGWIN_SYSTEMROOT="$unix_path"
55874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55876    CYGWIN_SYSTEMROOT="$unix_path"
55877  fi
55878
55879    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55880
55881  DLL_NAME="$DLL_NAME"
55882  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55883  METHOD="well-known location in SYSTEMROOT"
55884  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55885    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55886$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55887
55888    # Need to check if the found msvcr is correct architecture
55889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55890$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55891    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55893      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55894      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55895      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55896        CORRECT_MSVCR_ARCH="PE32 executable"
55897      else
55898        CORRECT_MSVCR_ARCH="PE32+ executable"
55899      fi
55900    else
55901      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55902        CORRECT_MSVCR_ARCH=386
55903      else
55904        CORRECT_MSVCR_ARCH=x86-64
55905      fi
55906    fi
55907    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55909$as_echo "ok" >&6; }
55910      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55911
55912  # Only process if variable expands to non-empty
55913
55914  if test "x$MSVC_DLL" != x; then
55915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55916
55917  # Input might be given as Windows format, start by converting to
55918  # unix format.
55919  path="$MSVC_DLL"
55920  new_path=`$CYGPATH -u "$path"`
55921
55922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55925  # "foo.exe" is OK but "foo" is an error.
55926  #
55927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55928  # It is also a way to make sure we got the proper file name for the real test later on.
55929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55930  if test "x$test_shortpath" = x; then
55931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55932$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55933    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55934  fi
55935
55936  # Call helper function which possibly converts this using DOS-style short mode.
55937  # If so, the updated path is stored in $new_path.
55938
55939  input_path="$new_path"
55940  # Check if we need to convert this using DOS-style short mode. If the path
55941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55942  # take no chances and rewrite it.
55943  # Note: m4 eats our [], so we need to use [ and ] instead.
55944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55945  if test "x$has_forbidden_chars" != x; then
55946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55950      # Going to short mode and back again did indeed matter. Since short mode is
55951      # case insensitive, let's make it lowercase to improve readability.
55952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55953      # Now convert it back to Unix-style (cygpath)
55954      input_path=`$CYGPATH -u "$shortmode_path"`
55955      new_path="$input_path"
55956    fi
55957  fi
55958
55959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55960  if test "x$test_cygdrive_prefix" = x; then
55961    # As a simple fix, exclude /usr/bin since it's not a real path.
55962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55964      # a path prefixed by /cygdrive for fixpath to work.
55965      new_path="$CYGWIN_ROOT_PATH$input_path"
55966    fi
55967  fi
55968
55969
55970  if test "x$path" != "x$new_path"; then
55971    MSVC_DLL="$new_path"
55972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55973$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55974  fi
55975
55976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55977
55978  path="$MSVC_DLL"
55979  has_colon=`$ECHO $path | $GREP ^.:`
55980  new_path="$path"
55981  if test "x$has_colon" = x; then
55982    # Not in mixed or Windows style, start by that.
55983    new_path=`cmd //c echo $path`
55984  fi
55985
55986
55987  input_path="$new_path"
55988  # Check if we need to convert this using DOS-style short mode. If the path
55989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55990  # take no chances and rewrite it.
55991  # Note: m4 eats our [], so we need to use [ and ] instead.
55992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55993  if test "x$has_forbidden_chars" != x; then
55994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55996  fi
55997
55998
55999  windows_path="$new_path"
56000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56001    unix_path=`$CYGPATH -u "$windows_path"`
56002    new_path="$unix_path"
56003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56005    new_path="$unix_path"
56006  fi
56007
56008  if test "x$path" != "x$new_path"; then
56009    MSVC_DLL="$new_path"
56010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56011$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56012  fi
56013
56014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56016
56017    else
56018      # We're on a unix platform. Hooray! :)
56019      path="$MSVC_DLL"
56020      has_space=`$ECHO "$path" | $GREP " "`
56021      if test "x$has_space" != x; then
56022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56023$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56025      fi
56026
56027      # Use eval to expand a potential ~
56028      eval path="$path"
56029      if test ! -f "$path" && test ! -d "$path"; then
56030        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56031      fi
56032
56033      if test -d "$path"; then
56034        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56035      else
56036        dir="`$DIRNAME "$path"`"
56037        base="`$BASENAME "$path"`"
56038        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56039      fi
56040    fi
56041  fi
56042
56043      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56044$as_echo_n "checking for $DLL_NAME... " >&6; }
56045      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56046$as_echo "$MSVC_DLL" >&6; }
56047    else
56048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56049$as_echo "incorrect, ignoring" >&6; }
56050      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56051$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56052    fi
56053  fi
56054
56055  fi
56056
56057  if test "x$MSVC_DLL" = x; then
56058    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56059    if test "x$VS100COMNTOOLS" != x; then
56060      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56061
56062  windows_path="$CYGWIN_VS_TOOLS_DIR"
56063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56064    unix_path=`$CYGPATH -u "$windows_path"`
56065    CYGWIN_VS_TOOLS_DIR="$unix_path"
56066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56068    CYGWIN_VS_TOOLS_DIR="$unix_path"
56069  fi
56070
56071      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56072        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56073	    | $GREP -i /x64/ | $HEAD --lines 1`
56074      else
56075        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56076	    | $GREP -i /x86/ | $HEAD --lines 1`
56077      fi
56078
56079  DLL_NAME="$DLL_NAME"
56080  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56081  METHOD="search of VS100COMNTOOLS"
56082  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56083    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56084$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56085
56086    # Need to check if the found msvcr is correct architecture
56087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56088$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56089    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56091      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56092      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56093      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56094        CORRECT_MSVCR_ARCH="PE32 executable"
56095      else
56096        CORRECT_MSVCR_ARCH="PE32+ executable"
56097      fi
56098    else
56099      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56100        CORRECT_MSVCR_ARCH=386
56101      else
56102        CORRECT_MSVCR_ARCH=x86-64
56103      fi
56104    fi
56105    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56107$as_echo "ok" >&6; }
56108      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56109
56110  # Only process if variable expands to non-empty
56111
56112  if test "x$MSVC_DLL" != x; then
56113    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56114
56115  # Input might be given as Windows format, start by converting to
56116  # unix format.
56117  path="$MSVC_DLL"
56118  new_path=`$CYGPATH -u "$path"`
56119
56120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56123  # "foo.exe" is OK but "foo" is an error.
56124  #
56125  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56126  # It is also a way to make sure we got the proper file name for the real test later on.
56127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56128  if test "x$test_shortpath" = x; then
56129    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56130$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56131    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56132  fi
56133
56134  # Call helper function which possibly converts this using DOS-style short mode.
56135  # If so, the updated path is stored in $new_path.
56136
56137  input_path="$new_path"
56138  # Check if we need to convert this using DOS-style short mode. If the path
56139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56140  # take no chances and rewrite it.
56141  # Note: m4 eats our [], so we need to use [ and ] instead.
56142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56143  if test "x$has_forbidden_chars" != x; then
56144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56148      # Going to short mode and back again did indeed matter. Since short mode is
56149      # case insensitive, let's make it lowercase to improve readability.
56150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56151      # Now convert it back to Unix-style (cygpath)
56152      input_path=`$CYGPATH -u "$shortmode_path"`
56153      new_path="$input_path"
56154    fi
56155  fi
56156
56157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56158  if test "x$test_cygdrive_prefix" = x; then
56159    # As a simple fix, exclude /usr/bin since it's not a real path.
56160    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56162      # a path prefixed by /cygdrive for fixpath to work.
56163      new_path="$CYGWIN_ROOT_PATH$input_path"
56164    fi
56165  fi
56166
56167
56168  if test "x$path" != "x$new_path"; then
56169    MSVC_DLL="$new_path"
56170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56171$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56172  fi
56173
56174    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56175
56176  path="$MSVC_DLL"
56177  has_colon=`$ECHO $path | $GREP ^.:`
56178  new_path="$path"
56179  if test "x$has_colon" = x; then
56180    # Not in mixed or Windows style, start by that.
56181    new_path=`cmd //c echo $path`
56182  fi
56183
56184
56185  input_path="$new_path"
56186  # Check if we need to convert this using DOS-style short mode. If the path
56187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56188  # take no chances and rewrite it.
56189  # Note: m4 eats our [], so we need to use [ and ] instead.
56190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56191  if test "x$has_forbidden_chars" != x; then
56192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56194  fi
56195
56196
56197  windows_path="$new_path"
56198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56199    unix_path=`$CYGPATH -u "$windows_path"`
56200    new_path="$unix_path"
56201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56203    new_path="$unix_path"
56204  fi
56205
56206  if test "x$path" != "x$new_path"; then
56207    MSVC_DLL="$new_path"
56208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56209$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56210  fi
56211
56212  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56213  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56214
56215    else
56216      # We're on a unix platform. Hooray! :)
56217      path="$MSVC_DLL"
56218      has_space=`$ECHO "$path" | $GREP " "`
56219      if test "x$has_space" != x; then
56220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56221$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56222        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56223      fi
56224
56225      # Use eval to expand a potential ~
56226      eval path="$path"
56227      if test ! -f "$path" && test ! -d "$path"; then
56228        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56229      fi
56230
56231      if test -d "$path"; then
56232        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56233      else
56234        dir="`$DIRNAME "$path"`"
56235        base="`$BASENAME "$path"`"
56236        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56237      fi
56238    fi
56239  fi
56240
56241      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56242$as_echo_n "checking for $DLL_NAME... " >&6; }
56243      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56244$as_echo "$MSVC_DLL" >&6; }
56245    else
56246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56247$as_echo "incorrect, ignoring" >&6; }
56248      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56249$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56250    fi
56251  fi
56252
56253    fi
56254  fi
56255
56256  if test "x$MSVC_DLL" = x; then
56257    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56258    # (This was the original behaviour; kept since it might turn something up)
56259    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56260      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56261        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56262	    | $GREP x64 | $HEAD --lines 1`
56263      else
56264        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56265	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56266        if test "x$POSSIBLE_MSVC_DLL" = x; then
56267          # We're grasping at straws now...
56268          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56269	      | $HEAD --lines 1`
56270        fi
56271      fi
56272
56273
56274  DLL_NAME="$DLL_NAME"
56275  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56276  METHOD="search of VCINSTALLDIR"
56277  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56278    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56279$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56280
56281    # Need to check if the found msvcr is correct architecture
56282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56283$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56284    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56286      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56287      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56288      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56289        CORRECT_MSVCR_ARCH="PE32 executable"
56290      else
56291        CORRECT_MSVCR_ARCH="PE32+ executable"
56292      fi
56293    else
56294      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56295        CORRECT_MSVCR_ARCH=386
56296      else
56297        CORRECT_MSVCR_ARCH=x86-64
56298      fi
56299    fi
56300    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56301      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56302$as_echo "ok" >&6; }
56303      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56304
56305  # Only process if variable expands to non-empty
56306
56307  if test "x$MSVC_DLL" != x; then
56308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56309
56310  # Input might be given as Windows format, start by converting to
56311  # unix format.
56312  path="$MSVC_DLL"
56313  new_path=`$CYGPATH -u "$path"`
56314
56315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56318  # "foo.exe" is OK but "foo" is an error.
56319  #
56320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56321  # It is also a way to make sure we got the proper file name for the real test later on.
56322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56323  if test "x$test_shortpath" = x; then
56324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56325$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56326    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56327  fi
56328
56329  # Call helper function which possibly converts this using DOS-style short mode.
56330  # If so, the updated path is stored in $new_path.
56331
56332  input_path="$new_path"
56333  # Check if we need to convert this using DOS-style short mode. If the path
56334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56335  # take no chances and rewrite it.
56336  # Note: m4 eats our [], so we need to use [ and ] instead.
56337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56338  if test "x$has_forbidden_chars" != x; then
56339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56343      # Going to short mode and back again did indeed matter. Since short mode is
56344      # case insensitive, let's make it lowercase to improve readability.
56345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56346      # Now convert it back to Unix-style (cygpath)
56347      input_path=`$CYGPATH -u "$shortmode_path"`
56348      new_path="$input_path"
56349    fi
56350  fi
56351
56352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56353  if test "x$test_cygdrive_prefix" = x; then
56354    # As a simple fix, exclude /usr/bin since it's not a real path.
56355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56357      # a path prefixed by /cygdrive for fixpath to work.
56358      new_path="$CYGWIN_ROOT_PATH$input_path"
56359    fi
56360  fi
56361
56362
56363  if test "x$path" != "x$new_path"; then
56364    MSVC_DLL="$new_path"
56365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56366$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56367  fi
56368
56369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56370
56371  path="$MSVC_DLL"
56372  has_colon=`$ECHO $path | $GREP ^.:`
56373  new_path="$path"
56374  if test "x$has_colon" = x; then
56375    # Not in mixed or Windows style, start by that.
56376    new_path=`cmd //c echo $path`
56377  fi
56378
56379
56380  input_path="$new_path"
56381  # Check if we need to convert this using DOS-style short mode. If the path
56382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56383  # take no chances and rewrite it.
56384  # Note: m4 eats our [], so we need to use [ and ] instead.
56385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56386  if test "x$has_forbidden_chars" != x; then
56387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56389  fi
56390
56391
56392  windows_path="$new_path"
56393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56394    unix_path=`$CYGPATH -u "$windows_path"`
56395    new_path="$unix_path"
56396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56398    new_path="$unix_path"
56399  fi
56400
56401  if test "x$path" != "x$new_path"; then
56402    MSVC_DLL="$new_path"
56403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56404$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56405  fi
56406
56407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56409
56410    else
56411      # We're on a unix platform. Hooray! :)
56412      path="$MSVC_DLL"
56413      has_space=`$ECHO "$path" | $GREP " "`
56414      if test "x$has_space" != x; then
56415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56416$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56418      fi
56419
56420      # Use eval to expand a potential ~
56421      eval path="$path"
56422      if test ! -f "$path" && test ! -d "$path"; then
56423        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56424      fi
56425
56426      if test -d "$path"; then
56427        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56428      else
56429        dir="`$DIRNAME "$path"`"
56430        base="`$BASENAME "$path"`"
56431        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56432      fi
56433    fi
56434  fi
56435
56436      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56437$as_echo_n "checking for $DLL_NAME... " >&6; }
56438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56439$as_echo "$MSVC_DLL" >&6; }
56440    else
56441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56442$as_echo "incorrect, ignoring" >&6; }
56443      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56444$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56445    fi
56446  fi
56447
56448    fi
56449  fi
56450
56451  if test "x$MSVC_DLL" = x; then
56452    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56453$as_echo_n "checking for $DLL_NAME... " >&6; }
56454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56455$as_echo "no" >&6; }
56456    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56457  fi
56458
56459      MSVCP_DLL="$MSVC_DLL"
56460    fi
56461
56462  fi
56463
56464  fi
56465
56466
56467  if test "x$NEEDS_LIB_X11" = xfalse; then
56468    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56469      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56470$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56471    fi
56472    X_CFLAGS=
56473    X_LIBS=
56474  else
56475
56476    if test "x${with_x}" = xno; then
56477      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56478    fi
56479
56480    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56481      # The user has specified a X11 base directory. Use it for includes and
56482      # libraries, unless explicitely overridden.
56483      if test "x$x_includes" = xNONE; then
56484        x_includes="${with_x}/include"
56485      fi
56486      if test "x$x_libraries" = xNONE; then
56487        x_libraries="${with_x}/lib"
56488      fi
56489    else
56490      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56491      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56492      # --x-libraries for the sysroot, if that seems to be correct.
56493      if test "x$SYSROOT" != "x"; then
56494        if test "x$x_includes" = xNONE; then
56495          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56496            x_includes="$SYSROOT/usr/X11R6/include"
56497          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56498            x_includes="$SYSROOT/usr/include"
56499          fi
56500        fi
56501        if test "x$x_libraries" = xNONE; then
56502          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56503            x_libraries="$SYSROOT/usr/X11R6/lib"
56504          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56505            x_libraries="$SYSROOT/usr/lib64"
56506          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56507            x_libraries="$SYSROOT/usr/lib"
56508          fi
56509        fi
56510      fi
56511    fi
56512
56513    # Now let autoconf do it's magic
56514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56515$as_echo_n "checking for X... " >&6; }
56516
56517
56518# Check whether --with-x was given.
56519if test "${with_x+set}" = set; then :
56520  withval=$with_x;
56521fi
56522
56523# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56524if test "x$with_x" = xno; then
56525  # The user explicitly disabled X.
56526  have_x=disabled
56527else
56528  case $x_includes,$x_libraries in #(
56529    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56530    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56531  $as_echo_n "(cached) " >&6
56532else
56533  # One or both of the vars are not set, and there is no cached value.
56534ac_x_includes=no ac_x_libraries=no
56535rm -f -r conftest.dir
56536if mkdir conftest.dir; then
56537  cd conftest.dir
56538  cat >Imakefile <<'_ACEOF'
56539incroot:
56540	@echo incroot='${INCROOT}'
56541usrlibdir:
56542	@echo usrlibdir='${USRLIBDIR}'
56543libdir:
56544	@echo libdir='${LIBDIR}'
56545_ACEOF
56546  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56547    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56548    for ac_var in incroot usrlibdir libdir; do
56549      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56550    done
56551    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56552    for ac_extension in a so sl dylib la dll; do
56553      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56554	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56555	ac_im_usrlibdir=$ac_im_libdir; break
56556      fi
56557    done
56558    # Screen out bogus values from the imake configuration.  They are
56559    # bogus both because they are the default anyway, and because
56560    # using them would break gcc on systems where it needs fixed includes.
56561    case $ac_im_incroot in
56562	/usr/include) ac_x_includes= ;;
56563	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56564    esac
56565    case $ac_im_usrlibdir in
56566	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56567	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56568    esac
56569  fi
56570  cd ..
56571  rm -f -r conftest.dir
56572fi
56573
56574# Standard set of common directories for X headers.
56575# Check X11 before X11Rn because it is often a symlink to the current release.
56576ac_x_header_dirs='
56577/usr/X11/include
56578/usr/X11R7/include
56579/usr/X11R6/include
56580/usr/X11R5/include
56581/usr/X11R4/include
56582
56583/usr/include/X11
56584/usr/include/X11R7
56585/usr/include/X11R6
56586/usr/include/X11R5
56587/usr/include/X11R4
56588
56589/usr/local/X11/include
56590/usr/local/X11R7/include
56591/usr/local/X11R6/include
56592/usr/local/X11R5/include
56593/usr/local/X11R4/include
56594
56595/usr/local/include/X11
56596/usr/local/include/X11R7
56597/usr/local/include/X11R6
56598/usr/local/include/X11R5
56599/usr/local/include/X11R4
56600
56601/usr/X386/include
56602/usr/x386/include
56603/usr/XFree86/include/X11
56604
56605/usr/include
56606/usr/local/include
56607/usr/unsupported/include
56608/usr/athena/include
56609/usr/local/x11r5/include
56610/usr/lpp/Xamples/include
56611
56612/usr/openwin/include
56613/usr/openwin/share/include'
56614
56615if test "$ac_x_includes" = no; then
56616  # Guess where to find include files, by looking for Xlib.h.
56617  # First, try using that file with no special directory specified.
56618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56619/* end confdefs.h.  */
56620#include <X11/Xlib.h>
56621_ACEOF
56622if ac_fn_cxx_try_cpp "$LINENO"; then :
56623  # We can compile using X headers with no special include directory.
56624ac_x_includes=
56625else
56626  for ac_dir in $ac_x_header_dirs; do
56627  if test -r "$ac_dir/X11/Xlib.h"; then
56628    ac_x_includes=$ac_dir
56629    break
56630  fi
56631done
56632fi
56633rm -f conftest.err conftest.i conftest.$ac_ext
56634fi # $ac_x_includes = no
56635
56636if test "$ac_x_libraries" = no; then
56637  # Check for the libraries.
56638  # See if we find them without any special options.
56639  # Don't add to $LIBS permanently.
56640  ac_save_LIBS=$LIBS
56641  LIBS="-lX11 $LIBS"
56642  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56643/* end confdefs.h.  */
56644#include <X11/Xlib.h>
56645int
56646main ()
56647{
56648XrmInitialize ()
56649  ;
56650  return 0;
56651}
56652_ACEOF
56653if ac_fn_cxx_try_link "$LINENO"; then :
56654  LIBS=$ac_save_LIBS
56655# We can link X programs with no special library path.
56656ac_x_libraries=
56657else
56658  LIBS=$ac_save_LIBS
56659for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56660do
56661  # Don't even attempt the hair of trying to link an X program!
56662  for ac_extension in a so sl dylib la dll; do
56663    if test -r "$ac_dir/libX11.$ac_extension"; then
56664      ac_x_libraries=$ac_dir
56665      break 2
56666    fi
56667  done
56668done
56669fi
56670rm -f core conftest.err conftest.$ac_objext \
56671    conftest$ac_exeext conftest.$ac_ext
56672fi # $ac_x_libraries = no
56673
56674case $ac_x_includes,$ac_x_libraries in #(
56675  no,* | *,no | *\'*)
56676    # Didn't find X, or a directory has "'" in its name.
56677    ac_cv_have_x="have_x=no";; #(
56678  *)
56679    # Record where we found X for the cache.
56680    ac_cv_have_x="have_x=yes\
56681	ac_x_includes='$ac_x_includes'\
56682	ac_x_libraries='$ac_x_libraries'"
56683esac
56684fi
56685;; #(
56686    *) have_x=yes;;
56687  esac
56688  eval "$ac_cv_have_x"
56689fi # $with_x != no
56690
56691if test "$have_x" != yes; then
56692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56693$as_echo "$have_x" >&6; }
56694  no_x=yes
56695else
56696  # If each of the values was on the command line, it overrides each guess.
56697  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56698  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56699  # Update the cache value to reflect the command line values.
56700  ac_cv_have_x="have_x=yes\
56701	ac_x_includes='$x_includes'\
56702	ac_x_libraries='$x_libraries'"
56703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56704$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56705fi
56706
56707    if test "$no_x" = yes; then
56708  # Not all programs may use this symbol, but it does not hurt to define it.
56709
56710$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56711
56712  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56713else
56714  if test -n "$x_includes"; then
56715    X_CFLAGS="$X_CFLAGS -I$x_includes"
56716  fi
56717
56718  # It would also be nice to do this for all -L options, not just this one.
56719  if test -n "$x_libraries"; then
56720    X_LIBS="$X_LIBS -L$x_libraries"
56721    # For Solaris; some versions of Sun CC require a space after -R and
56722    # others require no space.  Words are not sufficient . . . .
56723    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56724$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56725    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56726    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56727    ac_cxx_werror_flag=yes
56728    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56729/* end confdefs.h.  */
56730
56731int
56732main ()
56733{
56734
56735  ;
56736  return 0;
56737}
56738_ACEOF
56739if ac_fn_cxx_try_link "$LINENO"; then :
56740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56741$as_echo "no" >&6; }
56742       X_LIBS="$X_LIBS -R$x_libraries"
56743else
56744  LIBS="$ac_xsave_LIBS -R $x_libraries"
56745       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56746/* end confdefs.h.  */
56747
56748int
56749main ()
56750{
56751
56752  ;
56753  return 0;
56754}
56755_ACEOF
56756if ac_fn_cxx_try_link "$LINENO"; then :
56757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56758$as_echo "yes" >&6; }
56759	  X_LIBS="$X_LIBS -R $x_libraries"
56760else
56761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56762$as_echo "neither works" >&6; }
56763fi
56764rm -f core conftest.err conftest.$ac_objext \
56765    conftest$ac_exeext conftest.$ac_ext
56766fi
56767rm -f core conftest.err conftest.$ac_objext \
56768    conftest$ac_exeext conftest.$ac_ext
56769    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56770    LIBS=$ac_xsave_LIBS
56771  fi
56772
56773  # Check for system-dependent libraries X programs must link with.
56774  # Do this before checking for the system-independent R6 libraries
56775  # (-lICE), since we may need -lsocket or whatever for X linking.
56776
56777  if test "$ISC" = yes; then
56778    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56779  else
56780    # Martyn Johnson says this is needed for Ultrix, if the X
56781    # libraries were built with DECnet support.  And Karl Berry says
56782    # the Alpha needs dnet_stub (dnet does not exist).
56783    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56784    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56785/* end confdefs.h.  */
56786
56787/* Override any GCC internal prototype to avoid an error.
56788   Use char because int might match the return type of a GCC
56789   builtin and then its argument prototype would still apply.  */
56790#ifdef __cplusplus
56791extern "C"
56792#endif
56793char XOpenDisplay ();
56794int
56795main ()
56796{
56797return XOpenDisplay ();
56798  ;
56799  return 0;
56800}
56801_ACEOF
56802if ac_fn_cxx_try_link "$LINENO"; then :
56803
56804else
56805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56806$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56807if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56808  $as_echo_n "(cached) " >&6
56809else
56810  ac_check_lib_save_LIBS=$LIBS
56811LIBS="-ldnet  $LIBS"
56812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56813/* end confdefs.h.  */
56814
56815/* Override any GCC internal prototype to avoid an error.
56816   Use char because int might match the return type of a GCC
56817   builtin and then its argument prototype would still apply.  */
56818#ifdef __cplusplus
56819extern "C"
56820#endif
56821char dnet_ntoa ();
56822int
56823main ()
56824{
56825return dnet_ntoa ();
56826  ;
56827  return 0;
56828}
56829_ACEOF
56830if ac_fn_cxx_try_link "$LINENO"; then :
56831  ac_cv_lib_dnet_dnet_ntoa=yes
56832else
56833  ac_cv_lib_dnet_dnet_ntoa=no
56834fi
56835rm -f core conftest.err conftest.$ac_objext \
56836    conftest$ac_exeext conftest.$ac_ext
56837LIBS=$ac_check_lib_save_LIBS
56838fi
56839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56840$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56841if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56842  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56843fi
56844
56845    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56846      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56847$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56848if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56849  $as_echo_n "(cached) " >&6
56850else
56851  ac_check_lib_save_LIBS=$LIBS
56852LIBS="-ldnet_stub  $LIBS"
56853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56854/* end confdefs.h.  */
56855
56856/* Override any GCC internal prototype to avoid an error.
56857   Use char because int might match the return type of a GCC
56858   builtin and then its argument prototype would still apply.  */
56859#ifdef __cplusplus
56860extern "C"
56861#endif
56862char dnet_ntoa ();
56863int
56864main ()
56865{
56866return dnet_ntoa ();
56867  ;
56868  return 0;
56869}
56870_ACEOF
56871if ac_fn_cxx_try_link "$LINENO"; then :
56872  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56873else
56874  ac_cv_lib_dnet_stub_dnet_ntoa=no
56875fi
56876rm -f core conftest.err conftest.$ac_objext \
56877    conftest$ac_exeext conftest.$ac_ext
56878LIBS=$ac_check_lib_save_LIBS
56879fi
56880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56881$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56882if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56883  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56884fi
56885
56886    fi
56887fi
56888rm -f core conftest.err conftest.$ac_objext \
56889    conftest$ac_exeext conftest.$ac_ext
56890    LIBS="$ac_xsave_LIBS"
56891
56892    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56893    # to get the SysV transport functions.
56894    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56895    # needs -lnsl.
56896    # The nsl library prevents programs from opening the X display
56897    # on Irix 5.2, according to T.E. Dickey.
56898    # The functions gethostbyname, getservbyname, and inet_addr are
56899    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56900    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56901if test "x$ac_cv_func_gethostbyname" = xyes; then :
56902
56903fi
56904
56905    if test $ac_cv_func_gethostbyname = no; then
56906      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56907$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56908if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56909  $as_echo_n "(cached) " >&6
56910else
56911  ac_check_lib_save_LIBS=$LIBS
56912LIBS="-lnsl  $LIBS"
56913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56914/* end confdefs.h.  */
56915
56916/* Override any GCC internal prototype to avoid an error.
56917   Use char because int might match the return type of a GCC
56918   builtin and then its argument prototype would still apply.  */
56919#ifdef __cplusplus
56920extern "C"
56921#endif
56922char gethostbyname ();
56923int
56924main ()
56925{
56926return gethostbyname ();
56927  ;
56928  return 0;
56929}
56930_ACEOF
56931if ac_fn_cxx_try_link "$LINENO"; then :
56932  ac_cv_lib_nsl_gethostbyname=yes
56933else
56934  ac_cv_lib_nsl_gethostbyname=no
56935fi
56936rm -f core conftest.err conftest.$ac_objext \
56937    conftest$ac_exeext conftest.$ac_ext
56938LIBS=$ac_check_lib_save_LIBS
56939fi
56940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56941$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56942if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56943  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56944fi
56945
56946      if test $ac_cv_lib_nsl_gethostbyname = no; then
56947	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56948$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56949if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56950  $as_echo_n "(cached) " >&6
56951else
56952  ac_check_lib_save_LIBS=$LIBS
56953LIBS="-lbsd  $LIBS"
56954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56955/* end confdefs.h.  */
56956
56957/* Override any GCC internal prototype to avoid an error.
56958   Use char because int might match the return type of a GCC
56959   builtin and then its argument prototype would still apply.  */
56960#ifdef __cplusplus
56961extern "C"
56962#endif
56963char gethostbyname ();
56964int
56965main ()
56966{
56967return gethostbyname ();
56968  ;
56969  return 0;
56970}
56971_ACEOF
56972if ac_fn_cxx_try_link "$LINENO"; then :
56973  ac_cv_lib_bsd_gethostbyname=yes
56974else
56975  ac_cv_lib_bsd_gethostbyname=no
56976fi
56977rm -f core conftest.err conftest.$ac_objext \
56978    conftest$ac_exeext conftest.$ac_ext
56979LIBS=$ac_check_lib_save_LIBS
56980fi
56981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56982$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56983if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56984  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56985fi
56986
56987      fi
56988    fi
56989
56990    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56991    # socket/setsockopt and other routines are undefined under SCO ODT
56992    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56993    # on later versions), says Simon Leinen: it contains gethostby*
56994    # variants that don't use the name server (or something).  -lsocket
56995    # must be given before -lnsl if both are needed.  We assume that
56996    # if connect needs -lnsl, so does gethostbyname.
56997    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56998if test "x$ac_cv_func_connect" = xyes; then :
56999
57000fi
57001
57002    if test $ac_cv_func_connect = no; then
57003      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57004$as_echo_n "checking for connect in -lsocket... " >&6; }
57005if ${ac_cv_lib_socket_connect+:} false; then :
57006  $as_echo_n "(cached) " >&6
57007else
57008  ac_check_lib_save_LIBS=$LIBS
57009LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57011/* end confdefs.h.  */
57012
57013/* Override any GCC internal prototype to avoid an error.
57014   Use char because int might match the return type of a GCC
57015   builtin and then its argument prototype would still apply.  */
57016#ifdef __cplusplus
57017extern "C"
57018#endif
57019char connect ();
57020int
57021main ()
57022{
57023return connect ();
57024  ;
57025  return 0;
57026}
57027_ACEOF
57028if ac_fn_cxx_try_link "$LINENO"; then :
57029  ac_cv_lib_socket_connect=yes
57030else
57031  ac_cv_lib_socket_connect=no
57032fi
57033rm -f core conftest.err conftest.$ac_objext \
57034    conftest$ac_exeext conftest.$ac_ext
57035LIBS=$ac_check_lib_save_LIBS
57036fi
57037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57038$as_echo "$ac_cv_lib_socket_connect" >&6; }
57039if test "x$ac_cv_lib_socket_connect" = xyes; then :
57040  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57041fi
57042
57043    fi
57044
57045    # Guillermo Gomez says -lposix is necessary on A/UX.
57046    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57047if test "x$ac_cv_func_remove" = xyes; then :
57048
57049fi
57050
57051    if test $ac_cv_func_remove = no; then
57052      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57053$as_echo_n "checking for remove in -lposix... " >&6; }
57054if ${ac_cv_lib_posix_remove+:} false; then :
57055  $as_echo_n "(cached) " >&6
57056else
57057  ac_check_lib_save_LIBS=$LIBS
57058LIBS="-lposix  $LIBS"
57059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57060/* end confdefs.h.  */
57061
57062/* Override any GCC internal prototype to avoid an error.
57063   Use char because int might match the return type of a GCC
57064   builtin and then its argument prototype would still apply.  */
57065#ifdef __cplusplus
57066extern "C"
57067#endif
57068char remove ();
57069int
57070main ()
57071{
57072return remove ();
57073  ;
57074  return 0;
57075}
57076_ACEOF
57077if ac_fn_cxx_try_link "$LINENO"; then :
57078  ac_cv_lib_posix_remove=yes
57079else
57080  ac_cv_lib_posix_remove=no
57081fi
57082rm -f core conftest.err conftest.$ac_objext \
57083    conftest$ac_exeext conftest.$ac_ext
57084LIBS=$ac_check_lib_save_LIBS
57085fi
57086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57087$as_echo "$ac_cv_lib_posix_remove" >&6; }
57088if test "x$ac_cv_lib_posix_remove" = xyes; then :
57089  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57090fi
57091
57092    fi
57093
57094    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57095    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57096if test "x$ac_cv_func_shmat" = xyes; then :
57097
57098fi
57099
57100    if test $ac_cv_func_shmat = no; then
57101      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57102$as_echo_n "checking for shmat in -lipc... " >&6; }
57103if ${ac_cv_lib_ipc_shmat+:} false; then :
57104  $as_echo_n "(cached) " >&6
57105else
57106  ac_check_lib_save_LIBS=$LIBS
57107LIBS="-lipc  $LIBS"
57108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57109/* end confdefs.h.  */
57110
57111/* Override any GCC internal prototype to avoid an error.
57112   Use char because int might match the return type of a GCC
57113   builtin and then its argument prototype would still apply.  */
57114#ifdef __cplusplus
57115extern "C"
57116#endif
57117char shmat ();
57118int
57119main ()
57120{
57121return shmat ();
57122  ;
57123  return 0;
57124}
57125_ACEOF
57126if ac_fn_cxx_try_link "$LINENO"; then :
57127  ac_cv_lib_ipc_shmat=yes
57128else
57129  ac_cv_lib_ipc_shmat=no
57130fi
57131rm -f core conftest.err conftest.$ac_objext \
57132    conftest$ac_exeext conftest.$ac_ext
57133LIBS=$ac_check_lib_save_LIBS
57134fi
57135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57136$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57137if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57138  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57139fi
57140
57141    fi
57142  fi
57143
57144  # Check for libraries that X11R6 Xt/Xaw programs need.
57145  ac_save_LDFLAGS=$LDFLAGS
57146  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57147  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57148  # check for ICE first), but we must link in the order -lSM -lICE or
57149  # we get undefined symbols.  So assume we have SM if we have ICE.
57150  # These have to be linked with before -lX11, unlike the other
57151  # libraries we check for below, so use a different variable.
57152  # John Interrante, Karl Berry
57153  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57154$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57155if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57156  $as_echo_n "(cached) " >&6
57157else
57158  ac_check_lib_save_LIBS=$LIBS
57159LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57161/* end confdefs.h.  */
57162
57163/* Override any GCC internal prototype to avoid an error.
57164   Use char because int might match the return type of a GCC
57165   builtin and then its argument prototype would still apply.  */
57166#ifdef __cplusplus
57167extern "C"
57168#endif
57169char IceConnectionNumber ();
57170int
57171main ()
57172{
57173return IceConnectionNumber ();
57174  ;
57175  return 0;
57176}
57177_ACEOF
57178if ac_fn_cxx_try_link "$LINENO"; then :
57179  ac_cv_lib_ICE_IceConnectionNumber=yes
57180else
57181  ac_cv_lib_ICE_IceConnectionNumber=no
57182fi
57183rm -f core conftest.err conftest.$ac_objext \
57184    conftest$ac_exeext conftest.$ac_ext
57185LIBS=$ac_check_lib_save_LIBS
57186fi
57187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57188$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57189if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57190  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57191fi
57192
57193  LDFLAGS=$ac_save_LDFLAGS
57194
57195fi
57196
57197
57198    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57199    # this doesn't make sense so we remove it.
57200    if test "x$COMPILE_TYPE" = xcross; then
57201      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57202    fi
57203
57204    if test "x$no_x" = xyes; then
57205
57206  # Print a helpful message on how to acquire the necessary build dependency.
57207  # x11 is the help tag: freetype, cups, alsa etc
57208  MISSING_DEPENDENCY=x11
57209
57210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57211    cygwin_help $MISSING_DEPENDENCY
57212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57213    msys_help $MISSING_DEPENDENCY
57214  else
57215    PKGHANDLER_COMMAND=
57216
57217    case $PKGHANDLER in
57218      apt-get)
57219        apt_help     $MISSING_DEPENDENCY ;;
57220      yum)
57221        yum_help     $MISSING_DEPENDENCY ;;
57222      port)
57223        port_help    $MISSING_DEPENDENCY ;;
57224      pkgutil)
57225        pkgutil_help $MISSING_DEPENDENCY ;;
57226      pkgadd)
57227        pkgadd_help  $MISSING_DEPENDENCY ;;
57228    esac
57229
57230    if test "x$PKGHANDLER_COMMAND" != x; then
57231      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57232    fi
57233  fi
57234
57235      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57236    fi
57237
57238    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57239      OPENWIN_HOME="/usr/openwin"
57240      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57241      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
57242          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57243          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
57244          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57245    fi
57246
57247    ac_ext=c
57248ac_cpp='$CPP $CPPFLAGS'
57249ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57250ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57251ac_compiler_gnu=$ac_cv_c_compiler_gnu
57252
57253    OLD_CFLAGS="$CFLAGS"
57254    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57255
57256    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57257    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57258do :
57259  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57260ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57261          # include <X11/Xlib.h>
57262          # include <X11/Xutil.h>
57263
57264
57265"
57266if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57267  cat >>confdefs.h <<_ACEOF
57268#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57269_ACEOF
57270 X11_HEADERS_OK=yes
57271else
57272  X11_HEADERS_OK=no; break
57273fi
57274
57275done
57276
57277
57278    if test "x$X11_HEADERS_OK" = xno; then
57279
57280  # Print a helpful message on how to acquire the necessary build dependency.
57281  # x11 is the help tag: freetype, cups, alsa etc
57282  MISSING_DEPENDENCY=x11
57283
57284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57285    cygwin_help $MISSING_DEPENDENCY
57286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57287    msys_help $MISSING_DEPENDENCY
57288  else
57289    PKGHANDLER_COMMAND=
57290
57291    case $PKGHANDLER in
57292      apt-get)
57293        apt_help     $MISSING_DEPENDENCY ;;
57294      yum)
57295        yum_help     $MISSING_DEPENDENCY ;;
57296      port)
57297        port_help    $MISSING_DEPENDENCY ;;
57298      pkgutil)
57299        pkgutil_help $MISSING_DEPENDENCY ;;
57300      pkgadd)
57301        pkgadd_help  $MISSING_DEPENDENCY ;;
57302    esac
57303
57304    if test "x$PKGHANDLER_COMMAND" != x; then
57305      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57306    fi
57307  fi
57308
57309      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57310    fi
57311
57312    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57313    # defined in libawt_xawt.
57314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57315$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57316    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57317/* end confdefs.h.  */
57318#include <X11/extensions/Xrender.h>
57319int
57320main ()
57321{
57322XLinearGradient x;
57323  ;
57324  return 0;
57325}
57326_ACEOF
57327if ac_fn_c_try_compile "$LINENO"; then :
57328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57329$as_echo "yes" >&6; }
57330else
57331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57332$as_echo "no" >&6; }
57333         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57334fi
57335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57336
57337    CFLAGS="$OLD_CFLAGS"
57338    ac_ext=cpp
57339ac_cpp='$CXXCPP $CPPFLAGS'
57340ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57341ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57342ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57343
57344  fi # NEEDS_LIB_X11
57345
57346
57347
57348
57349
57350
57351# Check whether --with-cups was given.
57352if test "${with_cups+set}" = set; then :
57353  withval=$with_cups;
57354fi
57355
57356
57357# Check whether --with-cups-include was given.
57358if test "${with_cups_include+set}" = set; then :
57359  withval=$with_cups_include;
57360fi
57361
57362
57363  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57364    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57365        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57366      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57367$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57368    fi
57369    CUPS_CFLAGS=
57370  else
57371    CUPS_FOUND=no
57372
57373    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57374      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57375    fi
57376
57377    if test "x${with_cups}" != x; then
57378      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57379$as_echo_n "checking for cups headers... " >&6; }
57380      if test -s "${with_cups}/include/cups/cups.h"; then
57381        CUPS_CFLAGS="-I${with_cups}/include"
57382        CUPS_FOUND=yes
57383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57384$as_echo "$CUPS_FOUND" >&6; }
57385      else
57386        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57387      fi
57388    fi
57389    if test "x${with_cups_include}" != x; then
57390      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57391$as_echo_n "checking for cups headers... " >&6; }
57392      if test -s "${with_cups_include}/cups/cups.h"; then
57393        CUPS_CFLAGS="-I${with_cups_include}"
57394        CUPS_FOUND=yes
57395        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57396$as_echo "$CUPS_FOUND" >&6; }
57397      else
57398        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57399      fi
57400    fi
57401    if test "x$CUPS_FOUND" = xno; then
57402      # Are the cups headers installed in the default /usr/include location?
57403      for ac_header in cups/cups.h cups/ppd.h
57404do :
57405  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57406ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57407if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57408  cat >>confdefs.h <<_ACEOF
57409#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57410_ACEOF
57411
57412          CUPS_FOUND=yes
57413          CUPS_CFLAGS=
57414          DEFAULT_CUPS=yes
57415
57416fi
57417
57418done
57419
57420    fi
57421    if test "x$CUPS_FOUND" = xno; then
57422      # Getting nervous now? Lets poke around for standard Solaris third-party
57423      # package installation locations.
57424      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57425$as_echo_n "checking for cups headers... " >&6; }
57426      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
57427        # An SFW package seems to be installed!
57428        CUPS_FOUND=yes
57429        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
57430      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
57431        # A CSW package seems to be installed!
57432        CUPS_FOUND=yes
57433        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
57434      fi
57435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57436$as_echo "$CUPS_FOUND" >&6; }
57437    fi
57438    if test "x$CUPS_FOUND" = xno; then
57439
57440  # Print a helpful message on how to acquire the necessary build dependency.
57441  # cups is the help tag: freetype, cups, alsa etc
57442  MISSING_DEPENDENCY=cups
57443
57444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57445    cygwin_help $MISSING_DEPENDENCY
57446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57447    msys_help $MISSING_DEPENDENCY
57448  else
57449    PKGHANDLER_COMMAND=
57450
57451    case $PKGHANDLER in
57452      apt-get)
57453        apt_help     $MISSING_DEPENDENCY ;;
57454      yum)
57455        yum_help     $MISSING_DEPENDENCY ;;
57456      port)
57457        port_help    $MISSING_DEPENDENCY ;;
57458      pkgutil)
57459        pkgutil_help $MISSING_DEPENDENCY ;;
57460      pkgadd)
57461        pkgadd_help  $MISSING_DEPENDENCY ;;
57462    esac
57463
57464    if test "x$PKGHANDLER_COMMAND" != x; then
57465      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57466    fi
57467  fi
57468
57469      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57470    fi
57471  fi
57472
57473
57474
57475
57476
57477# Check whether --with-freetype was given.
57478if test "${with_freetype+set}" = set; then :
57479  withval=$with_freetype;
57480fi
57481
57482
57483# Check whether --with-freetype-include was given.
57484if test "${with_freetype_include+set}" = set; then :
57485  withval=$with_freetype_include;
57486fi
57487
57488
57489# Check whether --with-freetype-lib was given.
57490if test "${with_freetype_lib+set}" = set; then :
57491  withval=$with_freetype_lib;
57492fi
57493
57494
57495# Check whether --with-freetype-src was given.
57496if test "${with_freetype_src+set}" = set; then :
57497  withval=$with_freetype_src;
57498fi
57499
57500  # Check whether --enable-freetype-bundling was given.
57501if test "${enable_freetype_bundling+set}" = set; then :
57502  enableval=$enable_freetype_bundling;
57503fi
57504
57505
57506  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57507  FREETYPE_BASE_NAME=freetype
57508  FREETYPE_CFLAGS=
57509  FREETYPE_LIBS=
57510  FREETYPE_BUNDLE_LIB_PATH=
57511
57512  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57513    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57514        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57515        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57516        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57517      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57518$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57519    fi
57520    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57521      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57522$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57523    fi
57524  else
57525    # freetype is needed to build; go get it!
57526
57527    BUNDLE_FREETYPE="$enable_freetype_bundling"
57528
57529    if  test "x$with_freetype_src" != x; then
57530      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57531        # Try to build freetype if --with-freetype-src was given on Windows
57532
57533  FREETYPE_SRC_PATH="$with_freetype_src"
57534  BUILD_FREETYPE=yes
57535
57536  # Check if the freetype sources are acessible..
57537  if ! test -d $FREETYPE_SRC_PATH; then
57538    { $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
57539$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57540    BUILD_FREETYPE=no
57541  fi
57542  # ..and contain a vc2010 project file
57543  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57544  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57545    { $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
57546$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57547    BUILD_FREETYPE=no
57548  fi
57549  # Now check if configure found a version of 'msbuild.exe'
57550  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57551    { $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
57552$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;}
57553    BUILD_FREETYPE=no
57554  fi
57555
57556  # Ready to go..
57557  if test "x$BUILD_FREETYPE" = xyes; then
57558    # msbuild requires trailing slashes for output directories
57559    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57560    freetype_lib_path_unix="$freetype_lib_path"
57561    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57562
57563  unix_path="$vcxproj_path"
57564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57565    windows_path=`$CYGPATH -m "$unix_path"`
57566    vcxproj_path="$windows_path"
57567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57568    windows_path=`cmd //c echo $unix_path`
57569    vcxproj_path="$windows_path"
57570  fi
57571
57572
57573  unix_path="$freetype_lib_path"
57574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57575    windows_path=`$CYGPATH -m "$unix_path"`
57576    freetype_lib_path="$windows_path"
57577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57578    windows_path=`cmd //c echo $unix_path`
57579    freetype_lib_path="$windows_path"
57580  fi
57581
57582
57583  unix_path="$freetype_obj_path"
57584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57585    windows_path=`$CYGPATH -m "$unix_path"`
57586    freetype_obj_path="$windows_path"
57587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57588    windows_path=`cmd //c echo $unix_path`
57589    freetype_obj_path="$windows_path"
57590  fi
57591
57592    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57593      freetype_platform=x64
57594    else
57595      freetype_platform=win32
57596    fi
57597
57598    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57599    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57600    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57601    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57602    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57603$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57604
57605    # First we try to build the freetype.dll
57606    $ECHO -e "@echo off\n"\
57607        "$MSBUILD $vcxproj_path "\
57608        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57609        "/p:Configuration=\"Release Multithreaded\" "\
57610        "/p:Platform=$freetype_platform "\
57611        "/p:ConfigurationType=DynamicLibrary "\
57612        "/p:TargetName=freetype "\
57613        "/p:OutDir=\"$freetype_lib_path\" "\
57614        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57615    cmd /c freetype.bat
57616
57617    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57618      # If that succeeds we also build freetype.lib
57619      $ECHO -e "@echo off\n"\
57620          "$MSBUILD $vcxproj_path "\
57621          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57622          "/p:Configuration=\"Release Multithreaded\" "\
57623          "/p:Platform=$freetype_platform "\
57624          "/p:ConfigurationType=StaticLibrary "\
57625          "/p:TargetName=freetype "\
57626          "/p:OutDir=\"$freetype_lib_path\" "\
57627          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57628      cmd /c freetype.bat
57629
57630      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57631        # Once we build both, lib and dll, set freetype lib and include path appropriately
57632        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57633        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57634        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57635$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57636      else
57637        BUILD_FREETYPE=no
57638      fi
57639    else
57640      BUILD_FREETYPE=no
57641    fi
57642  fi
57643
57644        if test "x$BUILD_FREETYPE" = xyes; then
57645          # Okay, we built it. Check that it works.
57646
57647  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57648  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57649  METHOD="--with-freetype-src"
57650
57651  # Let's start with an optimistic view of the world :-)
57652  FOUND_FREETYPE=yes
57653
57654  # First look for the canonical freetype main include file ft2build.h.
57655  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57656    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57657    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57658    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57659      # Fail.
57660      FOUND_FREETYPE=no
57661    fi
57662  fi
57663
57664  if test "x$FOUND_FREETYPE" = xyes; then
57665    # Include file found, let's continue the sanity check.
57666    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57667$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57668
57669    # Reset to default value
57670    FREETYPE_BASE_NAME=freetype
57671    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57672    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57673      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57674          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57675        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57676        # for the .6 version explicitly.
57677        FREETYPE_BASE_NAME=freetype.6
57678        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57679        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57680$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57681      else
57682        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57683$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57684        FOUND_FREETYPE=no
57685      fi
57686    else
57687      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57688        # On Windows, we will need both .lib and .dll file.
57689        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57690          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57691$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57692          FOUND_FREETYPE=no
57693        fi
57694      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57695          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57696        # Found lib in isa dir, use that instead.
57697        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57698        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57699$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57700      fi
57701    fi
57702  fi
57703
57704  if test "x$FOUND_FREETYPE" = xyes; then
57705
57706  # Only process if variable expands to non-empty
57707
57708  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57709    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57710
57711  # Input might be given as Windows format, start by converting to
57712  # unix format.
57713  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57714  new_path=`$CYGPATH -u "$path"`
57715
57716  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57717  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57718  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57719  # "foo.exe" is OK but "foo" is an error.
57720  #
57721  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57722  # It is also a way to make sure we got the proper file name for the real test later on.
57723  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57724  if test "x$test_shortpath" = x; then
57725    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57726$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57727    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57728  fi
57729
57730  # Call helper function which possibly converts this using DOS-style short mode.
57731  # If so, the updated path is stored in $new_path.
57732
57733  input_path="$new_path"
57734  # Check if we need to convert this using DOS-style short mode. If the path
57735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57736  # take no chances and rewrite it.
57737  # Note: m4 eats our [], so we need to use [ and ] instead.
57738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57739  if test "x$has_forbidden_chars" != x; then
57740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57744      # Going to short mode and back again did indeed matter. Since short mode is
57745      # case insensitive, let's make it lowercase to improve readability.
57746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57747      # Now convert it back to Unix-style (cygpath)
57748      input_path=`$CYGPATH -u "$shortmode_path"`
57749      new_path="$input_path"
57750    fi
57751  fi
57752
57753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57754  if test "x$test_cygdrive_prefix" = x; then
57755    # As a simple fix, exclude /usr/bin since it's not a real path.
57756    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57758      # a path prefixed by /cygdrive for fixpath to work.
57759      new_path="$CYGWIN_ROOT_PATH$input_path"
57760    fi
57761  fi
57762
57763
57764  if test "x$path" != "x$new_path"; then
57765    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57767$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57768  fi
57769
57770    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57771
57772  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57773  has_colon=`$ECHO $path | $GREP ^.:`
57774  new_path="$path"
57775  if test "x$has_colon" = x; then
57776    # Not in mixed or Windows style, start by that.
57777    new_path=`cmd //c echo $path`
57778  fi
57779
57780
57781  input_path="$new_path"
57782  # Check if we need to convert this using DOS-style short mode. If the path
57783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57784  # take no chances and rewrite it.
57785  # Note: m4 eats our [], so we need to use [ and ] instead.
57786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57787  if test "x$has_forbidden_chars" != x; then
57788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57790  fi
57791
57792
57793  windows_path="$new_path"
57794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57795    unix_path=`$CYGPATH -u "$windows_path"`
57796    new_path="$unix_path"
57797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57799    new_path="$unix_path"
57800  fi
57801
57802  if test "x$path" != "x$new_path"; then
57803    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57805$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57806  fi
57807
57808  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57809  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57810
57811    else
57812      # We're on a unix platform. Hooray! :)
57813      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57814      has_space=`$ECHO "$path" | $GREP " "`
57815      if test "x$has_space" != x; then
57816        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57817$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57818        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57819      fi
57820
57821      # Use eval to expand a potential ~
57822      eval path="$path"
57823      if test ! -f "$path" && test ! -d "$path"; then
57824        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57825      fi
57826
57827      if test -d "$path"; then
57828        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57829      else
57830        dir="`$DIRNAME "$path"`"
57831        base="`$BASENAME "$path"`"
57832        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57833      fi
57834    fi
57835  fi
57836
57837
57838  # Only process if variable expands to non-empty
57839
57840  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57842
57843  # Input might be given as Windows format, start by converting to
57844  # unix format.
57845  path="$POTENTIAL_FREETYPE_LIB_PATH"
57846  new_path=`$CYGPATH -u "$path"`
57847
57848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57851  # "foo.exe" is OK but "foo" is an error.
57852  #
57853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57854  # It is also a way to make sure we got the proper file name for the real test later on.
57855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57856  if test "x$test_shortpath" = x; then
57857    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57858$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57859    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57860  fi
57861
57862  # Call helper function which possibly converts this using DOS-style short mode.
57863  # If so, the updated path is stored in $new_path.
57864
57865  input_path="$new_path"
57866  # Check if we need to convert this using DOS-style short mode. If the path
57867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57868  # take no chances and rewrite it.
57869  # Note: m4 eats our [], so we need to use [ and ] instead.
57870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57871  if test "x$has_forbidden_chars" != x; then
57872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57876      # Going to short mode and back again did indeed matter. Since short mode is
57877      # case insensitive, let's make it lowercase to improve readability.
57878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57879      # Now convert it back to Unix-style (cygpath)
57880      input_path=`$CYGPATH -u "$shortmode_path"`
57881      new_path="$input_path"
57882    fi
57883  fi
57884
57885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57886  if test "x$test_cygdrive_prefix" = x; then
57887    # As a simple fix, exclude /usr/bin since it's not a real path.
57888    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57890      # a path prefixed by /cygdrive for fixpath to work.
57891      new_path="$CYGWIN_ROOT_PATH$input_path"
57892    fi
57893  fi
57894
57895
57896  if test "x$path" != "x$new_path"; then
57897    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57899$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57900  fi
57901
57902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57903
57904  path="$POTENTIAL_FREETYPE_LIB_PATH"
57905  has_colon=`$ECHO $path | $GREP ^.:`
57906  new_path="$path"
57907  if test "x$has_colon" = x; then
57908    # Not in mixed or Windows style, start by that.
57909    new_path=`cmd //c echo $path`
57910  fi
57911
57912
57913  input_path="$new_path"
57914  # Check if we need to convert this using DOS-style short mode. If the path
57915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57916  # take no chances and rewrite it.
57917  # Note: m4 eats our [], so we need to use [ and ] instead.
57918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57919  if test "x$has_forbidden_chars" != x; then
57920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57922  fi
57923
57924
57925  windows_path="$new_path"
57926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57927    unix_path=`$CYGPATH -u "$windows_path"`
57928    new_path="$unix_path"
57929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57931    new_path="$unix_path"
57932  fi
57933
57934  if test "x$path" != "x$new_path"; then
57935    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57937$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57938  fi
57939
57940  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57941  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57942
57943    else
57944      # We're on a unix platform. Hooray! :)
57945      path="$POTENTIAL_FREETYPE_LIB_PATH"
57946      has_space=`$ECHO "$path" | $GREP " "`
57947      if test "x$has_space" != x; then
57948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57949$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57950        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57951      fi
57952
57953      # Use eval to expand a potential ~
57954      eval path="$path"
57955      if test ! -f "$path" && test ! -d "$path"; then
57956        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57957      fi
57958
57959      if test -d "$path"; then
57960        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57961      else
57962        dir="`$DIRNAME "$path"`"
57963        base="`$BASENAME "$path"`"
57964        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57965      fi
57966    fi
57967  fi
57968
57969
57970    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57972$as_echo_n "checking for freetype includes... " >&6; }
57973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57974$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57975    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57977$as_echo_n "checking for freetype libraries... " >&6; }
57978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57979$as_echo "$FREETYPE_LIB_PATH" >&6; }
57980  fi
57981
57982          if test "x$FOUND_FREETYPE" != xyes; then
57983            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57984          fi
57985        else
57986          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57987$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57988          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57989        fi
57990      else
57991        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57992$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57993      fi
57994    fi
57995
57996    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57997      # User has specified settings
57998
57999      if test "x$BUNDLE_FREETYPE" = x; then
58000        # If not specified, default is to bundle freetype
58001        BUNDLE_FREETYPE=yes
58002      fi
58003
58004      if test "x$with_freetype" != x; then
58005        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58006        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58007      fi
58008
58009      # Allow --with-freetype-lib and --with-freetype-include to override
58010      if test "x$with_freetype_include" != x; then
58011        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58012      fi
58013      if test "x$with_freetype_lib" != x; then
58014        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58015      fi
58016
58017      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58018        # Okay, we got it. Check that it works.
58019
58020  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58021  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58022  METHOD="--with-freetype"
58023
58024  # Let's start with an optimistic view of the world :-)
58025  FOUND_FREETYPE=yes
58026
58027  # First look for the canonical freetype main include file ft2build.h.
58028  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58029    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58030    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58031    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58032      # Fail.
58033      FOUND_FREETYPE=no
58034    fi
58035  fi
58036
58037  if test "x$FOUND_FREETYPE" = xyes; then
58038    # Include file found, let's continue the sanity check.
58039    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58040$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58041
58042    # Reset to default value
58043    FREETYPE_BASE_NAME=freetype
58044    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58045    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58046      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58047          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58048        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58049        # for the .6 version explicitly.
58050        FREETYPE_BASE_NAME=freetype.6
58051        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58052        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58053$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58054      else
58055        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58056$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58057        FOUND_FREETYPE=no
58058      fi
58059    else
58060      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58061        # On Windows, we will need both .lib and .dll file.
58062        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58063          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58064$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58065          FOUND_FREETYPE=no
58066        fi
58067      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58068          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58069        # Found lib in isa dir, use that instead.
58070        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58071        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58072$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58073      fi
58074    fi
58075  fi
58076
58077  if test "x$FOUND_FREETYPE" = xyes; then
58078
58079  # Only process if variable expands to non-empty
58080
58081  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58082    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58083
58084  # Input might be given as Windows format, start by converting to
58085  # unix format.
58086  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58087  new_path=`$CYGPATH -u "$path"`
58088
58089  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58090  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58091  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58092  # "foo.exe" is OK but "foo" is an error.
58093  #
58094  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58095  # It is also a way to make sure we got the proper file name for the real test later on.
58096  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58097  if test "x$test_shortpath" = x; then
58098    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58099$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58100    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58101  fi
58102
58103  # Call helper function which possibly converts this using DOS-style short mode.
58104  # If so, the updated path is stored in $new_path.
58105
58106  input_path="$new_path"
58107  # Check if we need to convert this using DOS-style short mode. If the path
58108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58109  # take no chances and rewrite it.
58110  # Note: m4 eats our [], so we need to use [ and ] instead.
58111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58112  if test "x$has_forbidden_chars" != x; then
58113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58117      # Going to short mode and back again did indeed matter. Since short mode is
58118      # case insensitive, let's make it lowercase to improve readability.
58119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58120      # Now convert it back to Unix-style (cygpath)
58121      input_path=`$CYGPATH -u "$shortmode_path"`
58122      new_path="$input_path"
58123    fi
58124  fi
58125
58126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58127  if test "x$test_cygdrive_prefix" = x; then
58128    # As a simple fix, exclude /usr/bin since it's not a real path.
58129    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58131      # a path prefixed by /cygdrive for fixpath to work.
58132      new_path="$CYGWIN_ROOT_PATH$input_path"
58133    fi
58134  fi
58135
58136
58137  if test "x$path" != "x$new_path"; then
58138    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58140$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58141  fi
58142
58143    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58144
58145  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58146  has_colon=`$ECHO $path | $GREP ^.:`
58147  new_path="$path"
58148  if test "x$has_colon" = x; then
58149    # Not in mixed or Windows style, start by that.
58150    new_path=`cmd //c echo $path`
58151  fi
58152
58153
58154  input_path="$new_path"
58155  # Check if we need to convert this using DOS-style short mode. If the path
58156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58157  # take no chances and rewrite it.
58158  # Note: m4 eats our [], so we need to use [ and ] instead.
58159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58160  if test "x$has_forbidden_chars" != x; then
58161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58163  fi
58164
58165
58166  windows_path="$new_path"
58167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58168    unix_path=`$CYGPATH -u "$windows_path"`
58169    new_path="$unix_path"
58170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58172    new_path="$unix_path"
58173  fi
58174
58175  if test "x$path" != "x$new_path"; then
58176    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58178$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58179  fi
58180
58181  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58182  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58183
58184    else
58185      # We're on a unix platform. Hooray! :)
58186      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58187      has_space=`$ECHO "$path" | $GREP " "`
58188      if test "x$has_space" != x; then
58189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58190$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58191        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58192      fi
58193
58194      # Use eval to expand a potential ~
58195      eval path="$path"
58196      if test ! -f "$path" && test ! -d "$path"; then
58197        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58198      fi
58199
58200      if test -d "$path"; then
58201        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58202      else
58203        dir="`$DIRNAME "$path"`"
58204        base="`$BASENAME "$path"`"
58205        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58206      fi
58207    fi
58208  fi
58209
58210
58211  # Only process if variable expands to non-empty
58212
58213  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58215
58216  # Input might be given as Windows format, start by converting to
58217  # unix format.
58218  path="$POTENTIAL_FREETYPE_LIB_PATH"
58219  new_path=`$CYGPATH -u "$path"`
58220
58221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58224  # "foo.exe" is OK but "foo" is an error.
58225  #
58226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58227  # It is also a way to make sure we got the proper file name for the real test later on.
58228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58229  if test "x$test_shortpath" = x; then
58230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58231$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58232    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58233  fi
58234
58235  # Call helper function which possibly converts this using DOS-style short mode.
58236  # If so, the updated path is stored in $new_path.
58237
58238  input_path="$new_path"
58239  # Check if we need to convert this using DOS-style short mode. If the path
58240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58241  # take no chances and rewrite it.
58242  # Note: m4 eats our [], so we need to use [ and ] instead.
58243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58244  if test "x$has_forbidden_chars" != x; then
58245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58249      # Going to short mode and back again did indeed matter. Since short mode is
58250      # case insensitive, let's make it lowercase to improve readability.
58251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58252      # Now convert it back to Unix-style (cygpath)
58253      input_path=`$CYGPATH -u "$shortmode_path"`
58254      new_path="$input_path"
58255    fi
58256  fi
58257
58258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58259  if test "x$test_cygdrive_prefix" = x; then
58260    # As a simple fix, exclude /usr/bin since it's not a real path.
58261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58263      # a path prefixed by /cygdrive for fixpath to work.
58264      new_path="$CYGWIN_ROOT_PATH$input_path"
58265    fi
58266  fi
58267
58268
58269  if test "x$path" != "x$new_path"; then
58270    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58272$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58273  fi
58274
58275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58276
58277  path="$POTENTIAL_FREETYPE_LIB_PATH"
58278  has_colon=`$ECHO $path | $GREP ^.:`
58279  new_path="$path"
58280  if test "x$has_colon" = x; then
58281    # Not in mixed or Windows style, start by that.
58282    new_path=`cmd //c echo $path`
58283  fi
58284
58285
58286  input_path="$new_path"
58287  # Check if we need to convert this using DOS-style short mode. If the path
58288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58289  # take no chances and rewrite it.
58290  # Note: m4 eats our [], so we need to use [ and ] instead.
58291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58292  if test "x$has_forbidden_chars" != x; then
58293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58295  fi
58296
58297
58298  windows_path="$new_path"
58299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58300    unix_path=`$CYGPATH -u "$windows_path"`
58301    new_path="$unix_path"
58302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58304    new_path="$unix_path"
58305  fi
58306
58307  if test "x$path" != "x$new_path"; then
58308    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58310$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58311  fi
58312
58313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58315
58316    else
58317      # We're on a unix platform. Hooray! :)
58318      path="$POTENTIAL_FREETYPE_LIB_PATH"
58319      has_space=`$ECHO "$path" | $GREP " "`
58320      if test "x$has_space" != x; then
58321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58322$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58323        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58324      fi
58325
58326      # Use eval to expand a potential ~
58327      eval path="$path"
58328      if test ! -f "$path" && test ! -d "$path"; then
58329        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58330      fi
58331
58332      if test -d "$path"; then
58333        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58334      else
58335        dir="`$DIRNAME "$path"`"
58336        base="`$BASENAME "$path"`"
58337        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58338      fi
58339    fi
58340  fi
58341
58342
58343    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58345$as_echo_n "checking for freetype includes... " >&6; }
58346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58347$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58348    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58350$as_echo_n "checking for freetype libraries... " >&6; }
58351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58352$as_echo "$FREETYPE_LIB_PATH" >&6; }
58353  fi
58354
58355        if test "x$FOUND_FREETYPE" != xyes; then
58356          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58357        fi
58358      else
58359        # User specified only one of lib or include. This is an error.
58360        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58361          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58362$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58363          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58364        else
58365          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58366$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58367          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58368        fi
58369      fi
58370    else
58371      # User did not specify settings, but we need freetype. Try to locate it.
58372
58373      if test "x$BUNDLE_FREETYPE" = x; then
58374        # If not specified, default is to bundle freetype only on windows
58375        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58376          BUNDLE_FREETYPE=yes
58377        else
58378          BUNDLE_FREETYPE=no
58379        fi
58380      fi
58381
58382      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58383      if test "x$SYSROOT" = x; then
58384        if test "x$FOUND_FREETYPE" != xyes; then
58385          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58386          if test "x$PKG_CONFIG" != x; then
58387
58388pkg_failed=no
58389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58390$as_echo_n "checking for FREETYPE... " >&6; }
58391
58392if test -n "$FREETYPE_CFLAGS"; then
58393    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58394 elif test -n "$PKG_CONFIG"; then
58395    if test -n "$PKG_CONFIG" && \
58396    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58397  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58398  ac_status=$?
58399  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58400  test $ac_status = 0; }; then
58401  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58402else
58403  pkg_failed=yes
58404fi
58405 else
58406    pkg_failed=untried
58407fi
58408if test -n "$FREETYPE_LIBS"; then
58409    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58410 elif test -n "$PKG_CONFIG"; then
58411    if test -n "$PKG_CONFIG" && \
58412    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58413  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58414  ac_status=$?
58415  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58416  test $ac_status = 0; }; then
58417  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58418else
58419  pkg_failed=yes
58420fi
58421 else
58422    pkg_failed=untried
58423fi
58424
58425
58426
58427if test $pkg_failed = yes; then
58428
58429if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58430        _pkg_short_errors_supported=yes
58431else
58432        _pkg_short_errors_supported=no
58433fi
58434        if test $_pkg_short_errors_supported = yes; then
58435	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58436        else
58437	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58438        fi
58439	# Put the nasty error message in config.log where it belongs
58440	echo "$FREETYPE_PKG_ERRORS" >&5
58441
58442	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58443$as_echo "no" >&6; }
58444                FOUND_FREETYPE=no
58445elif test $pkg_failed = untried; then
58446	FOUND_FREETYPE=no
58447else
58448	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58449	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58451$as_echo "yes" >&6; }
58452	FOUND_FREETYPE=yes
58453fi
58454            if test "x$FOUND_FREETYPE" = xyes; then
58455              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58456              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58457              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58458              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58459                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58460              fi
58461              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58462              if test "x$BUNDLE_FREETYPE" = xyes; then
58463                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58464$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58465                FOUND_FREETYPE=no
58466              else
58467                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58468$as_echo_n "checking for freetype... " >&6; }
58469                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58470$as_echo "yes (using pkg-config)" >&6; }
58471              fi
58472            fi
58473          fi
58474        fi
58475      fi
58476
58477      if test "x$FOUND_FREETYPE" != xyes; then
58478        # Check in well-known locations
58479        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58480          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58481
58482  windows_path="$FREETYPE_BASE_DIR"
58483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58484    unix_path=`$CYGPATH -u "$windows_path"`
58485    FREETYPE_BASE_DIR="$unix_path"
58486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58488    FREETYPE_BASE_DIR="$unix_path"
58489  fi
58490
58491
58492  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58493  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58494  METHOD="well-known location"
58495
58496  # Let's start with an optimistic view of the world :-)
58497  FOUND_FREETYPE=yes
58498
58499  # First look for the canonical freetype main include file ft2build.h.
58500  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58501    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58502    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58503    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58504      # Fail.
58505      FOUND_FREETYPE=no
58506    fi
58507  fi
58508
58509  if test "x$FOUND_FREETYPE" = xyes; then
58510    # Include file found, let's continue the sanity check.
58511    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58512$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58513
58514    # Reset to default value
58515    FREETYPE_BASE_NAME=freetype
58516    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58517    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58518      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58519          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58520        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58521        # for the .6 version explicitly.
58522        FREETYPE_BASE_NAME=freetype.6
58523        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58524        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58525$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58526      else
58527        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58528$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58529        FOUND_FREETYPE=no
58530      fi
58531    else
58532      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58533        # On Windows, we will need both .lib and .dll file.
58534        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58535          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58536$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58537          FOUND_FREETYPE=no
58538        fi
58539      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58540          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58541        # Found lib in isa dir, use that instead.
58542        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58543        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58544$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58545      fi
58546    fi
58547  fi
58548
58549  if test "x$FOUND_FREETYPE" = xyes; then
58550
58551  # Only process if variable expands to non-empty
58552
58553  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58555
58556  # Input might be given as Windows format, start by converting to
58557  # unix format.
58558  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58559  new_path=`$CYGPATH -u "$path"`
58560
58561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58564  # "foo.exe" is OK but "foo" is an error.
58565  #
58566  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58567  # It is also a way to make sure we got the proper file name for the real test later on.
58568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58569  if test "x$test_shortpath" = x; then
58570    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58571$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58572    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58573  fi
58574
58575  # Call helper function which possibly converts this using DOS-style short mode.
58576  # If so, the updated path is stored in $new_path.
58577
58578  input_path="$new_path"
58579  # Check if we need to convert this using DOS-style short mode. If the path
58580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58581  # take no chances and rewrite it.
58582  # Note: m4 eats our [], so we need to use [ and ] instead.
58583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58584  if test "x$has_forbidden_chars" != x; then
58585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58589      # Going to short mode and back again did indeed matter. Since short mode is
58590      # case insensitive, let's make it lowercase to improve readability.
58591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58592      # Now convert it back to Unix-style (cygpath)
58593      input_path=`$CYGPATH -u "$shortmode_path"`
58594      new_path="$input_path"
58595    fi
58596  fi
58597
58598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58599  if test "x$test_cygdrive_prefix" = x; then
58600    # As a simple fix, exclude /usr/bin since it's not a real path.
58601    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58603      # a path prefixed by /cygdrive for fixpath to work.
58604      new_path="$CYGWIN_ROOT_PATH$input_path"
58605    fi
58606  fi
58607
58608
58609  if test "x$path" != "x$new_path"; then
58610    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58612$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58613  fi
58614
58615    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58616
58617  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58618  has_colon=`$ECHO $path | $GREP ^.:`
58619  new_path="$path"
58620  if test "x$has_colon" = x; then
58621    # Not in mixed or Windows style, start by that.
58622    new_path=`cmd //c echo $path`
58623  fi
58624
58625
58626  input_path="$new_path"
58627  # Check if we need to convert this using DOS-style short mode. If the path
58628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58629  # take no chances and rewrite it.
58630  # Note: m4 eats our [], so we need to use [ and ] instead.
58631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58632  if test "x$has_forbidden_chars" != x; then
58633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58635  fi
58636
58637
58638  windows_path="$new_path"
58639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58640    unix_path=`$CYGPATH -u "$windows_path"`
58641    new_path="$unix_path"
58642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58644    new_path="$unix_path"
58645  fi
58646
58647  if test "x$path" != "x$new_path"; then
58648    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58650$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58651  fi
58652
58653  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58654  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58655
58656    else
58657      # We're on a unix platform. Hooray! :)
58658      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58659      has_space=`$ECHO "$path" | $GREP " "`
58660      if test "x$has_space" != x; then
58661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58662$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58663        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58664      fi
58665
58666      # Use eval to expand a potential ~
58667      eval path="$path"
58668      if test ! -f "$path" && test ! -d "$path"; then
58669        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58670      fi
58671
58672      if test -d "$path"; then
58673        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58674      else
58675        dir="`$DIRNAME "$path"`"
58676        base="`$BASENAME "$path"`"
58677        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58678      fi
58679    fi
58680  fi
58681
58682
58683  # Only process if variable expands to non-empty
58684
58685  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58687
58688  # Input might be given as Windows format, start by converting to
58689  # unix format.
58690  path="$POTENTIAL_FREETYPE_LIB_PATH"
58691  new_path=`$CYGPATH -u "$path"`
58692
58693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58696  # "foo.exe" is OK but "foo" is an error.
58697  #
58698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58699  # It is also a way to make sure we got the proper file name for the real test later on.
58700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58701  if test "x$test_shortpath" = x; then
58702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58704    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58705  fi
58706
58707  # Call helper function which possibly converts this using DOS-style short mode.
58708  # If so, the updated path is stored in $new_path.
58709
58710  input_path="$new_path"
58711  # Check if we need to convert this using DOS-style short mode. If the path
58712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58713  # take no chances and rewrite it.
58714  # Note: m4 eats our [], so we need to use [ and ] instead.
58715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58716  if test "x$has_forbidden_chars" != x; then
58717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58721      # Going to short mode and back again did indeed matter. Since short mode is
58722      # case insensitive, let's make it lowercase to improve readability.
58723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58724      # Now convert it back to Unix-style (cygpath)
58725      input_path=`$CYGPATH -u "$shortmode_path"`
58726      new_path="$input_path"
58727    fi
58728  fi
58729
58730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58731  if test "x$test_cygdrive_prefix" = x; then
58732    # As a simple fix, exclude /usr/bin since it's not a real path.
58733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58735      # a path prefixed by /cygdrive for fixpath to work.
58736      new_path="$CYGWIN_ROOT_PATH$input_path"
58737    fi
58738  fi
58739
58740
58741  if test "x$path" != "x$new_path"; then
58742    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58744$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58745  fi
58746
58747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58748
58749  path="$POTENTIAL_FREETYPE_LIB_PATH"
58750  has_colon=`$ECHO $path | $GREP ^.:`
58751  new_path="$path"
58752  if test "x$has_colon" = x; then
58753    # Not in mixed or Windows style, start by that.
58754    new_path=`cmd //c echo $path`
58755  fi
58756
58757
58758  input_path="$new_path"
58759  # Check if we need to convert this using DOS-style short mode. If the path
58760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58761  # take no chances and rewrite it.
58762  # Note: m4 eats our [], so we need to use [ and ] instead.
58763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58764  if test "x$has_forbidden_chars" != x; then
58765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58767  fi
58768
58769
58770  windows_path="$new_path"
58771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58772    unix_path=`$CYGPATH -u "$windows_path"`
58773    new_path="$unix_path"
58774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58776    new_path="$unix_path"
58777  fi
58778
58779  if test "x$path" != "x$new_path"; then
58780    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58782$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58783  fi
58784
58785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58787
58788    else
58789      # We're on a unix platform. Hooray! :)
58790      path="$POTENTIAL_FREETYPE_LIB_PATH"
58791      has_space=`$ECHO "$path" | $GREP " "`
58792      if test "x$has_space" != x; then
58793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58794$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58796      fi
58797
58798      # Use eval to expand a potential ~
58799      eval path="$path"
58800      if test ! -f "$path" && test ! -d "$path"; then
58801        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58802      fi
58803
58804      if test -d "$path"; then
58805        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58806      else
58807        dir="`$DIRNAME "$path"`"
58808        base="`$BASENAME "$path"`"
58809        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58810      fi
58811    fi
58812  fi
58813
58814
58815    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58817$as_echo_n "checking for freetype includes... " >&6; }
58818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58819$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58820    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58822$as_echo_n "checking for freetype libraries... " >&6; }
58823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58824$as_echo "$FREETYPE_LIB_PATH" >&6; }
58825  fi
58826
58827          if test "x$FOUND_FREETYPE" != xyes; then
58828            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58829
58830  windows_path="$FREETYPE_BASE_DIR"
58831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58832    unix_path=`$CYGPATH -u "$windows_path"`
58833    FREETYPE_BASE_DIR="$unix_path"
58834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58836    FREETYPE_BASE_DIR="$unix_path"
58837  fi
58838
58839
58840  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58841  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58842  METHOD="well-known location"
58843
58844  # Let's start with an optimistic view of the world :-)
58845  FOUND_FREETYPE=yes
58846
58847  # First look for the canonical freetype main include file ft2build.h.
58848  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58849    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58850    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58851    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58852      # Fail.
58853      FOUND_FREETYPE=no
58854    fi
58855  fi
58856
58857  if test "x$FOUND_FREETYPE" = xyes; then
58858    # Include file found, let's continue the sanity check.
58859    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58860$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58861
58862    # Reset to default value
58863    FREETYPE_BASE_NAME=freetype
58864    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58865    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58866      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58867          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58868        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58869        # for the .6 version explicitly.
58870        FREETYPE_BASE_NAME=freetype.6
58871        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58872        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58873$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58874      else
58875        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58876$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58877        FOUND_FREETYPE=no
58878      fi
58879    else
58880      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58881        # On Windows, we will need both .lib and .dll file.
58882        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58883          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58884$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58885          FOUND_FREETYPE=no
58886        fi
58887      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58888          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58889        # Found lib in isa dir, use that instead.
58890        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58891        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58892$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58893      fi
58894    fi
58895  fi
58896
58897  if test "x$FOUND_FREETYPE" = xyes; then
58898
58899  # Only process if variable expands to non-empty
58900
58901  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58902    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58903
58904  # Input might be given as Windows format, start by converting to
58905  # unix format.
58906  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58907  new_path=`$CYGPATH -u "$path"`
58908
58909  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58910  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58911  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58912  # "foo.exe" is OK but "foo" is an error.
58913  #
58914  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58915  # It is also a way to make sure we got the proper file name for the real test later on.
58916  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58917  if test "x$test_shortpath" = x; then
58918    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58919$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58920    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58921  fi
58922
58923  # Call helper function which possibly converts this using DOS-style short mode.
58924  # If so, the updated path is stored in $new_path.
58925
58926  input_path="$new_path"
58927  # Check if we need to convert this using DOS-style short mode. If the path
58928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58929  # take no chances and rewrite it.
58930  # Note: m4 eats our [], so we need to use [ and ] instead.
58931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58932  if test "x$has_forbidden_chars" != x; then
58933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58937      # Going to short mode and back again did indeed matter. Since short mode is
58938      # case insensitive, let's make it lowercase to improve readability.
58939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58940      # Now convert it back to Unix-style (cygpath)
58941      input_path=`$CYGPATH -u "$shortmode_path"`
58942      new_path="$input_path"
58943    fi
58944  fi
58945
58946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58947  if test "x$test_cygdrive_prefix" = x; then
58948    # As a simple fix, exclude /usr/bin since it's not a real path.
58949    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58951      # a path prefixed by /cygdrive for fixpath to work.
58952      new_path="$CYGWIN_ROOT_PATH$input_path"
58953    fi
58954  fi
58955
58956
58957  if test "x$path" != "x$new_path"; then
58958    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58960$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58961  fi
58962
58963    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58964
58965  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58966  has_colon=`$ECHO $path | $GREP ^.:`
58967  new_path="$path"
58968  if test "x$has_colon" = x; then
58969    # Not in mixed or Windows style, start by that.
58970    new_path=`cmd //c echo $path`
58971  fi
58972
58973
58974  input_path="$new_path"
58975  # Check if we need to convert this using DOS-style short mode. If the path
58976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58977  # take no chances and rewrite it.
58978  # Note: m4 eats our [], so we need to use [ and ] instead.
58979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58980  if test "x$has_forbidden_chars" != x; then
58981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58983  fi
58984
58985
58986  windows_path="$new_path"
58987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58988    unix_path=`$CYGPATH -u "$windows_path"`
58989    new_path="$unix_path"
58990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58992    new_path="$unix_path"
58993  fi
58994
58995  if test "x$path" != "x$new_path"; then
58996    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58998$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58999  fi
59000
59001  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59002  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59003
59004    else
59005      # We're on a unix platform. Hooray! :)
59006      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59007      has_space=`$ECHO "$path" | $GREP " "`
59008      if test "x$has_space" != x; then
59009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59010$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59011        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59012      fi
59013
59014      # Use eval to expand a potential ~
59015      eval path="$path"
59016      if test ! -f "$path" && test ! -d "$path"; then
59017        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59018      fi
59019
59020      if test -d "$path"; then
59021        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59022      else
59023        dir="`$DIRNAME "$path"`"
59024        base="`$BASENAME "$path"`"
59025        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59026      fi
59027    fi
59028  fi
59029
59030
59031  # Only process if variable expands to non-empty
59032
59033  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59035
59036  # Input might be given as Windows format, start by converting to
59037  # unix format.
59038  path="$POTENTIAL_FREETYPE_LIB_PATH"
59039  new_path=`$CYGPATH -u "$path"`
59040
59041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59044  # "foo.exe" is OK but "foo" is an error.
59045  #
59046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59047  # It is also a way to make sure we got the proper file name for the real test later on.
59048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59049  if test "x$test_shortpath" = x; then
59050    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59051$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59052    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59053  fi
59054
59055  # Call helper function which possibly converts this using DOS-style short mode.
59056  # If so, the updated path is stored in $new_path.
59057
59058  input_path="$new_path"
59059  # Check if we need to convert this using DOS-style short mode. If the path
59060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59061  # take no chances and rewrite it.
59062  # Note: m4 eats our [], so we need to use [ and ] instead.
59063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59064  if test "x$has_forbidden_chars" != x; then
59065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59069      # Going to short mode and back again did indeed matter. Since short mode is
59070      # case insensitive, let's make it lowercase to improve readability.
59071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59072      # Now convert it back to Unix-style (cygpath)
59073      input_path=`$CYGPATH -u "$shortmode_path"`
59074      new_path="$input_path"
59075    fi
59076  fi
59077
59078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59079  if test "x$test_cygdrive_prefix" = x; then
59080    # As a simple fix, exclude /usr/bin since it's not a real path.
59081    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59083      # a path prefixed by /cygdrive for fixpath to work.
59084      new_path="$CYGWIN_ROOT_PATH$input_path"
59085    fi
59086  fi
59087
59088
59089  if test "x$path" != "x$new_path"; then
59090    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59092$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59093  fi
59094
59095    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59096
59097  path="$POTENTIAL_FREETYPE_LIB_PATH"
59098  has_colon=`$ECHO $path | $GREP ^.:`
59099  new_path="$path"
59100  if test "x$has_colon" = x; then
59101    # Not in mixed or Windows style, start by that.
59102    new_path=`cmd //c echo $path`
59103  fi
59104
59105
59106  input_path="$new_path"
59107  # Check if we need to convert this using DOS-style short mode. If the path
59108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59109  # take no chances and rewrite it.
59110  # Note: m4 eats our [], so we need to use [ and ] instead.
59111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59112  if test "x$has_forbidden_chars" != x; then
59113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59115  fi
59116
59117
59118  windows_path="$new_path"
59119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59120    unix_path=`$CYGPATH -u "$windows_path"`
59121    new_path="$unix_path"
59122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59124    new_path="$unix_path"
59125  fi
59126
59127  if test "x$path" != "x$new_path"; then
59128    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59130$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59131  fi
59132
59133  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59134  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59135
59136    else
59137      # We're on a unix platform. Hooray! :)
59138      path="$POTENTIAL_FREETYPE_LIB_PATH"
59139      has_space=`$ECHO "$path" | $GREP " "`
59140      if test "x$has_space" != x; then
59141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59142$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59143        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59144      fi
59145
59146      # Use eval to expand a potential ~
59147      eval path="$path"
59148      if test ! -f "$path" && test ! -d "$path"; then
59149        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59150      fi
59151
59152      if test -d "$path"; then
59153        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59154      else
59155        dir="`$DIRNAME "$path"`"
59156        base="`$BASENAME "$path"`"
59157        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59158      fi
59159    fi
59160  fi
59161
59162
59163    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59165$as_echo_n "checking for freetype includes... " >&6; }
59166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59167$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59168    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59170$as_echo_n "checking for freetype libraries... " >&6; }
59171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59172$as_echo "$FREETYPE_LIB_PATH" >&6; }
59173  fi
59174
59175          fi
59176          if test "x$FOUND_FREETYPE" != xyes; then
59177            FREETYPE_BASE_DIR="$HOME/freetype"
59178
59179  windows_path="$FREETYPE_BASE_DIR"
59180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59181    unix_path=`$CYGPATH -u "$windows_path"`
59182    FREETYPE_BASE_DIR="$unix_path"
59183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59185    FREETYPE_BASE_DIR="$unix_path"
59186  fi
59187
59188            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59189
59190  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59191  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59192  METHOD="well-known location"
59193
59194  # Let's start with an optimistic view of the world :-)
59195  FOUND_FREETYPE=yes
59196
59197  # First look for the canonical freetype main include file ft2build.h.
59198  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59199    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59200    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59201    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59202      # Fail.
59203      FOUND_FREETYPE=no
59204    fi
59205  fi
59206
59207  if test "x$FOUND_FREETYPE" = xyes; then
59208    # Include file found, let's continue the sanity check.
59209    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59210$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59211
59212    # Reset to default value
59213    FREETYPE_BASE_NAME=freetype
59214    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59215    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59216      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59217          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59218        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59219        # for the .6 version explicitly.
59220        FREETYPE_BASE_NAME=freetype.6
59221        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59222        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59223$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59224      else
59225        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59226$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59227        FOUND_FREETYPE=no
59228      fi
59229    else
59230      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59231        # On Windows, we will need both .lib and .dll file.
59232        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59233          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59234$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59235          FOUND_FREETYPE=no
59236        fi
59237      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59238          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59239        # Found lib in isa dir, use that instead.
59240        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59241        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59242$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59243      fi
59244    fi
59245  fi
59246
59247  if test "x$FOUND_FREETYPE" = xyes; then
59248
59249  # Only process if variable expands to non-empty
59250
59251  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59253
59254  # Input might be given as Windows format, start by converting to
59255  # unix format.
59256  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59257  new_path=`$CYGPATH -u "$path"`
59258
59259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59262  # "foo.exe" is OK but "foo" is an error.
59263  #
59264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59265  # It is also a way to make sure we got the proper file name for the real test later on.
59266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59267  if test "x$test_shortpath" = x; then
59268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59269$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59270    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59271  fi
59272
59273  # Call helper function which possibly converts this using DOS-style short mode.
59274  # If so, the updated path is stored in $new_path.
59275
59276  input_path="$new_path"
59277  # Check if we need to convert this using DOS-style short mode. If the path
59278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59279  # take no chances and rewrite it.
59280  # Note: m4 eats our [], so we need to use [ and ] instead.
59281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59282  if test "x$has_forbidden_chars" != x; then
59283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59287      # Going to short mode and back again did indeed matter. Since short mode is
59288      # case insensitive, let's make it lowercase to improve readability.
59289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59290      # Now convert it back to Unix-style (cygpath)
59291      input_path=`$CYGPATH -u "$shortmode_path"`
59292      new_path="$input_path"
59293    fi
59294  fi
59295
59296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59297  if test "x$test_cygdrive_prefix" = x; then
59298    # As a simple fix, exclude /usr/bin since it's not a real path.
59299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59301      # a path prefixed by /cygdrive for fixpath to work.
59302      new_path="$CYGWIN_ROOT_PATH$input_path"
59303    fi
59304  fi
59305
59306
59307  if test "x$path" != "x$new_path"; then
59308    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59310$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59311  fi
59312
59313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59314
59315  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59316  has_colon=`$ECHO $path | $GREP ^.:`
59317  new_path="$path"
59318  if test "x$has_colon" = x; then
59319    # Not in mixed or Windows style, start by that.
59320    new_path=`cmd //c echo $path`
59321  fi
59322
59323
59324  input_path="$new_path"
59325  # Check if we need to convert this using DOS-style short mode. If the path
59326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59327  # take no chances and rewrite it.
59328  # Note: m4 eats our [], so we need to use [ and ] instead.
59329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59330  if test "x$has_forbidden_chars" != x; then
59331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59333  fi
59334
59335
59336  windows_path="$new_path"
59337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59338    unix_path=`$CYGPATH -u "$windows_path"`
59339    new_path="$unix_path"
59340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59342    new_path="$unix_path"
59343  fi
59344
59345  if test "x$path" != "x$new_path"; then
59346    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59348$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59349  fi
59350
59351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59353
59354    else
59355      # We're on a unix platform. Hooray! :)
59356      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59357      has_space=`$ECHO "$path" | $GREP " "`
59358      if test "x$has_space" != x; then
59359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59360$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59361        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59362      fi
59363
59364      # Use eval to expand a potential ~
59365      eval path="$path"
59366      if test ! -f "$path" && test ! -d "$path"; then
59367        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59368      fi
59369
59370      if test -d "$path"; then
59371        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59372      else
59373        dir="`$DIRNAME "$path"`"
59374        base="`$BASENAME "$path"`"
59375        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59376      fi
59377    fi
59378  fi
59379
59380
59381  # Only process if variable expands to non-empty
59382
59383  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59384    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59385
59386  # Input might be given as Windows format, start by converting to
59387  # unix format.
59388  path="$POTENTIAL_FREETYPE_LIB_PATH"
59389  new_path=`$CYGPATH -u "$path"`
59390
59391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59394  # "foo.exe" is OK but "foo" is an error.
59395  #
59396  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59397  # It is also a way to make sure we got the proper file name for the real test later on.
59398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59399  if test "x$test_shortpath" = x; then
59400    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59401$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59402    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59403  fi
59404
59405  # Call helper function which possibly converts this using DOS-style short mode.
59406  # If so, the updated path is stored in $new_path.
59407
59408  input_path="$new_path"
59409  # Check if we need to convert this using DOS-style short mode. If the path
59410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59411  # take no chances and rewrite it.
59412  # Note: m4 eats our [], so we need to use [ and ] instead.
59413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59414  if test "x$has_forbidden_chars" != x; then
59415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59419      # Going to short mode and back again did indeed matter. Since short mode is
59420      # case insensitive, let's make it lowercase to improve readability.
59421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59422      # Now convert it back to Unix-style (cygpath)
59423      input_path=`$CYGPATH -u "$shortmode_path"`
59424      new_path="$input_path"
59425    fi
59426  fi
59427
59428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59429  if test "x$test_cygdrive_prefix" = x; then
59430    # As a simple fix, exclude /usr/bin since it's not a real path.
59431    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59433      # a path prefixed by /cygdrive for fixpath to work.
59434      new_path="$CYGWIN_ROOT_PATH$input_path"
59435    fi
59436  fi
59437
59438
59439  if test "x$path" != "x$new_path"; then
59440    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59442$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59443  fi
59444
59445    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59446
59447  path="$POTENTIAL_FREETYPE_LIB_PATH"
59448  has_colon=`$ECHO $path | $GREP ^.:`
59449  new_path="$path"
59450  if test "x$has_colon" = x; then
59451    # Not in mixed or Windows style, start by that.
59452    new_path=`cmd //c echo $path`
59453  fi
59454
59455
59456  input_path="$new_path"
59457  # Check if we need to convert this using DOS-style short mode. If the path
59458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59459  # take no chances and rewrite it.
59460  # Note: m4 eats our [], so we need to use [ and ] instead.
59461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59462  if test "x$has_forbidden_chars" != x; then
59463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59465  fi
59466
59467
59468  windows_path="$new_path"
59469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59470    unix_path=`$CYGPATH -u "$windows_path"`
59471    new_path="$unix_path"
59472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59474    new_path="$unix_path"
59475  fi
59476
59477  if test "x$path" != "x$new_path"; then
59478    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59479    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59480$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59481  fi
59482
59483  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59484  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59485
59486    else
59487      # We're on a unix platform. Hooray! :)
59488      path="$POTENTIAL_FREETYPE_LIB_PATH"
59489      has_space=`$ECHO "$path" | $GREP " "`
59490      if test "x$has_space" != x; then
59491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59492$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59493        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59494      fi
59495
59496      # Use eval to expand a potential ~
59497      eval path="$path"
59498      if test ! -f "$path" && test ! -d "$path"; then
59499        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59500      fi
59501
59502      if test -d "$path"; then
59503        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59504      else
59505        dir="`$DIRNAME "$path"`"
59506        base="`$BASENAME "$path"`"
59507        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59508      fi
59509    fi
59510  fi
59511
59512
59513    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59515$as_echo_n "checking for freetype includes... " >&6; }
59516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59517$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59518    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59520$as_echo_n "checking for freetype libraries... " >&6; }
59521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59522$as_echo "$FREETYPE_LIB_PATH" >&6; }
59523  fi
59524
59525            else
59526
59527  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59528  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59529  METHOD="well-known location"
59530
59531  # Let's start with an optimistic view of the world :-)
59532  FOUND_FREETYPE=yes
59533
59534  # First look for the canonical freetype main include file ft2build.h.
59535  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59536    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59537    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59538    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59539      # Fail.
59540      FOUND_FREETYPE=no
59541    fi
59542  fi
59543
59544  if test "x$FOUND_FREETYPE" = xyes; then
59545    # Include file found, let's continue the sanity check.
59546    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59547$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59548
59549    # Reset to default value
59550    FREETYPE_BASE_NAME=freetype
59551    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59552    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59553      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59554          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59555        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59556        # for the .6 version explicitly.
59557        FREETYPE_BASE_NAME=freetype.6
59558        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59559        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59560$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59561      else
59562        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59563$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59564        FOUND_FREETYPE=no
59565      fi
59566    else
59567      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59568        # On Windows, we will need both .lib and .dll file.
59569        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59570          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59571$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59572          FOUND_FREETYPE=no
59573        fi
59574      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59575          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59576        # Found lib in isa dir, use that instead.
59577        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59578        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59579$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59580      fi
59581    fi
59582  fi
59583
59584  if test "x$FOUND_FREETYPE" = xyes; then
59585
59586  # Only process if variable expands to non-empty
59587
59588  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59590
59591  # Input might be given as Windows format, start by converting to
59592  # unix format.
59593  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59594  new_path=`$CYGPATH -u "$path"`
59595
59596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59599  # "foo.exe" is OK but "foo" is an error.
59600  #
59601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59602  # It is also a way to make sure we got the proper file name for the real test later on.
59603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59604  if test "x$test_shortpath" = x; then
59605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59606$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59607    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59608  fi
59609
59610  # Call helper function which possibly converts this using DOS-style short mode.
59611  # If so, the updated path is stored in $new_path.
59612
59613  input_path="$new_path"
59614  # Check if we need to convert this using DOS-style short mode. If the path
59615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59616  # take no chances and rewrite it.
59617  # Note: m4 eats our [], so we need to use [ and ] instead.
59618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59619  if test "x$has_forbidden_chars" != x; then
59620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59624      # Going to short mode and back again did indeed matter. Since short mode is
59625      # case insensitive, let's make it lowercase to improve readability.
59626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59627      # Now convert it back to Unix-style (cygpath)
59628      input_path=`$CYGPATH -u "$shortmode_path"`
59629      new_path="$input_path"
59630    fi
59631  fi
59632
59633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59634  if test "x$test_cygdrive_prefix" = x; then
59635    # As a simple fix, exclude /usr/bin since it's not a real path.
59636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59638      # a path prefixed by /cygdrive for fixpath to work.
59639      new_path="$CYGWIN_ROOT_PATH$input_path"
59640    fi
59641  fi
59642
59643
59644  if test "x$path" != "x$new_path"; then
59645    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59647$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59648  fi
59649
59650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59651
59652  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59653  has_colon=`$ECHO $path | $GREP ^.:`
59654  new_path="$path"
59655  if test "x$has_colon" = x; then
59656    # Not in mixed or Windows style, start by that.
59657    new_path=`cmd //c echo $path`
59658  fi
59659
59660
59661  input_path="$new_path"
59662  # Check if we need to convert this using DOS-style short mode. If the path
59663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59664  # take no chances and rewrite it.
59665  # Note: m4 eats our [], so we need to use [ and ] instead.
59666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59667  if test "x$has_forbidden_chars" != x; then
59668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59670  fi
59671
59672
59673  windows_path="$new_path"
59674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59675    unix_path=`$CYGPATH -u "$windows_path"`
59676    new_path="$unix_path"
59677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59679    new_path="$unix_path"
59680  fi
59681
59682  if test "x$path" != "x$new_path"; then
59683    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59685$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59686  fi
59687
59688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59690
59691    else
59692      # We're on a unix platform. Hooray! :)
59693      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59694      has_space=`$ECHO "$path" | $GREP " "`
59695      if test "x$has_space" != x; then
59696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59697$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59699      fi
59700
59701      # Use eval to expand a potential ~
59702      eval path="$path"
59703      if test ! -f "$path" && test ! -d "$path"; then
59704        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59705      fi
59706
59707      if test -d "$path"; then
59708        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59709      else
59710        dir="`$DIRNAME "$path"`"
59711        base="`$BASENAME "$path"`"
59712        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59713      fi
59714    fi
59715  fi
59716
59717
59718  # Only process if variable expands to non-empty
59719
59720  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59722
59723  # Input might be given as Windows format, start by converting to
59724  # unix format.
59725  path="$POTENTIAL_FREETYPE_LIB_PATH"
59726  new_path=`$CYGPATH -u "$path"`
59727
59728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59731  # "foo.exe" is OK but "foo" is an error.
59732  #
59733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59734  # It is also a way to make sure we got the proper file name for the real test later on.
59735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59736  if test "x$test_shortpath" = x; then
59737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59738$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59739    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59740  fi
59741
59742  # Call helper function which possibly converts this using DOS-style short mode.
59743  # If so, the updated path is stored in $new_path.
59744
59745  input_path="$new_path"
59746  # Check if we need to convert this using DOS-style short mode. If the path
59747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59748  # take no chances and rewrite it.
59749  # Note: m4 eats our [], so we need to use [ and ] instead.
59750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59751  if test "x$has_forbidden_chars" != x; then
59752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59756      # Going to short mode and back again did indeed matter. Since short mode is
59757      # case insensitive, let's make it lowercase to improve readability.
59758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59759      # Now convert it back to Unix-style (cygpath)
59760      input_path=`$CYGPATH -u "$shortmode_path"`
59761      new_path="$input_path"
59762    fi
59763  fi
59764
59765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59766  if test "x$test_cygdrive_prefix" = x; then
59767    # As a simple fix, exclude /usr/bin since it's not a real path.
59768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59770      # a path prefixed by /cygdrive for fixpath to work.
59771      new_path="$CYGWIN_ROOT_PATH$input_path"
59772    fi
59773  fi
59774
59775
59776  if test "x$path" != "x$new_path"; then
59777    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59779$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59780  fi
59781
59782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59783
59784  path="$POTENTIAL_FREETYPE_LIB_PATH"
59785  has_colon=`$ECHO $path | $GREP ^.:`
59786  new_path="$path"
59787  if test "x$has_colon" = x; then
59788    # Not in mixed or Windows style, start by that.
59789    new_path=`cmd //c echo $path`
59790  fi
59791
59792
59793  input_path="$new_path"
59794  # Check if we need to convert this using DOS-style short mode. If the path
59795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59796  # take no chances and rewrite it.
59797  # Note: m4 eats our [], so we need to use [ and ] instead.
59798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59799  if test "x$has_forbidden_chars" != x; then
59800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59802  fi
59803
59804
59805  windows_path="$new_path"
59806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59807    unix_path=`$CYGPATH -u "$windows_path"`
59808    new_path="$unix_path"
59809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59811    new_path="$unix_path"
59812  fi
59813
59814  if test "x$path" != "x$new_path"; then
59815    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59817$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59818  fi
59819
59820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59822
59823    else
59824      # We're on a unix platform. Hooray! :)
59825      path="$POTENTIAL_FREETYPE_LIB_PATH"
59826      has_space=`$ECHO "$path" | $GREP " "`
59827      if test "x$has_space" != x; then
59828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59829$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59831      fi
59832
59833      # Use eval to expand a potential ~
59834      eval path="$path"
59835      if test ! -f "$path" && test ! -d "$path"; then
59836        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59837      fi
59838
59839      if test -d "$path"; then
59840        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59841      else
59842        dir="`$DIRNAME "$path"`"
59843        base="`$BASENAME "$path"`"
59844        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59845      fi
59846    fi
59847  fi
59848
59849
59850    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59851    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59852$as_echo_n "checking for freetype includes... " >&6; }
59853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59854$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59855    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59857$as_echo_n "checking for freetype libraries... " >&6; }
59858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59859$as_echo "$FREETYPE_LIB_PATH" >&6; }
59860  fi
59861
59862            fi
59863            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59864                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59865              # Source is available, as a last resort try to build freetype in default location
59866
59867  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59868  BUILD_FREETYPE=yes
59869
59870  # Check if the freetype sources are acessible..
59871  if ! test -d $FREETYPE_SRC_PATH; then
59872    { $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
59873$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59874    BUILD_FREETYPE=no
59875  fi
59876  # ..and contain a vc2010 project file
59877  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59878  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59879    { $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
59880$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59881    BUILD_FREETYPE=no
59882  fi
59883  # Now check if configure found a version of 'msbuild.exe'
59884  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59885    { $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
59886$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;}
59887    BUILD_FREETYPE=no
59888  fi
59889
59890  # Ready to go..
59891  if test "x$BUILD_FREETYPE" = xyes; then
59892    # msbuild requires trailing slashes for output directories
59893    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59894    freetype_lib_path_unix="$freetype_lib_path"
59895    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59896
59897  unix_path="$vcxproj_path"
59898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59899    windows_path=`$CYGPATH -m "$unix_path"`
59900    vcxproj_path="$windows_path"
59901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59902    windows_path=`cmd //c echo $unix_path`
59903    vcxproj_path="$windows_path"
59904  fi
59905
59906
59907  unix_path="$freetype_lib_path"
59908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59909    windows_path=`$CYGPATH -m "$unix_path"`
59910    freetype_lib_path="$windows_path"
59911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59912    windows_path=`cmd //c echo $unix_path`
59913    freetype_lib_path="$windows_path"
59914  fi
59915
59916
59917  unix_path="$freetype_obj_path"
59918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59919    windows_path=`$CYGPATH -m "$unix_path"`
59920    freetype_obj_path="$windows_path"
59921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59922    windows_path=`cmd //c echo $unix_path`
59923    freetype_obj_path="$windows_path"
59924  fi
59925
59926    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59927      freetype_platform=x64
59928    else
59929      freetype_platform=win32
59930    fi
59931
59932    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59933    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59934    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59935    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59936    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59937$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59938
59939    # First we try to build the freetype.dll
59940    $ECHO -e "@echo off\n"\
59941        "$MSBUILD $vcxproj_path "\
59942        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59943        "/p:Configuration=\"Release Multithreaded\" "\
59944        "/p:Platform=$freetype_platform "\
59945        "/p:ConfigurationType=DynamicLibrary "\
59946        "/p:TargetName=freetype "\
59947        "/p:OutDir=\"$freetype_lib_path\" "\
59948        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59949    cmd /c freetype.bat
59950
59951    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59952      # If that succeeds we also build freetype.lib
59953      $ECHO -e "@echo off\n"\
59954          "$MSBUILD $vcxproj_path "\
59955          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59956          "/p:Configuration=\"Release Multithreaded\" "\
59957          "/p:Platform=$freetype_platform "\
59958          "/p:ConfigurationType=StaticLibrary "\
59959          "/p:TargetName=freetype "\
59960          "/p:OutDir=\"$freetype_lib_path\" "\
59961          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59962      cmd /c freetype.bat
59963
59964      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59965        # Once we build both, lib and dll, set freetype lib and include path appropriately
59966        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59967        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59968        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59969$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59970      else
59971        BUILD_FREETYPE=no
59972      fi
59973    else
59974      BUILD_FREETYPE=no
59975    fi
59976  fi
59977
59978              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59979
59980  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59981  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59982  METHOD="well-known location"
59983
59984  # Let's start with an optimistic view of the world :-)
59985  FOUND_FREETYPE=yes
59986
59987  # First look for the canonical freetype main include file ft2build.h.
59988  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59989    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59990    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59991    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59992      # Fail.
59993      FOUND_FREETYPE=no
59994    fi
59995  fi
59996
59997  if test "x$FOUND_FREETYPE" = xyes; then
59998    # Include file found, let's continue the sanity check.
59999    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60000$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60001
60002    # Reset to default value
60003    FREETYPE_BASE_NAME=freetype
60004    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60005    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60006      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60007          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60008        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60009        # for the .6 version explicitly.
60010        FREETYPE_BASE_NAME=freetype.6
60011        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60012        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60013$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60014      else
60015        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60016$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60017        FOUND_FREETYPE=no
60018      fi
60019    else
60020      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60021        # On Windows, we will need both .lib and .dll file.
60022        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60023          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60024$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60025          FOUND_FREETYPE=no
60026        fi
60027      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60028          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60029        # Found lib in isa dir, use that instead.
60030        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60031        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60032$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60033      fi
60034    fi
60035  fi
60036
60037  if test "x$FOUND_FREETYPE" = xyes; then
60038
60039  # Only process if variable expands to non-empty
60040
60041  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60042    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60043
60044  # Input might be given as Windows format, start by converting to
60045  # unix format.
60046  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60047  new_path=`$CYGPATH -u "$path"`
60048
60049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60052  # "foo.exe" is OK but "foo" is an error.
60053  #
60054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60055  # It is also a way to make sure we got the proper file name for the real test later on.
60056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60057  if test "x$test_shortpath" = x; then
60058    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60059$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60060    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60061  fi
60062
60063  # Call helper function which possibly converts this using DOS-style short mode.
60064  # If so, the updated path is stored in $new_path.
60065
60066  input_path="$new_path"
60067  # Check if we need to convert this using DOS-style short mode. If the path
60068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60069  # take no chances and rewrite it.
60070  # Note: m4 eats our [], so we need to use [ and ] instead.
60071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60072  if test "x$has_forbidden_chars" != x; then
60073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60077      # Going to short mode and back again did indeed matter. Since short mode is
60078      # case insensitive, let's make it lowercase to improve readability.
60079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60080      # Now convert it back to Unix-style (cygpath)
60081      input_path=`$CYGPATH -u "$shortmode_path"`
60082      new_path="$input_path"
60083    fi
60084  fi
60085
60086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60087  if test "x$test_cygdrive_prefix" = x; then
60088    # As a simple fix, exclude /usr/bin since it's not a real path.
60089    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60091      # a path prefixed by /cygdrive for fixpath to work.
60092      new_path="$CYGWIN_ROOT_PATH$input_path"
60093    fi
60094  fi
60095
60096
60097  if test "x$path" != "x$new_path"; then
60098    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60100$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60101  fi
60102
60103    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60104
60105  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60106  has_colon=`$ECHO $path | $GREP ^.:`
60107  new_path="$path"
60108  if test "x$has_colon" = x; then
60109    # Not in mixed or Windows style, start by that.
60110    new_path=`cmd //c echo $path`
60111  fi
60112
60113
60114  input_path="$new_path"
60115  # Check if we need to convert this using DOS-style short mode. If the path
60116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60117  # take no chances and rewrite it.
60118  # Note: m4 eats our [], so we need to use [ and ] instead.
60119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60120  if test "x$has_forbidden_chars" != x; then
60121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60123  fi
60124
60125
60126  windows_path="$new_path"
60127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60128    unix_path=`$CYGPATH -u "$windows_path"`
60129    new_path="$unix_path"
60130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60132    new_path="$unix_path"
60133  fi
60134
60135  if test "x$path" != "x$new_path"; then
60136    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60138$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60139  fi
60140
60141  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60142  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60143
60144    else
60145      # We're on a unix platform. Hooray! :)
60146      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60147      has_space=`$ECHO "$path" | $GREP " "`
60148      if test "x$has_space" != x; then
60149        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60150$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60151        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60152      fi
60153
60154      # Use eval to expand a potential ~
60155      eval path="$path"
60156      if test ! -f "$path" && test ! -d "$path"; then
60157        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60158      fi
60159
60160      if test -d "$path"; then
60161        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60162      else
60163        dir="`$DIRNAME "$path"`"
60164        base="`$BASENAME "$path"`"
60165        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60166      fi
60167    fi
60168  fi
60169
60170
60171  # Only process if variable expands to non-empty
60172
60173  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60175
60176  # Input might be given as Windows format, start by converting to
60177  # unix format.
60178  path="$POTENTIAL_FREETYPE_LIB_PATH"
60179  new_path=`$CYGPATH -u "$path"`
60180
60181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60184  # "foo.exe" is OK but "foo" is an error.
60185  #
60186  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60187  # It is also a way to make sure we got the proper file name for the real test later on.
60188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60189  if test "x$test_shortpath" = x; then
60190    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60191$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60192    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60193  fi
60194
60195  # Call helper function which possibly converts this using DOS-style short mode.
60196  # If so, the updated path is stored in $new_path.
60197
60198  input_path="$new_path"
60199  # Check if we need to convert this using DOS-style short mode. If the path
60200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60201  # take no chances and rewrite it.
60202  # Note: m4 eats our [], so we need to use [ and ] instead.
60203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60204  if test "x$has_forbidden_chars" != x; then
60205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60209      # Going to short mode and back again did indeed matter. Since short mode is
60210      # case insensitive, let's make it lowercase to improve readability.
60211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60212      # Now convert it back to Unix-style (cygpath)
60213      input_path=`$CYGPATH -u "$shortmode_path"`
60214      new_path="$input_path"
60215    fi
60216  fi
60217
60218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60219  if test "x$test_cygdrive_prefix" = x; then
60220    # As a simple fix, exclude /usr/bin since it's not a real path.
60221    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60223      # a path prefixed by /cygdrive for fixpath to work.
60224      new_path="$CYGWIN_ROOT_PATH$input_path"
60225    fi
60226  fi
60227
60228
60229  if test "x$path" != "x$new_path"; then
60230    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60232$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60233  fi
60234
60235    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60236
60237  path="$POTENTIAL_FREETYPE_LIB_PATH"
60238  has_colon=`$ECHO $path | $GREP ^.:`
60239  new_path="$path"
60240  if test "x$has_colon" = x; then
60241    # Not in mixed or Windows style, start by that.
60242    new_path=`cmd //c echo $path`
60243  fi
60244
60245
60246  input_path="$new_path"
60247  # Check if we need to convert this using DOS-style short mode. If the path
60248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60249  # take no chances and rewrite it.
60250  # Note: m4 eats our [], so we need to use [ and ] instead.
60251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60252  if test "x$has_forbidden_chars" != x; then
60253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60255  fi
60256
60257
60258  windows_path="$new_path"
60259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60260    unix_path=`$CYGPATH -u "$windows_path"`
60261    new_path="$unix_path"
60262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60264    new_path="$unix_path"
60265  fi
60266
60267  if test "x$path" != "x$new_path"; then
60268    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60270$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60271  fi
60272
60273  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60274  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60275
60276    else
60277      # We're on a unix platform. Hooray! :)
60278      path="$POTENTIAL_FREETYPE_LIB_PATH"
60279      has_space=`$ECHO "$path" | $GREP " "`
60280      if test "x$has_space" != x; then
60281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60282$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60283        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60284      fi
60285
60286      # Use eval to expand a potential ~
60287      eval path="$path"
60288      if test ! -f "$path" && test ! -d "$path"; then
60289        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60290      fi
60291
60292      if test -d "$path"; then
60293        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60294      else
60295        dir="`$DIRNAME "$path"`"
60296        base="`$BASENAME "$path"`"
60297        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60298      fi
60299    fi
60300  fi
60301
60302
60303    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60305$as_echo_n "checking for freetype includes... " >&6; }
60306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60307$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60308    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60310$as_echo_n "checking for freetype libraries... " >&6; }
60311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60312$as_echo "$FREETYPE_LIB_PATH" >&6; }
60313  fi
60314
60315              else
60316
60317  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60318  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60319  METHOD="well-known location"
60320
60321  # Let's start with an optimistic view of the world :-)
60322  FOUND_FREETYPE=yes
60323
60324  # First look for the canonical freetype main include file ft2build.h.
60325  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60326    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60327    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60328    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60329      # Fail.
60330      FOUND_FREETYPE=no
60331    fi
60332  fi
60333
60334  if test "x$FOUND_FREETYPE" = xyes; then
60335    # Include file found, let's continue the sanity check.
60336    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60337$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60338
60339    # Reset to default value
60340    FREETYPE_BASE_NAME=freetype
60341    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60342    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60343      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60344          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60345        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60346        # for the .6 version explicitly.
60347        FREETYPE_BASE_NAME=freetype.6
60348        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60349        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60350$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60351      else
60352        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60353$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60354        FOUND_FREETYPE=no
60355      fi
60356    else
60357      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60358        # On Windows, we will need both .lib and .dll file.
60359        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60360          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60361$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60362          FOUND_FREETYPE=no
60363        fi
60364      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60365          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60366        # Found lib in isa dir, use that instead.
60367        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60368        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60369$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60370      fi
60371    fi
60372  fi
60373
60374  if test "x$FOUND_FREETYPE" = xyes; then
60375
60376  # Only process if variable expands to non-empty
60377
60378  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60379    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60380
60381  # Input might be given as Windows format, start by converting to
60382  # unix format.
60383  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60384  new_path=`$CYGPATH -u "$path"`
60385
60386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60389  # "foo.exe" is OK but "foo" is an error.
60390  #
60391  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60392  # It is also a way to make sure we got the proper file name for the real test later on.
60393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60394  if test "x$test_shortpath" = x; then
60395    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60396$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60397    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60398  fi
60399
60400  # Call helper function which possibly converts this using DOS-style short mode.
60401  # If so, the updated path is stored in $new_path.
60402
60403  input_path="$new_path"
60404  # Check if we need to convert this using DOS-style short mode. If the path
60405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60406  # take no chances and rewrite it.
60407  # Note: m4 eats our [], so we need to use [ and ] instead.
60408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60409  if test "x$has_forbidden_chars" != x; then
60410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60414      # Going to short mode and back again did indeed matter. Since short mode is
60415      # case insensitive, let's make it lowercase to improve readability.
60416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60417      # Now convert it back to Unix-style (cygpath)
60418      input_path=`$CYGPATH -u "$shortmode_path"`
60419      new_path="$input_path"
60420    fi
60421  fi
60422
60423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60424  if test "x$test_cygdrive_prefix" = x; then
60425    # As a simple fix, exclude /usr/bin since it's not a real path.
60426    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60428      # a path prefixed by /cygdrive for fixpath to work.
60429      new_path="$CYGWIN_ROOT_PATH$input_path"
60430    fi
60431  fi
60432
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60441
60442  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60443  has_colon=`$ECHO $path | $GREP ^.:`
60444  new_path="$path"
60445  if test "x$has_colon" = x; then
60446    # Not in mixed or Windows style, start by that.
60447    new_path=`cmd //c echo $path`
60448  fi
60449
60450
60451  input_path="$new_path"
60452  # Check if we need to convert this using DOS-style short mode. If the path
60453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60454  # take no chances and rewrite it.
60455  # Note: m4 eats our [], so we need to use [ and ] instead.
60456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60457  if test "x$has_forbidden_chars" != x; then
60458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60460  fi
60461
60462
60463  windows_path="$new_path"
60464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60465    unix_path=`$CYGPATH -u "$windows_path"`
60466    new_path="$unix_path"
60467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60469    new_path="$unix_path"
60470  fi
60471
60472  if test "x$path" != "x$new_path"; then
60473    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60475$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60476  fi
60477
60478  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60479  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60480
60481    else
60482      # We're on a unix platform. Hooray! :)
60483      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60484      has_space=`$ECHO "$path" | $GREP " "`
60485      if test "x$has_space" != x; then
60486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60487$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60488        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60489      fi
60490
60491      # Use eval to expand a potential ~
60492      eval path="$path"
60493      if test ! -f "$path" && test ! -d "$path"; then
60494        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60495      fi
60496
60497      if test -d "$path"; then
60498        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60499      else
60500        dir="`$DIRNAME "$path"`"
60501        base="`$BASENAME "$path"`"
60502        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60503      fi
60504    fi
60505  fi
60506
60507
60508  # Only process if variable expands to non-empty
60509
60510  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60511    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60512
60513  # Input might be given as Windows format, start by converting to
60514  # unix format.
60515  path="$POTENTIAL_FREETYPE_LIB_PATH"
60516  new_path=`$CYGPATH -u "$path"`
60517
60518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60521  # "foo.exe" is OK but "foo" is an error.
60522  #
60523  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60524  # It is also a way to make sure we got the proper file name for the real test later on.
60525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60526  if test "x$test_shortpath" = x; then
60527    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60528$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60529    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60530  fi
60531
60532  # Call helper function which possibly converts this using DOS-style short mode.
60533  # If so, the updated path is stored in $new_path.
60534
60535  input_path="$new_path"
60536  # Check if we need to convert this using DOS-style short mode. If the path
60537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60538  # take no chances and rewrite it.
60539  # Note: m4 eats our [], so we need to use [ and ] instead.
60540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60541  if test "x$has_forbidden_chars" != x; then
60542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60546      # Going to short mode and back again did indeed matter. Since short mode is
60547      # case insensitive, let's make it lowercase to improve readability.
60548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60549      # Now convert it back to Unix-style (cygpath)
60550      input_path=`$CYGPATH -u "$shortmode_path"`
60551      new_path="$input_path"
60552    fi
60553  fi
60554
60555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60556  if test "x$test_cygdrive_prefix" = x; then
60557    # As a simple fix, exclude /usr/bin since it's not a real path.
60558    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60560      # a path prefixed by /cygdrive for fixpath to work.
60561      new_path="$CYGWIN_ROOT_PATH$input_path"
60562    fi
60563  fi
60564
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60573
60574  path="$POTENTIAL_FREETYPE_LIB_PATH"
60575  has_colon=`$ECHO $path | $GREP ^.:`
60576  new_path="$path"
60577  if test "x$has_colon" = x; then
60578    # Not in mixed or Windows style, start by that.
60579    new_path=`cmd //c echo $path`
60580  fi
60581
60582
60583  input_path="$new_path"
60584  # Check if we need to convert this using DOS-style short mode. If the path
60585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60586  # take no chances and rewrite it.
60587  # Note: m4 eats our [], so we need to use [ and ] instead.
60588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60589  if test "x$has_forbidden_chars" != x; then
60590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60591    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60592  fi
60593
60594
60595  windows_path="$new_path"
60596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60597    unix_path=`$CYGPATH -u "$windows_path"`
60598    new_path="$unix_path"
60599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60601    new_path="$unix_path"
60602  fi
60603
60604  if test "x$path" != "x$new_path"; then
60605    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60607$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60608  fi
60609
60610  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60611  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60612
60613    else
60614      # We're on a unix platform. Hooray! :)
60615      path="$POTENTIAL_FREETYPE_LIB_PATH"
60616      has_space=`$ECHO "$path" | $GREP " "`
60617      if test "x$has_space" != x; then
60618        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60619$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60620        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60621      fi
60622
60623      # Use eval to expand a potential ~
60624      eval path="$path"
60625      if test ! -f "$path" && test ! -d "$path"; then
60626        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60627      fi
60628
60629      if test -d "$path"; then
60630        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60631      else
60632        dir="`$DIRNAME "$path"`"
60633        base="`$BASENAME "$path"`"
60634        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60635      fi
60636    fi
60637  fi
60638
60639
60640    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60641    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60642$as_echo_n "checking for freetype includes... " >&6; }
60643    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60644$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60645    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60647$as_echo_n "checking for freetype libraries... " >&6; }
60648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60649$as_echo "$FREETYPE_LIB_PATH" >&6; }
60650  fi
60651
60652              fi
60653            fi
60654          fi
60655        else
60656          FREETYPE_BASE_DIR="$SYSROOT/usr"
60657
60658  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60659  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60660  METHOD="well-known location"
60661
60662  # Let's start with an optimistic view of the world :-)
60663  FOUND_FREETYPE=yes
60664
60665  # First look for the canonical freetype main include file ft2build.h.
60666  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60667    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60668    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60669    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60670      # Fail.
60671      FOUND_FREETYPE=no
60672    fi
60673  fi
60674
60675  if test "x$FOUND_FREETYPE" = xyes; then
60676    # Include file found, let's continue the sanity check.
60677    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60678$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60679
60680    # Reset to default value
60681    FREETYPE_BASE_NAME=freetype
60682    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60683    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60684      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60685          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60686        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60687        # for the .6 version explicitly.
60688        FREETYPE_BASE_NAME=freetype.6
60689        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60690        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60691$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60692      else
60693        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60694$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60695        FOUND_FREETYPE=no
60696      fi
60697    else
60698      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60699        # On Windows, we will need both .lib and .dll file.
60700        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60701          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60702$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60703          FOUND_FREETYPE=no
60704        fi
60705      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60706          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60707        # Found lib in isa dir, use that instead.
60708        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60709        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60710$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60711      fi
60712    fi
60713  fi
60714
60715  if test "x$FOUND_FREETYPE" = xyes; then
60716
60717  # Only process if variable expands to non-empty
60718
60719  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60721
60722  # Input might be given as Windows format, start by converting to
60723  # unix format.
60724  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60725  new_path=`$CYGPATH -u "$path"`
60726
60727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60730  # "foo.exe" is OK but "foo" is an error.
60731  #
60732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60733  # It is also a way to make sure we got the proper file name for the real test later on.
60734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60735  if test "x$test_shortpath" = x; then
60736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60737$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60738    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60739  fi
60740
60741  # Call helper function which possibly converts this using DOS-style short mode.
60742  # If so, the updated path is stored in $new_path.
60743
60744  input_path="$new_path"
60745  # Check if we need to convert this using DOS-style short mode. If the path
60746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60747  # take no chances and rewrite it.
60748  # Note: m4 eats our [], so we need to use [ and ] instead.
60749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60750  if test "x$has_forbidden_chars" != x; then
60751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60755      # Going to short mode and back again did indeed matter. Since short mode is
60756      # case insensitive, let's make it lowercase to improve readability.
60757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60758      # Now convert it back to Unix-style (cygpath)
60759      input_path=`$CYGPATH -u "$shortmode_path"`
60760      new_path="$input_path"
60761    fi
60762  fi
60763
60764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60765  if test "x$test_cygdrive_prefix" = x; then
60766    # As a simple fix, exclude /usr/bin since it's not a real path.
60767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60769      # a path prefixed by /cygdrive for fixpath to work.
60770      new_path="$CYGWIN_ROOT_PATH$input_path"
60771    fi
60772  fi
60773
60774
60775  if test "x$path" != "x$new_path"; then
60776    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60778$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60779  fi
60780
60781    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60782
60783  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60784  has_colon=`$ECHO $path | $GREP ^.:`
60785  new_path="$path"
60786  if test "x$has_colon" = x; then
60787    # Not in mixed or Windows style, start by that.
60788    new_path=`cmd //c echo $path`
60789  fi
60790
60791
60792  input_path="$new_path"
60793  # Check if we need to convert this using DOS-style short mode. If the path
60794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60795  # take no chances and rewrite it.
60796  # Note: m4 eats our [], so we need to use [ and ] instead.
60797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60798  if test "x$has_forbidden_chars" != x; then
60799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60801  fi
60802
60803
60804  windows_path="$new_path"
60805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60806    unix_path=`$CYGPATH -u "$windows_path"`
60807    new_path="$unix_path"
60808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60810    new_path="$unix_path"
60811  fi
60812
60813  if test "x$path" != "x$new_path"; then
60814    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60816$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60817  fi
60818
60819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60821
60822    else
60823      # We're on a unix platform. Hooray! :)
60824      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60825      has_space=`$ECHO "$path" | $GREP " "`
60826      if test "x$has_space" != x; then
60827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60828$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60829        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60830      fi
60831
60832      # Use eval to expand a potential ~
60833      eval path="$path"
60834      if test ! -f "$path" && test ! -d "$path"; then
60835        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60836      fi
60837
60838      if test -d "$path"; then
60839        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60840      else
60841        dir="`$DIRNAME "$path"`"
60842        base="`$BASENAME "$path"`"
60843        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60844      fi
60845    fi
60846  fi
60847
60848
60849  # Only process if variable expands to non-empty
60850
60851  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60853
60854  # Input might be given as Windows format, start by converting to
60855  # unix format.
60856  path="$POTENTIAL_FREETYPE_LIB_PATH"
60857  new_path=`$CYGPATH -u "$path"`
60858
60859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60862  # "foo.exe" is OK but "foo" is an error.
60863  #
60864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60865  # It is also a way to make sure we got the proper file name for the real test later on.
60866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60867  if test "x$test_shortpath" = x; then
60868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60869$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60870    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60871  fi
60872
60873  # Call helper function which possibly converts this using DOS-style short mode.
60874  # If so, the updated path is stored in $new_path.
60875
60876  input_path="$new_path"
60877  # Check if we need to convert this using DOS-style short mode. If the path
60878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60879  # take no chances and rewrite it.
60880  # Note: m4 eats our [], so we need to use [ and ] instead.
60881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60882  if test "x$has_forbidden_chars" != x; then
60883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60887      # Going to short mode and back again did indeed matter. Since short mode is
60888      # case insensitive, let's make it lowercase to improve readability.
60889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60890      # Now convert it back to Unix-style (cygpath)
60891      input_path=`$CYGPATH -u "$shortmode_path"`
60892      new_path="$input_path"
60893    fi
60894  fi
60895
60896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60897  if test "x$test_cygdrive_prefix" = x; then
60898    # As a simple fix, exclude /usr/bin since it's not a real path.
60899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60901      # a path prefixed by /cygdrive for fixpath to work.
60902      new_path="$CYGWIN_ROOT_PATH$input_path"
60903    fi
60904  fi
60905
60906
60907  if test "x$path" != "x$new_path"; then
60908    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60910$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60911  fi
60912
60913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60914
60915  path="$POTENTIAL_FREETYPE_LIB_PATH"
60916  has_colon=`$ECHO $path | $GREP ^.:`
60917  new_path="$path"
60918  if test "x$has_colon" = x; then
60919    # Not in mixed or Windows style, start by that.
60920    new_path=`cmd //c echo $path`
60921  fi
60922
60923
60924  input_path="$new_path"
60925  # Check if we need to convert this using DOS-style short mode. If the path
60926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60927  # take no chances and rewrite it.
60928  # Note: m4 eats our [], so we need to use [ and ] instead.
60929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60930  if test "x$has_forbidden_chars" != x; then
60931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60933  fi
60934
60935
60936  windows_path="$new_path"
60937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60938    unix_path=`$CYGPATH -u "$windows_path"`
60939    new_path="$unix_path"
60940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60942    new_path="$unix_path"
60943  fi
60944
60945  if test "x$path" != "x$new_path"; then
60946    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60948$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60949  fi
60950
60951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60953
60954    else
60955      # We're on a unix platform. Hooray! :)
60956      path="$POTENTIAL_FREETYPE_LIB_PATH"
60957      has_space=`$ECHO "$path" | $GREP " "`
60958      if test "x$has_space" != x; then
60959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60960$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60961        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60962      fi
60963
60964      # Use eval to expand a potential ~
60965      eval path="$path"
60966      if test ! -f "$path" && test ! -d "$path"; then
60967        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60968      fi
60969
60970      if test -d "$path"; then
60971        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60972      else
60973        dir="`$DIRNAME "$path"`"
60974        base="`$BASENAME "$path"`"
60975        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60976      fi
60977    fi
60978  fi
60979
60980
60981    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60983$as_echo_n "checking for freetype includes... " >&6; }
60984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60985$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60986    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60988$as_echo_n "checking for freetype libraries... " >&6; }
60989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60990$as_echo "$FREETYPE_LIB_PATH" >&6; }
60991  fi
60992
60993
60994          if test "x$FOUND_FREETYPE" != xyes; then
60995            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60996
60997  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60998  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60999  METHOD="well-known location"
61000
61001  # Let's start with an optimistic view of the world :-)
61002  FOUND_FREETYPE=yes
61003
61004  # First look for the canonical freetype main include file ft2build.h.
61005  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61006    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61007    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61008    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61009      # Fail.
61010      FOUND_FREETYPE=no
61011    fi
61012  fi
61013
61014  if test "x$FOUND_FREETYPE" = xyes; then
61015    # Include file found, let's continue the sanity check.
61016    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61017$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61018
61019    # Reset to default value
61020    FREETYPE_BASE_NAME=freetype
61021    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61022    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61023      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61024          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61025        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61026        # for the .6 version explicitly.
61027        FREETYPE_BASE_NAME=freetype.6
61028        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61029        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61030$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61031      else
61032        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61033$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61034        FOUND_FREETYPE=no
61035      fi
61036    else
61037      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61038        # On Windows, we will need both .lib and .dll file.
61039        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61040          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61041$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61042          FOUND_FREETYPE=no
61043        fi
61044      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61045          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61046        # Found lib in isa dir, use that instead.
61047        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61048        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61049$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61050      fi
61051    fi
61052  fi
61053
61054  if test "x$FOUND_FREETYPE" = xyes; then
61055
61056  # Only process if variable expands to non-empty
61057
61058  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61059    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61060
61061  # Input might be given as Windows format, start by converting to
61062  # unix format.
61063  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61064  new_path=`$CYGPATH -u "$path"`
61065
61066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61069  # "foo.exe" is OK but "foo" is an error.
61070  #
61071  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61072  # It is also a way to make sure we got the proper file name for the real test later on.
61073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61074  if test "x$test_shortpath" = x; then
61075    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61076$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61077    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61078  fi
61079
61080  # Call helper function which possibly converts this using DOS-style short mode.
61081  # If so, the updated path is stored in $new_path.
61082
61083  input_path="$new_path"
61084  # Check if we need to convert this using DOS-style short mode. If the path
61085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61086  # take no chances and rewrite it.
61087  # Note: m4 eats our [], so we need to use [ and ] instead.
61088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61089  if test "x$has_forbidden_chars" != x; then
61090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61094      # Going to short mode and back again did indeed matter. Since short mode is
61095      # case insensitive, let's make it lowercase to improve readability.
61096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61097      # Now convert it back to Unix-style (cygpath)
61098      input_path=`$CYGPATH -u "$shortmode_path"`
61099      new_path="$input_path"
61100    fi
61101  fi
61102
61103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61104  if test "x$test_cygdrive_prefix" = x; then
61105    # As a simple fix, exclude /usr/bin since it's not a real path.
61106    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61108      # a path prefixed by /cygdrive for fixpath to work.
61109      new_path="$CYGWIN_ROOT_PATH$input_path"
61110    fi
61111  fi
61112
61113
61114  if test "x$path" != "x$new_path"; then
61115    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61117$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61118  fi
61119
61120    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61121
61122  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61123  has_colon=`$ECHO $path | $GREP ^.:`
61124  new_path="$path"
61125  if test "x$has_colon" = x; then
61126    # Not in mixed or Windows style, start by that.
61127    new_path=`cmd //c echo $path`
61128  fi
61129
61130
61131  input_path="$new_path"
61132  # Check if we need to convert this using DOS-style short mode. If the path
61133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61134  # take no chances and rewrite it.
61135  # Note: m4 eats our [], so we need to use [ and ] instead.
61136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61137  if test "x$has_forbidden_chars" != x; then
61138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61140  fi
61141
61142
61143  windows_path="$new_path"
61144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61145    unix_path=`$CYGPATH -u "$windows_path"`
61146    new_path="$unix_path"
61147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61149    new_path="$unix_path"
61150  fi
61151
61152  if test "x$path" != "x$new_path"; then
61153    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61155$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61156  fi
61157
61158  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61159  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61160
61161    else
61162      # We're on a unix platform. Hooray! :)
61163      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61164      has_space=`$ECHO "$path" | $GREP " "`
61165      if test "x$has_space" != x; then
61166        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61167$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61168        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61169      fi
61170
61171      # Use eval to expand a potential ~
61172      eval path="$path"
61173      if test ! -f "$path" && test ! -d "$path"; then
61174        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61175      fi
61176
61177      if test -d "$path"; then
61178        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61179      else
61180        dir="`$DIRNAME "$path"`"
61181        base="`$BASENAME "$path"`"
61182        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61183      fi
61184    fi
61185  fi
61186
61187
61188  # Only process if variable expands to non-empty
61189
61190  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61192
61193  # Input might be given as Windows format, start by converting to
61194  # unix format.
61195  path="$POTENTIAL_FREETYPE_LIB_PATH"
61196  new_path=`$CYGPATH -u "$path"`
61197
61198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61201  # "foo.exe" is OK but "foo" is an error.
61202  #
61203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61204  # It is also a way to make sure we got the proper file name for the real test later on.
61205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61206  if test "x$test_shortpath" = x; then
61207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61208$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61209    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61210  fi
61211
61212  # Call helper function which possibly converts this using DOS-style short mode.
61213  # If so, the updated path is stored in $new_path.
61214
61215  input_path="$new_path"
61216  # Check if we need to convert this using DOS-style short mode. If the path
61217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61218  # take no chances and rewrite it.
61219  # Note: m4 eats our [], so we need to use [ and ] instead.
61220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61221  if test "x$has_forbidden_chars" != x; then
61222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61226      # Going to short mode and back again did indeed matter. Since short mode is
61227      # case insensitive, let's make it lowercase to improve readability.
61228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61229      # Now convert it back to Unix-style (cygpath)
61230      input_path=`$CYGPATH -u "$shortmode_path"`
61231      new_path="$input_path"
61232    fi
61233  fi
61234
61235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61236  if test "x$test_cygdrive_prefix" = x; then
61237    # As a simple fix, exclude /usr/bin since it's not a real path.
61238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61240      # a path prefixed by /cygdrive for fixpath to work.
61241      new_path="$CYGWIN_ROOT_PATH$input_path"
61242    fi
61243  fi
61244
61245
61246  if test "x$path" != "x$new_path"; then
61247    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61249$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61250  fi
61251
61252    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61253
61254  path="$POTENTIAL_FREETYPE_LIB_PATH"
61255  has_colon=`$ECHO $path | $GREP ^.:`
61256  new_path="$path"
61257  if test "x$has_colon" = x; then
61258    # Not in mixed or Windows style, start by that.
61259    new_path=`cmd //c echo $path`
61260  fi
61261
61262
61263  input_path="$new_path"
61264  # Check if we need to convert this using DOS-style short mode. If the path
61265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61266  # take no chances and rewrite it.
61267  # Note: m4 eats our [], so we need to use [ and ] instead.
61268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61269  if test "x$has_forbidden_chars" != x; then
61270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61272  fi
61273
61274
61275  windows_path="$new_path"
61276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61277    unix_path=`$CYGPATH -u "$windows_path"`
61278    new_path="$unix_path"
61279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61281    new_path="$unix_path"
61282  fi
61283
61284  if test "x$path" != "x$new_path"; then
61285    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61287$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61288  fi
61289
61290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61292
61293    else
61294      # We're on a unix platform. Hooray! :)
61295      path="$POTENTIAL_FREETYPE_LIB_PATH"
61296      has_space=`$ECHO "$path" | $GREP " "`
61297      if test "x$has_space" != x; then
61298        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61299$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61300        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61301      fi
61302
61303      # Use eval to expand a potential ~
61304      eval path="$path"
61305      if test ! -f "$path" && test ! -d "$path"; then
61306        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61307      fi
61308
61309      if test -d "$path"; then
61310        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61311      else
61312        dir="`$DIRNAME "$path"`"
61313        base="`$BASENAME "$path"`"
61314        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61315      fi
61316    fi
61317  fi
61318
61319
61320    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61322$as_echo_n "checking for freetype includes... " >&6; }
61323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61324$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61325    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61327$as_echo_n "checking for freetype libraries... " >&6; }
61328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61329$as_echo "$FREETYPE_LIB_PATH" >&6; }
61330  fi
61331
61332          fi
61333
61334          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61335            if test "x$FOUND_FREETYPE" != xyes; then
61336              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61337              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61338
61339  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61340  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61341  METHOD="well-known location"
61342
61343  # Let's start with an optimistic view of the world :-)
61344  FOUND_FREETYPE=yes
61345
61346  # First look for the canonical freetype main include file ft2build.h.
61347  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61348    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61349    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61350    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61351      # Fail.
61352      FOUND_FREETYPE=no
61353    fi
61354  fi
61355
61356  if test "x$FOUND_FREETYPE" = xyes; then
61357    # Include file found, let's continue the sanity check.
61358    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61359$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61360
61361    # Reset to default value
61362    FREETYPE_BASE_NAME=freetype
61363    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61364    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61365      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61366          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61367        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61368        # for the .6 version explicitly.
61369        FREETYPE_BASE_NAME=freetype.6
61370        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61371        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61372$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61373      else
61374        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61375$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61376        FOUND_FREETYPE=no
61377      fi
61378    else
61379      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61380        # On Windows, we will need both .lib and .dll file.
61381        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61382          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61383$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61384          FOUND_FREETYPE=no
61385        fi
61386      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61387          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61388        # Found lib in isa dir, use that instead.
61389        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61390        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61391$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61392      fi
61393    fi
61394  fi
61395
61396  if test "x$FOUND_FREETYPE" = xyes; then
61397
61398  # Only process if variable expands to non-empty
61399
61400  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61401    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61402
61403  # Input might be given as Windows format, start by converting to
61404  # unix format.
61405  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61406  new_path=`$CYGPATH -u "$path"`
61407
61408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61411  # "foo.exe" is OK but "foo" is an error.
61412  #
61413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61414  # It is also a way to make sure we got the proper file name for the real test later on.
61415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61416  if test "x$test_shortpath" = x; then
61417    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61418$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61419    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61420  fi
61421
61422  # Call helper function which possibly converts this using DOS-style short mode.
61423  # If so, the updated path is stored in $new_path.
61424
61425  input_path="$new_path"
61426  # Check if we need to convert this using DOS-style short mode. If the path
61427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61428  # take no chances and rewrite it.
61429  # Note: m4 eats our [], so we need to use [ and ] instead.
61430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61431  if test "x$has_forbidden_chars" != x; then
61432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61436      # Going to short mode and back again did indeed matter. Since short mode is
61437      # case insensitive, let's make it lowercase to improve readability.
61438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61439      # Now convert it back to Unix-style (cygpath)
61440      input_path=`$CYGPATH -u "$shortmode_path"`
61441      new_path="$input_path"
61442    fi
61443  fi
61444
61445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61446  if test "x$test_cygdrive_prefix" = x; then
61447    # As a simple fix, exclude /usr/bin since it's not a real path.
61448    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61450      # a path prefixed by /cygdrive for fixpath to work.
61451      new_path="$CYGWIN_ROOT_PATH$input_path"
61452    fi
61453  fi
61454
61455
61456  if test "x$path" != "x$new_path"; then
61457    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61459$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61460  fi
61461
61462    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61463
61464  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61465  has_colon=`$ECHO $path | $GREP ^.:`
61466  new_path="$path"
61467  if test "x$has_colon" = x; then
61468    # Not in mixed or Windows style, start by that.
61469    new_path=`cmd //c echo $path`
61470  fi
61471
61472
61473  input_path="$new_path"
61474  # Check if we need to convert this using DOS-style short mode. If the path
61475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61476  # take no chances and rewrite it.
61477  # Note: m4 eats our [], so we need to use [ and ] instead.
61478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61479  if test "x$has_forbidden_chars" != x; then
61480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61482  fi
61483
61484
61485  windows_path="$new_path"
61486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61487    unix_path=`$CYGPATH -u "$windows_path"`
61488    new_path="$unix_path"
61489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61491    new_path="$unix_path"
61492  fi
61493
61494  if test "x$path" != "x$new_path"; then
61495    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61497$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61498  fi
61499
61500  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61501  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61502
61503    else
61504      # We're on a unix platform. Hooray! :)
61505      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61506      has_space=`$ECHO "$path" | $GREP " "`
61507      if test "x$has_space" != x; then
61508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61509$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61510        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61511      fi
61512
61513      # Use eval to expand a potential ~
61514      eval path="$path"
61515      if test ! -f "$path" && test ! -d "$path"; then
61516        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61517      fi
61518
61519      if test -d "$path"; then
61520        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61521      else
61522        dir="`$DIRNAME "$path"`"
61523        base="`$BASENAME "$path"`"
61524        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61525      fi
61526    fi
61527  fi
61528
61529
61530  # Only process if variable expands to non-empty
61531
61532  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61534
61535  # Input might be given as Windows format, start by converting to
61536  # unix format.
61537  path="$POTENTIAL_FREETYPE_LIB_PATH"
61538  new_path=`$CYGPATH -u "$path"`
61539
61540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61543  # "foo.exe" is OK but "foo" is an error.
61544  #
61545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61546  # It is also a way to make sure we got the proper file name for the real test later on.
61547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61548  if test "x$test_shortpath" = x; then
61549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61550$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61551    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61552  fi
61553
61554  # Call helper function which possibly converts this using DOS-style short mode.
61555  # If so, the updated path is stored in $new_path.
61556
61557  input_path="$new_path"
61558  # Check if we need to convert this using DOS-style short mode. If the path
61559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61560  # take no chances and rewrite it.
61561  # Note: m4 eats our [], so we need to use [ and ] instead.
61562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61563  if test "x$has_forbidden_chars" != x; then
61564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61568      # Going to short mode and back again did indeed matter. Since short mode is
61569      # case insensitive, let's make it lowercase to improve readability.
61570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61571      # Now convert it back to Unix-style (cygpath)
61572      input_path=`$CYGPATH -u "$shortmode_path"`
61573      new_path="$input_path"
61574    fi
61575  fi
61576
61577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61578  if test "x$test_cygdrive_prefix" = x; then
61579    # As a simple fix, exclude /usr/bin since it's not a real path.
61580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61582      # a path prefixed by /cygdrive for fixpath to work.
61583      new_path="$CYGWIN_ROOT_PATH$input_path"
61584    fi
61585  fi
61586
61587
61588  if test "x$path" != "x$new_path"; then
61589    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61591$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61592  fi
61593
61594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61595
61596  path="$POTENTIAL_FREETYPE_LIB_PATH"
61597  has_colon=`$ECHO $path | $GREP ^.:`
61598  new_path="$path"
61599  if test "x$has_colon" = x; then
61600    # Not in mixed or Windows style, start by that.
61601    new_path=`cmd //c echo $path`
61602  fi
61603
61604
61605  input_path="$new_path"
61606  # Check if we need to convert this using DOS-style short mode. If the path
61607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61608  # take no chances and rewrite it.
61609  # Note: m4 eats our [], so we need to use [ and ] instead.
61610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61611  if test "x$has_forbidden_chars" != x; then
61612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61614  fi
61615
61616
61617  windows_path="$new_path"
61618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61619    unix_path=`$CYGPATH -u "$windows_path"`
61620    new_path="$unix_path"
61621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61623    new_path="$unix_path"
61624  fi
61625
61626  if test "x$path" != "x$new_path"; then
61627    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61629$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61630  fi
61631
61632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61634
61635    else
61636      # We're on a unix platform. Hooray! :)
61637      path="$POTENTIAL_FREETYPE_LIB_PATH"
61638      has_space=`$ECHO "$path" | $GREP " "`
61639      if test "x$has_space" != x; then
61640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61641$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61642        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61643      fi
61644
61645      # Use eval to expand a potential ~
61646      eval path="$path"
61647      if test ! -f "$path" && test ! -d "$path"; then
61648        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61649      fi
61650
61651      if test -d "$path"; then
61652        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61653      else
61654        dir="`$DIRNAME "$path"`"
61655        base="`$BASENAME "$path"`"
61656        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61657      fi
61658    fi
61659  fi
61660
61661
61662    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61664$as_echo_n "checking for freetype includes... " >&6; }
61665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61666$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61667    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61669$as_echo_n "checking for freetype libraries... " >&6; }
61670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61671$as_echo "$FREETYPE_LIB_PATH" >&6; }
61672  fi
61673
61674            fi
61675          fi
61676
61677          if test "x$FOUND_FREETYPE" != xyes; then
61678            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
61679
61680  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61681  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61682  METHOD="well-known location"
61683
61684  # Let's start with an optimistic view of the world :-)
61685  FOUND_FREETYPE=yes
61686
61687  # First look for the canonical freetype main include file ft2build.h.
61688  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61689    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61690    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61691    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61692      # Fail.
61693      FOUND_FREETYPE=no
61694    fi
61695  fi
61696
61697  if test "x$FOUND_FREETYPE" = xyes; then
61698    # Include file found, let's continue the sanity check.
61699    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61700$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61701
61702    # Reset to default value
61703    FREETYPE_BASE_NAME=freetype
61704    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61705    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61706      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61707          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61708        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61709        # for the .6 version explicitly.
61710        FREETYPE_BASE_NAME=freetype.6
61711        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61712        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61713$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61714      else
61715        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61716$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61717        FOUND_FREETYPE=no
61718      fi
61719    else
61720      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61721        # On Windows, we will need both .lib and .dll file.
61722        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61723          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61724$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61725          FOUND_FREETYPE=no
61726        fi
61727      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61728          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61729        # Found lib in isa dir, use that instead.
61730        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61731        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61732$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61733      fi
61734    fi
61735  fi
61736
61737  if test "x$FOUND_FREETYPE" = xyes; then
61738
61739  # Only process if variable expands to non-empty
61740
61741  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61743
61744  # Input might be given as Windows format, start by converting to
61745  # unix format.
61746  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61747  new_path=`$CYGPATH -u "$path"`
61748
61749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61752  # "foo.exe" is OK but "foo" is an error.
61753  #
61754  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61755  # It is also a way to make sure we got the proper file name for the real test later on.
61756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61757  if test "x$test_shortpath" = x; then
61758    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61759$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61760    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61761  fi
61762
61763  # Call helper function which possibly converts this using DOS-style short mode.
61764  # If so, the updated path is stored in $new_path.
61765
61766  input_path="$new_path"
61767  # Check if we need to convert this using DOS-style short mode. If the path
61768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61769  # take no chances and rewrite it.
61770  # Note: m4 eats our [], so we need to use [ and ] instead.
61771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61772  if test "x$has_forbidden_chars" != x; then
61773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61777      # Going to short mode and back again did indeed matter. Since short mode is
61778      # case insensitive, let's make it lowercase to improve readability.
61779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61780      # Now convert it back to Unix-style (cygpath)
61781      input_path=`$CYGPATH -u "$shortmode_path"`
61782      new_path="$input_path"
61783    fi
61784  fi
61785
61786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61787  if test "x$test_cygdrive_prefix" = x; then
61788    # As a simple fix, exclude /usr/bin since it's not a real path.
61789    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61791      # a path prefixed by /cygdrive for fixpath to work.
61792      new_path="$CYGWIN_ROOT_PATH$input_path"
61793    fi
61794  fi
61795
61796
61797  if test "x$path" != "x$new_path"; then
61798    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61800$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61801  fi
61802
61803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61804
61805  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61806  has_colon=`$ECHO $path | $GREP ^.:`
61807  new_path="$path"
61808  if test "x$has_colon" = x; then
61809    # Not in mixed or Windows style, start by that.
61810    new_path=`cmd //c echo $path`
61811  fi
61812
61813
61814  input_path="$new_path"
61815  # Check if we need to convert this using DOS-style short mode. If the path
61816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61817  # take no chances and rewrite it.
61818  # Note: m4 eats our [], so we need to use [ and ] instead.
61819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61820  if test "x$has_forbidden_chars" != x; then
61821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61823  fi
61824
61825
61826  windows_path="$new_path"
61827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61828    unix_path=`$CYGPATH -u "$windows_path"`
61829    new_path="$unix_path"
61830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61832    new_path="$unix_path"
61833  fi
61834
61835  if test "x$path" != "x$new_path"; then
61836    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61838$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61839  fi
61840
61841  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61842  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61843
61844    else
61845      # We're on a unix platform. Hooray! :)
61846      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61847      has_space=`$ECHO "$path" | $GREP " "`
61848      if test "x$has_space" != x; then
61849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61850$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61851        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61852      fi
61853
61854      # Use eval to expand a potential ~
61855      eval path="$path"
61856      if test ! -f "$path" && test ! -d "$path"; then
61857        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61858      fi
61859
61860      if test -d "$path"; then
61861        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61862      else
61863        dir="`$DIRNAME "$path"`"
61864        base="`$BASENAME "$path"`"
61865        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61866      fi
61867    fi
61868  fi
61869
61870
61871  # Only process if variable expands to non-empty
61872
61873  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61875
61876  # Input might be given as Windows format, start by converting to
61877  # unix format.
61878  path="$POTENTIAL_FREETYPE_LIB_PATH"
61879  new_path=`$CYGPATH -u "$path"`
61880
61881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61884  # "foo.exe" is OK but "foo" is an error.
61885  #
61886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61887  # It is also a way to make sure we got the proper file name for the real test later on.
61888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61889  if test "x$test_shortpath" = x; then
61890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61891$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61892    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61893  fi
61894
61895  # Call helper function which possibly converts this using DOS-style short mode.
61896  # If so, the updated path is stored in $new_path.
61897
61898  input_path="$new_path"
61899  # Check if we need to convert this using DOS-style short mode. If the path
61900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61901  # take no chances and rewrite it.
61902  # Note: m4 eats our [], so we need to use [ and ] instead.
61903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61904  if test "x$has_forbidden_chars" != x; then
61905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61909      # Going to short mode and back again did indeed matter. Since short mode is
61910      # case insensitive, let's make it lowercase to improve readability.
61911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61912      # Now convert it back to Unix-style (cygpath)
61913      input_path=`$CYGPATH -u "$shortmode_path"`
61914      new_path="$input_path"
61915    fi
61916  fi
61917
61918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61919  if test "x$test_cygdrive_prefix" = x; then
61920    # As a simple fix, exclude /usr/bin since it's not a real path.
61921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61923      # a path prefixed by /cygdrive for fixpath to work.
61924      new_path="$CYGWIN_ROOT_PATH$input_path"
61925    fi
61926  fi
61927
61928
61929  if test "x$path" != "x$new_path"; then
61930    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61932$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61933  fi
61934
61935    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61936
61937  path="$POTENTIAL_FREETYPE_LIB_PATH"
61938  has_colon=`$ECHO $path | $GREP ^.:`
61939  new_path="$path"
61940  if test "x$has_colon" = x; then
61941    # Not in mixed or Windows style, start by that.
61942    new_path=`cmd //c echo $path`
61943  fi
61944
61945
61946  input_path="$new_path"
61947  # Check if we need to convert this using DOS-style short mode. If the path
61948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61949  # take no chances and rewrite it.
61950  # Note: m4 eats our [], so we need to use [ and ] instead.
61951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61952  if test "x$has_forbidden_chars" != x; then
61953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61955  fi
61956
61957
61958  windows_path="$new_path"
61959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61960    unix_path=`$CYGPATH -u "$windows_path"`
61961    new_path="$unix_path"
61962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61964    new_path="$unix_path"
61965  fi
61966
61967  if test "x$path" != "x$new_path"; then
61968    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61970$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61971  fi
61972
61973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61975
61976    else
61977      # We're on a unix platform. Hooray! :)
61978      path="$POTENTIAL_FREETYPE_LIB_PATH"
61979      has_space=`$ECHO "$path" | $GREP " "`
61980      if test "x$has_space" != x; then
61981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61982$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61983        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61984      fi
61985
61986      # Use eval to expand a potential ~
61987      eval path="$path"
61988      if test ! -f "$path" && test ! -d "$path"; then
61989        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61990      fi
61991
61992      if test -d "$path"; then
61993        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61994      else
61995        dir="`$DIRNAME "$path"`"
61996        base="`$BASENAME "$path"`"
61997        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61998      fi
61999    fi
62000  fi
62001
62002
62003    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62005$as_echo_n "checking for freetype includes... " >&6; }
62006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62007$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62008    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62010$as_echo_n "checking for freetype libraries... " >&6; }
62011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62012$as_echo "$FREETYPE_LIB_PATH" >&6; }
62013  fi
62014
62015          fi
62016
62017          if test "x$FOUND_FREETYPE" != xyes; then
62018            FREETYPE_BASE_DIR="$SYSROOT/usr"
62019            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62020
62021  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62022  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62023  METHOD="well-known location"
62024
62025  # Let's start with an optimistic view of the world :-)
62026  FOUND_FREETYPE=yes
62027
62028  # First look for the canonical freetype main include file ft2build.h.
62029  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62030    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62031    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62032    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62033      # Fail.
62034      FOUND_FREETYPE=no
62035    fi
62036  fi
62037
62038  if test "x$FOUND_FREETYPE" = xyes; then
62039    # Include file found, let's continue the sanity check.
62040    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62041$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62042
62043    # Reset to default value
62044    FREETYPE_BASE_NAME=freetype
62045    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62046    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62047      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62048          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62049        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62050        # for the .6 version explicitly.
62051        FREETYPE_BASE_NAME=freetype.6
62052        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62053        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62054$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62055      else
62056        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62057$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62058        FOUND_FREETYPE=no
62059      fi
62060    else
62061      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62062        # On Windows, we will need both .lib and .dll file.
62063        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62064          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62065$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62066          FOUND_FREETYPE=no
62067        fi
62068      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62069          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62070        # Found lib in isa dir, use that instead.
62071        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62072        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62073$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62074      fi
62075    fi
62076  fi
62077
62078  if test "x$FOUND_FREETYPE" = xyes; then
62079
62080  # Only process if variable expands to non-empty
62081
62082  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62083    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62084
62085  # Input might be given as Windows format, start by converting to
62086  # unix format.
62087  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62088  new_path=`$CYGPATH -u "$path"`
62089
62090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62093  # "foo.exe" is OK but "foo" is an error.
62094  #
62095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62096  # It is also a way to make sure we got the proper file name for the real test later on.
62097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62098  if test "x$test_shortpath" = x; then
62099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62100$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62101    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62102  fi
62103
62104  # Call helper function which possibly converts this using DOS-style short mode.
62105  # If so, the updated path is stored in $new_path.
62106
62107  input_path="$new_path"
62108  # Check if we need to convert this using DOS-style short mode. If the path
62109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62110  # take no chances and rewrite it.
62111  # Note: m4 eats our [], so we need to use [ and ] instead.
62112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62113  if test "x$has_forbidden_chars" != x; then
62114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62118      # Going to short mode and back again did indeed matter. Since short mode is
62119      # case insensitive, let's make it lowercase to improve readability.
62120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62121      # Now convert it back to Unix-style (cygpath)
62122      input_path=`$CYGPATH -u "$shortmode_path"`
62123      new_path="$input_path"
62124    fi
62125  fi
62126
62127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62128  if test "x$test_cygdrive_prefix" = x; then
62129    # As a simple fix, exclude /usr/bin since it's not a real path.
62130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62132      # a path prefixed by /cygdrive for fixpath to work.
62133      new_path="$CYGWIN_ROOT_PATH$input_path"
62134    fi
62135  fi
62136
62137
62138  if test "x$path" != "x$new_path"; then
62139    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62141$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62142  fi
62143
62144    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62145
62146  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62147  has_colon=`$ECHO $path | $GREP ^.:`
62148  new_path="$path"
62149  if test "x$has_colon" = x; then
62150    # Not in mixed or Windows style, start by that.
62151    new_path=`cmd //c echo $path`
62152  fi
62153
62154
62155  input_path="$new_path"
62156  # Check if we need to convert this using DOS-style short mode. If the path
62157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62158  # take no chances and rewrite it.
62159  # Note: m4 eats our [], so we need to use [ and ] instead.
62160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62161  if test "x$has_forbidden_chars" != x; then
62162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62164  fi
62165
62166
62167  windows_path="$new_path"
62168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62169    unix_path=`$CYGPATH -u "$windows_path"`
62170    new_path="$unix_path"
62171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62173    new_path="$unix_path"
62174  fi
62175
62176  if test "x$path" != "x$new_path"; then
62177    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62179$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62180  fi
62181
62182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62184
62185    else
62186      # We're on a unix platform. Hooray! :)
62187      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62188      has_space=`$ECHO "$path" | $GREP " "`
62189      if test "x$has_space" != x; then
62190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62191$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62192        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62193      fi
62194
62195      # Use eval to expand a potential ~
62196      eval path="$path"
62197      if test ! -f "$path" && test ! -d "$path"; then
62198        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62199      fi
62200
62201      if test -d "$path"; then
62202        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62203      else
62204        dir="`$DIRNAME "$path"`"
62205        base="`$BASENAME "$path"`"
62206        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62207      fi
62208    fi
62209  fi
62210
62211
62212  # Only process if variable expands to non-empty
62213
62214  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62216
62217  # Input might be given as Windows format, start by converting to
62218  # unix format.
62219  path="$POTENTIAL_FREETYPE_LIB_PATH"
62220  new_path=`$CYGPATH -u "$path"`
62221
62222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62225  # "foo.exe" is OK but "foo" is an error.
62226  #
62227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62228  # It is also a way to make sure we got the proper file name for the real test later on.
62229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62230  if test "x$test_shortpath" = x; then
62231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62232$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62233    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62234  fi
62235
62236  # Call helper function which possibly converts this using DOS-style short mode.
62237  # If so, the updated path is stored in $new_path.
62238
62239  input_path="$new_path"
62240  # Check if we need to convert this using DOS-style short mode. If the path
62241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62242  # take no chances and rewrite it.
62243  # Note: m4 eats our [], so we need to use [ and ] instead.
62244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62245  if test "x$has_forbidden_chars" != x; then
62246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62250      # Going to short mode and back again did indeed matter. Since short mode is
62251      # case insensitive, let's make it lowercase to improve readability.
62252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62253      # Now convert it back to Unix-style (cygpath)
62254      input_path=`$CYGPATH -u "$shortmode_path"`
62255      new_path="$input_path"
62256    fi
62257  fi
62258
62259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62260  if test "x$test_cygdrive_prefix" = x; then
62261    # As a simple fix, exclude /usr/bin since it's not a real path.
62262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62264      # a path prefixed by /cygdrive for fixpath to work.
62265      new_path="$CYGWIN_ROOT_PATH$input_path"
62266    fi
62267  fi
62268
62269
62270  if test "x$path" != "x$new_path"; then
62271    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62273$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62274  fi
62275
62276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62277
62278  path="$POTENTIAL_FREETYPE_LIB_PATH"
62279  has_colon=`$ECHO $path | $GREP ^.:`
62280  new_path="$path"
62281  if test "x$has_colon" = x; then
62282    # Not in mixed or Windows style, start by that.
62283    new_path=`cmd //c echo $path`
62284  fi
62285
62286
62287  input_path="$new_path"
62288  # Check if we need to convert this using DOS-style short mode. If the path
62289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62290  # take no chances and rewrite it.
62291  # Note: m4 eats our [], so we need to use [ and ] instead.
62292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62293  if test "x$has_forbidden_chars" != x; then
62294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62296  fi
62297
62298
62299  windows_path="$new_path"
62300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62301    unix_path=`$CYGPATH -u "$windows_path"`
62302    new_path="$unix_path"
62303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62305    new_path="$unix_path"
62306  fi
62307
62308  if test "x$path" != "x$new_path"; then
62309    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62311$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62312  fi
62313
62314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62316
62317    else
62318      # We're on a unix platform. Hooray! :)
62319      path="$POTENTIAL_FREETYPE_LIB_PATH"
62320      has_space=`$ECHO "$path" | $GREP " "`
62321      if test "x$has_space" != x; then
62322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62323$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62325      fi
62326
62327      # Use eval to expand a potential ~
62328      eval path="$path"
62329      if test ! -f "$path" && test ! -d "$path"; then
62330        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62331      fi
62332
62333      if test -d "$path"; then
62334        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62335      else
62336        dir="`$DIRNAME "$path"`"
62337        base="`$BASENAME "$path"`"
62338        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62339      fi
62340    fi
62341  fi
62342
62343
62344    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62346$as_echo_n "checking for freetype includes... " >&6; }
62347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62348$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62349    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62350    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62351$as_echo_n "checking for freetype libraries... " >&6; }
62352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62353$as_echo "$FREETYPE_LIB_PATH" >&6; }
62354  fi
62355
62356            else
62357
62358  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62359  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62360  METHOD="well-known location"
62361
62362  # Let's start with an optimistic view of the world :-)
62363  FOUND_FREETYPE=yes
62364
62365  # First look for the canonical freetype main include file ft2build.h.
62366  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62367    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62368    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62369    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62370      # Fail.
62371      FOUND_FREETYPE=no
62372    fi
62373  fi
62374
62375  if test "x$FOUND_FREETYPE" = xyes; then
62376    # Include file found, let's continue the sanity check.
62377    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62378$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62379
62380    # Reset to default value
62381    FREETYPE_BASE_NAME=freetype
62382    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62383    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62384      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62385          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62386        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62387        # for the .6 version explicitly.
62388        FREETYPE_BASE_NAME=freetype.6
62389        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62390        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62391$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62392      else
62393        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62394$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62395        FOUND_FREETYPE=no
62396      fi
62397    else
62398      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62399        # On Windows, we will need both .lib and .dll file.
62400        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62401          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62402$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62403          FOUND_FREETYPE=no
62404        fi
62405      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62406          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62407        # Found lib in isa dir, use that instead.
62408        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62409        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62410$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62411      fi
62412    fi
62413  fi
62414
62415  if test "x$FOUND_FREETYPE" = xyes; then
62416
62417  # Only process if variable expands to non-empty
62418
62419  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62421
62422  # Input might be given as Windows format, start by converting to
62423  # unix format.
62424  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62425  new_path=`$CYGPATH -u "$path"`
62426
62427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62430  # "foo.exe" is OK but "foo" is an error.
62431  #
62432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62433  # It is also a way to make sure we got the proper file name for the real test later on.
62434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62435  if test "x$test_shortpath" = x; then
62436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62437$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62438    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62439  fi
62440
62441  # Call helper function which possibly converts this using DOS-style short mode.
62442  # If so, the updated path is stored in $new_path.
62443
62444  input_path="$new_path"
62445  # Check if we need to convert this using DOS-style short mode. If the path
62446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62447  # take no chances and rewrite it.
62448  # Note: m4 eats our [], so we need to use [ and ] instead.
62449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62450  if test "x$has_forbidden_chars" != x; then
62451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62455      # Going to short mode and back again did indeed matter. Since short mode is
62456      # case insensitive, let's make it lowercase to improve readability.
62457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62458      # Now convert it back to Unix-style (cygpath)
62459      input_path=`$CYGPATH -u "$shortmode_path"`
62460      new_path="$input_path"
62461    fi
62462  fi
62463
62464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62465  if test "x$test_cygdrive_prefix" = x; then
62466    # As a simple fix, exclude /usr/bin since it's not a real path.
62467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62469      # a path prefixed by /cygdrive for fixpath to work.
62470      new_path="$CYGWIN_ROOT_PATH$input_path"
62471    fi
62472  fi
62473
62474
62475  if test "x$path" != "x$new_path"; then
62476    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62478$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62479  fi
62480
62481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62482
62483  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62484  has_colon=`$ECHO $path | $GREP ^.:`
62485  new_path="$path"
62486  if test "x$has_colon" = x; then
62487    # Not in mixed or Windows style, start by that.
62488    new_path=`cmd //c echo $path`
62489  fi
62490
62491
62492  input_path="$new_path"
62493  # Check if we need to convert this using DOS-style short mode. If the path
62494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62495  # take no chances and rewrite it.
62496  # Note: m4 eats our [], so we need to use [ and ] instead.
62497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62498  if test "x$has_forbidden_chars" != x; then
62499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62501  fi
62502
62503
62504  windows_path="$new_path"
62505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62506    unix_path=`$CYGPATH -u "$windows_path"`
62507    new_path="$unix_path"
62508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62510    new_path="$unix_path"
62511  fi
62512
62513  if test "x$path" != "x$new_path"; then
62514    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62516$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62517  fi
62518
62519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62521
62522    else
62523      # We're on a unix platform. Hooray! :)
62524      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62525      has_space=`$ECHO "$path" | $GREP " "`
62526      if test "x$has_space" != x; then
62527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62528$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62529        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62530      fi
62531
62532      # Use eval to expand a potential ~
62533      eval path="$path"
62534      if test ! -f "$path" && test ! -d "$path"; then
62535        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62536      fi
62537
62538      if test -d "$path"; then
62539        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62540      else
62541        dir="`$DIRNAME "$path"`"
62542        base="`$BASENAME "$path"`"
62543        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62544      fi
62545    fi
62546  fi
62547
62548
62549  # Only process if variable expands to non-empty
62550
62551  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62553
62554  # Input might be given as Windows format, start by converting to
62555  # unix format.
62556  path="$POTENTIAL_FREETYPE_LIB_PATH"
62557  new_path=`$CYGPATH -u "$path"`
62558
62559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62562  # "foo.exe" is OK but "foo" is an error.
62563  #
62564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62565  # It is also a way to make sure we got the proper file name for the real test later on.
62566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62567  if test "x$test_shortpath" = x; then
62568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62569$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62570    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62571  fi
62572
62573  # Call helper function which possibly converts this using DOS-style short mode.
62574  # If so, the updated path is stored in $new_path.
62575
62576  input_path="$new_path"
62577  # Check if we need to convert this using DOS-style short mode. If the path
62578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62579  # take no chances and rewrite it.
62580  # Note: m4 eats our [], so we need to use [ and ] instead.
62581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62582  if test "x$has_forbidden_chars" != x; then
62583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62587      # Going to short mode and back again did indeed matter. Since short mode is
62588      # case insensitive, let's make it lowercase to improve readability.
62589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62590      # Now convert it back to Unix-style (cygpath)
62591      input_path=`$CYGPATH -u "$shortmode_path"`
62592      new_path="$input_path"
62593    fi
62594  fi
62595
62596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62597  if test "x$test_cygdrive_prefix" = x; then
62598    # As a simple fix, exclude /usr/bin since it's not a real path.
62599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62601      # a path prefixed by /cygdrive for fixpath to work.
62602      new_path="$CYGWIN_ROOT_PATH$input_path"
62603    fi
62604  fi
62605
62606
62607  if test "x$path" != "x$new_path"; then
62608    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62611  fi
62612
62613    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62614
62615  path="$POTENTIAL_FREETYPE_LIB_PATH"
62616  has_colon=`$ECHO $path | $GREP ^.:`
62617  new_path="$path"
62618  if test "x$has_colon" = x; then
62619    # Not in mixed or Windows style, start by that.
62620    new_path=`cmd //c echo $path`
62621  fi
62622
62623
62624  input_path="$new_path"
62625  # Check if we need to convert this using DOS-style short mode. If the path
62626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62627  # take no chances and rewrite it.
62628  # Note: m4 eats our [], so we need to use [ and ] instead.
62629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62630  if test "x$has_forbidden_chars" != x; then
62631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62633  fi
62634
62635
62636  windows_path="$new_path"
62637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62638    unix_path=`$CYGPATH -u "$windows_path"`
62639    new_path="$unix_path"
62640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62642    new_path="$unix_path"
62643  fi
62644
62645  if test "x$path" != "x$new_path"; then
62646    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62648$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62649  fi
62650
62651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62653
62654    else
62655      # We're on a unix platform. Hooray! :)
62656      path="$POTENTIAL_FREETYPE_LIB_PATH"
62657      has_space=`$ECHO "$path" | $GREP " "`
62658      if test "x$has_space" != x; then
62659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62660$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62661        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62662      fi
62663
62664      # Use eval to expand a potential ~
62665      eval path="$path"
62666      if test ! -f "$path" && test ! -d "$path"; then
62667        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62668      fi
62669
62670      if test -d "$path"; then
62671        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62672      else
62673        dir="`$DIRNAME "$path"`"
62674        base="`$BASENAME "$path"`"
62675        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62676      fi
62677    fi
62678  fi
62679
62680
62681    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62683$as_echo_n "checking for freetype includes... " >&6; }
62684    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62685$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62686    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62687    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62688$as_echo_n "checking for freetype libraries... " >&6; }
62689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62690$as_echo "$FREETYPE_LIB_PATH" >&6; }
62691  fi
62692
62693              if test "x$FOUND_FREETYPE" != xyes; then
62694
62695  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62696  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62697  METHOD="well-known location"
62698
62699  # Let's start with an optimistic view of the world :-)
62700  FOUND_FREETYPE=yes
62701
62702  # First look for the canonical freetype main include file ft2build.h.
62703  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62704    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62705    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62706    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62707      # Fail.
62708      FOUND_FREETYPE=no
62709    fi
62710  fi
62711
62712  if test "x$FOUND_FREETYPE" = xyes; then
62713    # Include file found, let's continue the sanity check.
62714    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62715$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62716
62717    # Reset to default value
62718    FREETYPE_BASE_NAME=freetype
62719    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62720    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62721      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62722          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62723        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62724        # for the .6 version explicitly.
62725        FREETYPE_BASE_NAME=freetype.6
62726        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62727        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62728$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62729      else
62730        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62731$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62732        FOUND_FREETYPE=no
62733      fi
62734    else
62735      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62736        # On Windows, we will need both .lib and .dll file.
62737        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62738          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62739$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62740          FOUND_FREETYPE=no
62741        fi
62742      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62743          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62744        # Found lib in isa dir, use that instead.
62745        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62746        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62747$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62748      fi
62749    fi
62750  fi
62751
62752  if test "x$FOUND_FREETYPE" = xyes; then
62753
62754  # Only process if variable expands to non-empty
62755
62756  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62757    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62758
62759  # Input might be given as Windows format, start by converting to
62760  # unix format.
62761  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62762  new_path=`$CYGPATH -u "$path"`
62763
62764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62767  # "foo.exe" is OK but "foo" is an error.
62768  #
62769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62770  # It is also a way to make sure we got the proper file name for the real test later on.
62771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62772  if test "x$test_shortpath" = x; then
62773    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62774$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62775    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62776  fi
62777
62778  # Call helper function which possibly converts this using DOS-style short mode.
62779  # If so, the updated path is stored in $new_path.
62780
62781  input_path="$new_path"
62782  # Check if we need to convert this using DOS-style short mode. If the path
62783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62784  # take no chances and rewrite it.
62785  # Note: m4 eats our [], so we need to use [ and ] instead.
62786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62787  if test "x$has_forbidden_chars" != x; then
62788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62792      # Going to short mode and back again did indeed matter. Since short mode is
62793      # case insensitive, let's make it lowercase to improve readability.
62794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62795      # Now convert it back to Unix-style (cygpath)
62796      input_path=`$CYGPATH -u "$shortmode_path"`
62797      new_path="$input_path"
62798    fi
62799  fi
62800
62801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62802  if test "x$test_cygdrive_prefix" = x; then
62803    # As a simple fix, exclude /usr/bin since it's not a real path.
62804    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62806      # a path prefixed by /cygdrive for fixpath to work.
62807      new_path="$CYGWIN_ROOT_PATH$input_path"
62808    fi
62809  fi
62810
62811
62812  if test "x$path" != "x$new_path"; then
62813    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62815$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62816  fi
62817
62818    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62819
62820  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62821  has_colon=`$ECHO $path | $GREP ^.:`
62822  new_path="$path"
62823  if test "x$has_colon" = x; then
62824    # Not in mixed or Windows style, start by that.
62825    new_path=`cmd //c echo $path`
62826  fi
62827
62828
62829  input_path="$new_path"
62830  # Check if we need to convert this using DOS-style short mode. If the path
62831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62832  # take no chances and rewrite it.
62833  # Note: m4 eats our [], so we need to use [ and ] instead.
62834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62835  if test "x$has_forbidden_chars" != x; then
62836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62838  fi
62839
62840
62841  windows_path="$new_path"
62842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62843    unix_path=`$CYGPATH -u "$windows_path"`
62844    new_path="$unix_path"
62845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62847    new_path="$unix_path"
62848  fi
62849
62850  if test "x$path" != "x$new_path"; then
62851    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62853$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62854  fi
62855
62856  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62857  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62858
62859    else
62860      # We're on a unix platform. Hooray! :)
62861      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62862      has_space=`$ECHO "$path" | $GREP " "`
62863      if test "x$has_space" != x; then
62864        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62865$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62866        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62867      fi
62868
62869      # Use eval to expand a potential ~
62870      eval path="$path"
62871      if test ! -f "$path" && test ! -d "$path"; then
62872        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62873      fi
62874
62875      if test -d "$path"; then
62876        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62877      else
62878        dir="`$DIRNAME "$path"`"
62879        base="`$BASENAME "$path"`"
62880        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62881      fi
62882    fi
62883  fi
62884
62885
62886  # Only process if variable expands to non-empty
62887
62888  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62890
62891  # Input might be given as Windows format, start by converting to
62892  # unix format.
62893  path="$POTENTIAL_FREETYPE_LIB_PATH"
62894  new_path=`$CYGPATH -u "$path"`
62895
62896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62899  # "foo.exe" is OK but "foo" is an error.
62900  #
62901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62902  # It is also a way to make sure we got the proper file name for the real test later on.
62903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62904  if test "x$test_shortpath" = x; then
62905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62906$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62907    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62908  fi
62909
62910  # Call helper function which possibly converts this using DOS-style short mode.
62911  # If so, the updated path is stored in $new_path.
62912
62913  input_path="$new_path"
62914  # Check if we need to convert this using DOS-style short mode. If the path
62915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62916  # take no chances and rewrite it.
62917  # Note: m4 eats our [], so we need to use [ and ] instead.
62918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62919  if test "x$has_forbidden_chars" != x; then
62920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62924      # Going to short mode and back again did indeed matter. Since short mode is
62925      # case insensitive, let's make it lowercase to improve readability.
62926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62927      # Now convert it back to Unix-style (cygpath)
62928      input_path=`$CYGPATH -u "$shortmode_path"`
62929      new_path="$input_path"
62930    fi
62931  fi
62932
62933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62934  if test "x$test_cygdrive_prefix" = x; then
62935    # As a simple fix, exclude /usr/bin since it's not a real path.
62936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62938      # a path prefixed by /cygdrive for fixpath to work.
62939      new_path="$CYGWIN_ROOT_PATH$input_path"
62940    fi
62941  fi
62942
62943
62944  if test "x$path" != "x$new_path"; then
62945    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62947$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62948  fi
62949
62950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62951
62952  path="$POTENTIAL_FREETYPE_LIB_PATH"
62953  has_colon=`$ECHO $path | $GREP ^.:`
62954  new_path="$path"
62955  if test "x$has_colon" = x; then
62956    # Not in mixed or Windows style, start by that.
62957    new_path=`cmd //c echo $path`
62958  fi
62959
62960
62961  input_path="$new_path"
62962  # Check if we need to convert this using DOS-style short mode. If the path
62963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62964  # take no chances and rewrite it.
62965  # Note: m4 eats our [], so we need to use [ and ] instead.
62966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62967  if test "x$has_forbidden_chars" != x; then
62968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62970  fi
62971
62972
62973  windows_path="$new_path"
62974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62975    unix_path=`$CYGPATH -u "$windows_path"`
62976    new_path="$unix_path"
62977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62979    new_path="$unix_path"
62980  fi
62981
62982  if test "x$path" != "x$new_path"; then
62983    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62985$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62986  fi
62987
62988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62990
62991    else
62992      # We're on a unix platform. Hooray! :)
62993      path="$POTENTIAL_FREETYPE_LIB_PATH"
62994      has_space=`$ECHO "$path" | $GREP " "`
62995      if test "x$has_space" != x; then
62996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62997$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62998        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62999      fi
63000
63001      # Use eval to expand a potential ~
63002      eval path="$path"
63003      if test ! -f "$path" && test ! -d "$path"; then
63004        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63005      fi
63006
63007      if test -d "$path"; then
63008        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63009      else
63010        dir="`$DIRNAME "$path"`"
63011        base="`$BASENAME "$path"`"
63012        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63013      fi
63014    fi
63015  fi
63016
63017
63018    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63020$as_echo_n "checking for freetype includes... " >&6; }
63021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63022$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63023    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63025$as_echo_n "checking for freetype libraries... " >&6; }
63026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63027$as_echo "$FREETYPE_LIB_PATH" >&6; }
63028  fi
63029
63030              fi
63031            fi
63032          fi
63033        fi
63034      fi # end check in well-known locations
63035
63036      if test "x$FOUND_FREETYPE" != xyes; then
63037
63038  # Print a helpful message on how to acquire the necessary build dependency.
63039  # freetype is the help tag: freetype, cups, alsa etc
63040  MISSING_DEPENDENCY=freetype
63041
63042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63043    cygwin_help $MISSING_DEPENDENCY
63044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63045    msys_help $MISSING_DEPENDENCY
63046  else
63047    PKGHANDLER_COMMAND=
63048
63049    case $PKGHANDLER in
63050      apt-get)
63051        apt_help     $MISSING_DEPENDENCY ;;
63052      yum)
63053        yum_help     $MISSING_DEPENDENCY ;;
63054      port)
63055        port_help    $MISSING_DEPENDENCY ;;
63056      pkgutil)
63057        pkgutil_help $MISSING_DEPENDENCY ;;
63058      pkgadd)
63059        pkgadd_help  $MISSING_DEPENDENCY ;;
63060    esac
63061
63062    if test "x$PKGHANDLER_COMMAND" != x; then
63063      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63064    fi
63065  fi
63066
63067        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63068      fi
63069    fi # end user specified settings
63070
63071    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63072    if test "x$FREETYPE_CFLAGS" = x; then
63073
63074  # Only process if variable expands to non-empty
63075
63076  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63077    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63078
63079  # Input might be given as Windows format, start by converting to
63080  # unix format.
63081  path="$FREETYPE_INCLUDE_PATH"
63082  new_path=`$CYGPATH -u "$path"`
63083
63084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63087  # "foo.exe" is OK but "foo" is an error.
63088  #
63089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63090  # It is also a way to make sure we got the proper file name for the real test later on.
63091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63092  if test "x$test_shortpath" = x; then
63093    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63094$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63095    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63096  fi
63097
63098  # Call helper function which possibly converts this using DOS-style short mode.
63099  # If so, the updated path is stored in $new_path.
63100
63101  input_path="$new_path"
63102  # Check if we need to convert this using DOS-style short mode. If the path
63103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63104  # take no chances and rewrite it.
63105  # Note: m4 eats our [], so we need to use [ and ] instead.
63106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63107  if test "x$has_forbidden_chars" != x; then
63108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63112      # Going to short mode and back again did indeed matter. Since short mode is
63113      # case insensitive, let's make it lowercase to improve readability.
63114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63115      # Now convert it back to Unix-style (cygpath)
63116      input_path=`$CYGPATH -u "$shortmode_path"`
63117      new_path="$input_path"
63118    fi
63119  fi
63120
63121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63122  if test "x$test_cygdrive_prefix" = x; then
63123    # As a simple fix, exclude /usr/bin since it's not a real path.
63124    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63126      # a path prefixed by /cygdrive for fixpath to work.
63127      new_path="$CYGWIN_ROOT_PATH$input_path"
63128    fi
63129  fi
63130
63131
63132  if test "x$path" != "x$new_path"; then
63133    FREETYPE_INCLUDE_PATH="$new_path"
63134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63135$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63136  fi
63137
63138    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63139
63140  path="$FREETYPE_INCLUDE_PATH"
63141  has_colon=`$ECHO $path | $GREP ^.:`
63142  new_path="$path"
63143  if test "x$has_colon" = x; then
63144    # Not in mixed or Windows style, start by that.
63145    new_path=`cmd //c echo $path`
63146  fi
63147
63148
63149  input_path="$new_path"
63150  # Check if we need to convert this using DOS-style short mode. If the path
63151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63152  # take no chances and rewrite it.
63153  # Note: m4 eats our [], so we need to use [ and ] instead.
63154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63155  if test "x$has_forbidden_chars" != x; then
63156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63158  fi
63159
63160
63161  windows_path="$new_path"
63162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63163    unix_path=`$CYGPATH -u "$windows_path"`
63164    new_path="$unix_path"
63165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63167    new_path="$unix_path"
63168  fi
63169
63170  if test "x$path" != "x$new_path"; then
63171    FREETYPE_INCLUDE_PATH="$new_path"
63172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63173$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63174  fi
63175
63176  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63177  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63178
63179    else
63180      # We're on a unix platform. Hooray! :)
63181      path="$FREETYPE_INCLUDE_PATH"
63182      has_space=`$ECHO "$path" | $GREP " "`
63183      if test "x$has_space" != x; then
63184        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63185$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63186        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63187      fi
63188
63189      # Use eval to expand a potential ~
63190      eval path="$path"
63191      if test ! -f "$path" && test ! -d "$path"; then
63192        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63193      fi
63194
63195      if test -d "$path"; then
63196        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63197      else
63198        dir="`$DIRNAME "$path"`"
63199        base="`$BASENAME "$path"`"
63200        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63201      fi
63202    fi
63203  fi
63204
63205      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63206        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63207      else
63208        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63209      fi
63210    fi
63211
63212    if test "x$FREETYPE_LIBS" = x; then
63213
63214  # Only process if variable expands to non-empty
63215
63216  if test "x$FREETYPE_LIB_PATH" != x; then
63217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63218
63219  # Input might be given as Windows format, start by converting to
63220  # unix format.
63221  path="$FREETYPE_LIB_PATH"
63222  new_path=`$CYGPATH -u "$path"`
63223
63224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63227  # "foo.exe" is OK but "foo" is an error.
63228  #
63229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63230  # It is also a way to make sure we got the proper file name for the real test later on.
63231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63232  if test "x$test_shortpath" = x; then
63233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63234$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63235    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63236  fi
63237
63238  # Call helper function which possibly converts this using DOS-style short mode.
63239  # If so, the updated path is stored in $new_path.
63240
63241  input_path="$new_path"
63242  # Check if we need to convert this using DOS-style short mode. If the path
63243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63244  # take no chances and rewrite it.
63245  # Note: m4 eats our [], so we need to use [ and ] instead.
63246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63247  if test "x$has_forbidden_chars" != x; then
63248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63252      # Going to short mode and back again did indeed matter. Since short mode is
63253      # case insensitive, let's make it lowercase to improve readability.
63254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63255      # Now convert it back to Unix-style (cygpath)
63256      input_path=`$CYGPATH -u "$shortmode_path"`
63257      new_path="$input_path"
63258    fi
63259  fi
63260
63261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63262  if test "x$test_cygdrive_prefix" = x; then
63263    # As a simple fix, exclude /usr/bin since it's not a real path.
63264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63266      # a path prefixed by /cygdrive for fixpath to work.
63267      new_path="$CYGWIN_ROOT_PATH$input_path"
63268    fi
63269  fi
63270
63271
63272  if test "x$path" != "x$new_path"; then
63273    FREETYPE_LIB_PATH="$new_path"
63274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63275$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63276  fi
63277
63278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63279
63280  path="$FREETYPE_LIB_PATH"
63281  has_colon=`$ECHO $path | $GREP ^.:`
63282  new_path="$path"
63283  if test "x$has_colon" = x; then
63284    # Not in mixed or Windows style, start by that.
63285    new_path=`cmd //c echo $path`
63286  fi
63287
63288
63289  input_path="$new_path"
63290  # Check if we need to convert this using DOS-style short mode. If the path
63291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63292  # take no chances and rewrite it.
63293  # Note: m4 eats our [], so we need to use [ and ] instead.
63294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63295  if test "x$has_forbidden_chars" != x; then
63296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63298  fi
63299
63300
63301  windows_path="$new_path"
63302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63303    unix_path=`$CYGPATH -u "$windows_path"`
63304    new_path="$unix_path"
63305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63307    new_path="$unix_path"
63308  fi
63309
63310  if test "x$path" != "x$new_path"; then
63311    FREETYPE_LIB_PATH="$new_path"
63312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63313$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63314  fi
63315
63316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63318
63319    else
63320      # We're on a unix platform. Hooray! :)
63321      path="$FREETYPE_LIB_PATH"
63322      has_space=`$ECHO "$path" | $GREP " "`
63323      if test "x$has_space" != x; then
63324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63325$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63326        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63327      fi
63328
63329      # Use eval to expand a potential ~
63330      eval path="$path"
63331      if test ! -f "$path" && test ! -d "$path"; then
63332        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63333      fi
63334
63335      if test -d "$path"; then
63336        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63337      else
63338        dir="`$DIRNAME "$path"`"
63339        base="`$BASENAME "$path"`"
63340        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63341      fi
63342    fi
63343  fi
63344
63345      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63346        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63347      else
63348        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63349      fi
63350    fi
63351
63352    # Try to compile it
63353    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63354$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63355    ac_ext=cpp
63356ac_cpp='$CXXCPP $CPPFLAGS'
63357ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63358ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63359ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63360
63361    PREV_CXXCFLAGS="$CXXFLAGS"
63362    PREV_LIBS="$LIBS"
63363    PREV_CXX="$CXX"
63364    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63365    LIBS="$LIBS $FREETYPE_LIBS"
63366    CXX="$FIXPATH $CXX"
63367    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63368/* end confdefs.h.  */
63369
63370          #include<ft2build.h>
63371          #include FT_FREETYPE_H
63372          int main () {
63373            FT_Init_FreeType(NULL);
63374            return 0;
63375          }
63376
63377_ACEOF
63378if ac_fn_cxx_try_link "$LINENO"; then :
63379
63380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63381$as_echo "yes" >&6; }
63382
63383else
63384
63385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63386$as_echo "no" >&6; }
63387          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63388$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63389          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63390$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63391
63392
63393  # Print a helpful message on how to acquire the necessary build dependency.
63394  # freetype is the help tag: freetype, cups, alsa etc
63395  MISSING_DEPENDENCY=freetype
63396
63397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63398    cygwin_help $MISSING_DEPENDENCY
63399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63400    msys_help $MISSING_DEPENDENCY
63401  else
63402    PKGHANDLER_COMMAND=
63403
63404    case $PKGHANDLER in
63405      apt-get)
63406        apt_help     $MISSING_DEPENDENCY ;;
63407      yum)
63408        yum_help     $MISSING_DEPENDENCY ;;
63409      port)
63410        port_help    $MISSING_DEPENDENCY ;;
63411      pkgutil)
63412        pkgutil_help $MISSING_DEPENDENCY ;;
63413      pkgadd)
63414        pkgadd_help  $MISSING_DEPENDENCY ;;
63415    esac
63416
63417    if test "x$PKGHANDLER_COMMAND" != x; then
63418      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63419    fi
63420  fi
63421
63422
63423          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63424
63425
63426fi
63427rm -f core conftest.err conftest.$ac_objext \
63428    conftest$ac_exeext conftest.$ac_ext
63429    CXXCFLAGS="$PREV_CXXFLAGS"
63430    LIBS="$PREV_LIBS"
63431    CXX="$PREV_CXX"
63432    ac_ext=cpp
63433ac_cpp='$CXXCPP $CPPFLAGS'
63434ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63435ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63436ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63437
63438
63439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63440$as_echo_n "checking if we should bundle freetype... " >&6; }
63441    if test "x$BUNDLE_FREETYPE" = xyes; then
63442      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63443    fi
63444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63445$as_echo "$BUNDLE_FREETYPE" >&6; }
63446
63447  fi # end freetype needed
63448
63449
63450
63451
63452
63453
63454
63455# Check whether --with-alsa was given.
63456if test "${with_alsa+set}" = set; then :
63457  withval=$with_alsa;
63458fi
63459
63460
63461# Check whether --with-alsa-include was given.
63462if test "${with_alsa_include+set}" = set; then :
63463  withval=$with_alsa_include;
63464fi
63465
63466
63467# Check whether --with-alsa-lib was given.
63468if test "${with_alsa_lib+set}" = set; then :
63469  withval=$with_alsa_lib;
63470fi
63471
63472
63473  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63474    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63475        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63476        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63477      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63478$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63479    fi
63480    ALSA_CFLAGS=
63481    ALSA_LIBS=
63482  else
63483    ALSA_FOUND=no
63484
63485    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63486      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63487    fi
63488
63489    if test "x${with_alsa}" != x; then
63490      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63491      ALSA_CFLAGS="-I${with_alsa}/include"
63492      ALSA_FOUND=yes
63493    fi
63494    if test "x${with_alsa_include}" != x; then
63495      ALSA_CFLAGS="-I${with_alsa_include}"
63496      ALSA_FOUND=yes
63497    fi
63498    if test "x${with_alsa_lib}" != x; then
63499      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63500      ALSA_FOUND=yes
63501    fi
63502    # Do not try pkg-config if we have a sysroot set.
63503    if test "x$SYSROOT" = x; then
63504      if test "x$ALSA_FOUND" = xno; then
63505
63506pkg_failed=no
63507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63508$as_echo_n "checking for ALSA... " >&6; }
63509
63510if test -n "$ALSA_CFLAGS"; then
63511    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63512 elif test -n "$PKG_CONFIG"; then
63513    if test -n "$PKG_CONFIG" && \
63514    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63515  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63516  ac_status=$?
63517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63518  test $ac_status = 0; }; then
63519  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63520else
63521  pkg_failed=yes
63522fi
63523 else
63524    pkg_failed=untried
63525fi
63526if test -n "$ALSA_LIBS"; then
63527    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63528 elif test -n "$PKG_CONFIG"; then
63529    if test -n "$PKG_CONFIG" && \
63530    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63531  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63532  ac_status=$?
63533  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63534  test $ac_status = 0; }; then
63535  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63536else
63537  pkg_failed=yes
63538fi
63539 else
63540    pkg_failed=untried
63541fi
63542
63543
63544
63545if test $pkg_failed = yes; then
63546
63547if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63548        _pkg_short_errors_supported=yes
63549else
63550        _pkg_short_errors_supported=no
63551fi
63552        if test $_pkg_short_errors_supported = yes; then
63553	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63554        else
63555	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63556        fi
63557	# Put the nasty error message in config.log where it belongs
63558	echo "$ALSA_PKG_ERRORS" >&5
63559
63560	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63561$as_echo "no" >&6; }
63562                ALSA_FOUND=no
63563elif test $pkg_failed = untried; then
63564	ALSA_FOUND=no
63565else
63566	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63567	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63569$as_echo "yes" >&6; }
63570	ALSA_FOUND=yes
63571fi
63572      fi
63573    fi
63574    if test "x$ALSA_FOUND" = xno; then
63575      for ac_header in alsa/asoundlib.h
63576do :
63577  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63578if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63579  cat >>confdefs.h <<_ACEOF
63580#define HAVE_ALSA_ASOUNDLIB_H 1
63581_ACEOF
63582
63583            ALSA_FOUND=yes
63584            ALSA_CFLAGS=-Iignoreme
63585            ALSA_LIBS=-lasound
63586            DEFAULT_ALSA=yes
63587
63588else
63589  ALSA_FOUND=no
63590
63591fi
63592
63593done
63594
63595    fi
63596    if test "x$ALSA_FOUND" = xno; then
63597
63598  # Print a helpful message on how to acquire the necessary build dependency.
63599  # alsa is the help tag: freetype, cups, alsa etc
63600  MISSING_DEPENDENCY=alsa
63601
63602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63603    cygwin_help $MISSING_DEPENDENCY
63604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63605    msys_help $MISSING_DEPENDENCY
63606  else
63607    PKGHANDLER_COMMAND=
63608
63609    case $PKGHANDLER in
63610      apt-get)
63611        apt_help     $MISSING_DEPENDENCY ;;
63612      yum)
63613        yum_help     $MISSING_DEPENDENCY ;;
63614      port)
63615        port_help    $MISSING_DEPENDENCY ;;
63616      pkgutil)
63617        pkgutil_help $MISSING_DEPENDENCY ;;
63618      pkgadd)
63619        pkgadd_help  $MISSING_DEPENDENCY ;;
63620    esac
63621
63622    if test "x$PKGHANDLER_COMMAND" != x; then
63623      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63624    fi
63625  fi
63626
63627      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63628    fi
63629  fi
63630
63631
63632
63633
63634
63635
63636# Check whether --with-libffi was given.
63637if test "${with_libffi+set}" = set; then :
63638  withval=$with_libffi;
63639fi
63640
63641
63642# Check whether --with-libffi-include was given.
63643if test "${with_libffi_include+set}" = set; then :
63644  withval=$with_libffi_include;
63645fi
63646
63647
63648# Check whether --with-libffi-lib was given.
63649if test "${with_libffi_lib+set}" = set; then :
63650  withval=$with_libffi_lib;
63651fi
63652
63653
63654  if test "x$NEEDS_LIB_FFI" = xfalse; then
63655    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63656        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63657        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63658      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63659$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63660    fi
63661    LIBFFI_CFLAGS=
63662    LIBFFI_LIBS=
63663  else
63664    LIBFFI_FOUND=no
63665
63666    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63667      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63668    fi
63669
63670    if test "x${with_libffi}" != x; then
63671      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63672      LIBFFI_CFLAGS="-I${with_libffi}/include"
63673      LIBFFI_FOUND=yes
63674    fi
63675    if test "x${with_libffi_include}" != x; then
63676      LIBFFI_CFLAGS="-I${with_libffi_include}"
63677      LIBFFI_FOUND=yes
63678    fi
63679    if test "x${with_libffi_lib}" != x; then
63680      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63681      LIBFFI_FOUND=yes
63682    fi
63683    # Do not try pkg-config if we have a sysroot set.
63684    if test "x$SYSROOT" = x; then
63685      if test "x$LIBFFI_FOUND" = xno; then
63686        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63687
63688pkg_failed=no
63689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63690$as_echo_n "checking for LIBFFI... " >&6; }
63691
63692if test -n "$LIBFFI_CFLAGS"; then
63693    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63694 elif test -n "$PKG_CONFIG"; then
63695    if test -n "$PKG_CONFIG" && \
63696    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63697  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63698  ac_status=$?
63699  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63700  test $ac_status = 0; }; then
63701  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63702else
63703  pkg_failed=yes
63704fi
63705 else
63706    pkg_failed=untried
63707fi
63708if test -n "$LIBFFI_LIBS"; then
63709    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63710 elif test -n "$PKG_CONFIG"; then
63711    if test -n "$PKG_CONFIG" && \
63712    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63713  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63714  ac_status=$?
63715  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63716  test $ac_status = 0; }; then
63717  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63718else
63719  pkg_failed=yes
63720fi
63721 else
63722    pkg_failed=untried
63723fi
63724
63725
63726
63727if test $pkg_failed = yes; then
63728
63729if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63730        _pkg_short_errors_supported=yes
63731else
63732        _pkg_short_errors_supported=no
63733fi
63734        if test $_pkg_short_errors_supported = yes; then
63735	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63736        else
63737	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63738        fi
63739	# Put the nasty error message in config.log where it belongs
63740	echo "$LIBFFI_PKG_ERRORS" >&5
63741
63742	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63743$as_echo "no" >&6; }
63744                LIBFFI_FOUND=no
63745elif test $pkg_failed = untried; then
63746	LIBFFI_FOUND=no
63747else
63748	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63749	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63751$as_echo "yes" >&6; }
63752	LIBFFI_FOUND=yes
63753fi
63754      fi
63755    fi
63756    if test "x$LIBFFI_FOUND" = xno; then
63757      for ac_header in ffi.h
63758do :
63759  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63760if test "x$ac_cv_header_ffi_h" = xyes; then :
63761  cat >>confdefs.h <<_ACEOF
63762#define HAVE_FFI_H 1
63763_ACEOF
63764
63765            LIBFFI_FOUND=yes
63766            LIBFFI_CFLAGS=
63767            LIBFFI_LIBS=-lffi
63768
63769else
63770  LIBFFI_FOUND=no
63771
63772fi
63773
63774done
63775
63776    fi
63777    if test "x$LIBFFI_FOUND" = xno; then
63778
63779  # Print a helpful message on how to acquire the necessary build dependency.
63780  # ffi is the help tag: freetype, cups, alsa etc
63781  MISSING_DEPENDENCY=ffi
63782
63783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63784    cygwin_help $MISSING_DEPENDENCY
63785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63786    msys_help $MISSING_DEPENDENCY
63787  else
63788    PKGHANDLER_COMMAND=
63789
63790    case $PKGHANDLER in
63791      apt-get)
63792        apt_help     $MISSING_DEPENDENCY ;;
63793      yum)
63794        yum_help     $MISSING_DEPENDENCY ;;
63795      port)
63796        port_help    $MISSING_DEPENDENCY ;;
63797      pkgutil)
63798        pkgutil_help $MISSING_DEPENDENCY ;;
63799      pkgadd)
63800        pkgadd_help  $MISSING_DEPENDENCY ;;
63801    esac
63802
63803    if test "x$PKGHANDLER_COMMAND" != x; then
63804      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63805    fi
63806  fi
63807
63808      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63809    fi
63810
63811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63812$as_echo_n "checking if libffi works... " >&6; }
63813    ac_ext=c
63814ac_cpp='$CPP $CPPFLAGS'
63815ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63816ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63817ac_compiler_gnu=$ac_cv_c_compiler_gnu
63818
63819    OLD_CFLAGS="$CFLAGS"
63820    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63821    OLD_LIBS="$LIBS"
63822    LIBS="$LIBS $LIBFFI_LIBS"
63823    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63824/* end confdefs.h.  */
63825#include <ffi.h>
63826int
63827main ()
63828{
63829
63830          ffi_call(NULL, NULL, NULL, NULL);
63831          return 0;
63832
63833  ;
63834  return 0;
63835}
63836_ACEOF
63837if ac_fn_c_try_link "$LINENO"; then :
63838  LIBFFI_WORKS=yes
63839else
63840  LIBFFI_WORKS=no
63841
63842fi
63843rm -f core conftest.err conftest.$ac_objext \
63844    conftest$ac_exeext conftest.$ac_ext
63845    CFLAGS="$OLD_CFLAGS"
63846    LIBS="$OLD_LIBS"
63847    ac_ext=cpp
63848ac_cpp='$CXXCPP $CPPFLAGS'
63849ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63850ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63851ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63852
63853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63854$as_echo "$LIBFFI_WORKS" >&6; }
63855
63856    if test "x$LIBFFI_WORKS" = xno; then
63857
63858  # Print a helpful message on how to acquire the necessary build dependency.
63859  # ffi is the help tag: freetype, cups, alsa etc
63860  MISSING_DEPENDENCY=ffi
63861
63862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63863    cygwin_help $MISSING_DEPENDENCY
63864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63865    msys_help $MISSING_DEPENDENCY
63866  else
63867    PKGHANDLER_COMMAND=
63868
63869    case $PKGHANDLER in
63870      apt-get)
63871        apt_help     $MISSING_DEPENDENCY ;;
63872      yum)
63873        yum_help     $MISSING_DEPENDENCY ;;
63874      port)
63875        port_help    $MISSING_DEPENDENCY ;;
63876      pkgutil)
63877        pkgutil_help $MISSING_DEPENDENCY ;;
63878      pkgadd)
63879        pkgadd_help  $MISSING_DEPENDENCY ;;
63880    esac
63881
63882    if test "x$PKGHANDLER_COMMAND" != x; then
63883      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63884    fi
63885  fi
63886
63887      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63888    fi
63889  fi
63890
63891
63892
63893
63894
63895  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63896    # Extract the first word of "llvm-config", so it can be a program name with args.
63897set dummy llvm-config; ac_word=$2
63898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63899$as_echo_n "checking for $ac_word... " >&6; }
63900if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63901  $as_echo_n "(cached) " >&6
63902else
63903  if test -n "$LLVM_CONFIG"; then
63904  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63905else
63906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63907for as_dir in $PATH
63908do
63909  IFS=$as_save_IFS
63910  test -z "$as_dir" && as_dir=.
63911    for ac_exec_ext in '' $ac_executable_extensions; do
63912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63913    ac_cv_prog_LLVM_CONFIG="llvm-config"
63914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63915    break 2
63916  fi
63917done
63918  done
63919IFS=$as_save_IFS
63920
63921fi
63922fi
63923LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63924if test -n "$LLVM_CONFIG"; then
63925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63926$as_echo "$LLVM_CONFIG" >&6; }
63927else
63928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63929$as_echo "no" >&6; }
63930fi
63931
63932
63933
63934    if test "x$LLVM_CONFIG" != xllvm-config; then
63935      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63936    fi
63937
63938    llvm_components="jit mcjit engine nativecodegen native"
63939    unset LLVM_CFLAGS
63940    for flag in $("$LLVM_CONFIG" --cxxflags); do
63941      if echo "${flag}" | grep -q '^-[ID]'; then
63942        if test "${flag}" != "-D_DEBUG" ; then
63943          if test "${LLVM_CFLAGS}" != "" ; then
63944            LLVM_CFLAGS="${LLVM_CFLAGS} "
63945          fi
63946          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63947        fi
63948      fi
63949    done
63950    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63951    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63952
63953    unset LLVM_LDFLAGS
63954    for flag in $("${LLVM_CONFIG}" --ldflags); do
63955      if echo "${flag}" | grep -q '^-L'; then
63956        if test "${LLVM_LDFLAGS}" != ""; then
63957          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63958        fi
63959        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63960      fi
63961    done
63962
63963    unset LLVM_LIBS
63964    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63965      if echo "${flag}" | grep -q '^-l'; then
63966        if test "${LLVM_LIBS}" != ""; then
63967          LLVM_LIBS="${LLVM_LIBS} "
63968        fi
63969        LLVM_LIBS="${LLVM_LIBS}${flag}"
63970      fi
63971    done
63972
63973    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63974    # always properly detect -ltinfo
63975    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63976
63977
63978
63979
63980  fi
63981
63982
63983
63984# Check whether --with-libjpeg was given.
63985if test "${with_libjpeg+set}" = set; then :
63986  withval=$with_libjpeg;
63987fi
63988
63989
63990  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63991$as_echo_n "checking for which libjpeg to use... " >&6; }
63992  # default is bundled
63993  DEFAULT_LIBJPEG=bundled
63994  # if user didn't specify, use DEFAULT_LIBJPEG
63995  if test "x${with_libjpeg}" = "x"; then
63996    with_libjpeg=${DEFAULT_LIBJPEG}
63997  fi
63998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63999$as_echo "${with_libjpeg}" >&6; }
64000
64001  if test "x${with_libjpeg}" = "xbundled"; then
64002    USE_EXTERNAL_LIBJPEG=false
64003  elif test "x${with_libjpeg}" = "xsystem"; then
64004    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64005if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64006
64007else
64008   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64009fi
64010
64011
64012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64013$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64014if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64015  $as_echo_n "(cached) " >&6
64016else
64017  ac_check_lib_save_LIBS=$LIBS
64018LIBS="-ljpeg  $LIBS"
64019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64020/* end confdefs.h.  */
64021
64022/* Override any GCC internal prototype to avoid an error.
64023   Use char because int might match the return type of a GCC
64024   builtin and then its argument prototype would still apply.  */
64025#ifdef __cplusplus
64026extern "C"
64027#endif
64028char jpeg_CreateDecompress ();
64029int
64030main ()
64031{
64032return jpeg_CreateDecompress ();
64033  ;
64034  return 0;
64035}
64036_ACEOF
64037if ac_fn_cxx_try_link "$LINENO"; then :
64038  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64039else
64040  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64041fi
64042rm -f core conftest.err conftest.$ac_objext \
64043    conftest$ac_exeext conftest.$ac_ext
64044LIBS=$ac_check_lib_save_LIBS
64045fi
64046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64047$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64048if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64049  cat >>confdefs.h <<_ACEOF
64050#define HAVE_LIBJPEG 1
64051_ACEOF
64052
64053  LIBS="-ljpeg $LIBS"
64054
64055else
64056   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64057fi
64058
64059
64060    USE_EXTERNAL_LIBJPEG=true
64061  else
64062    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64063  fi
64064
64065
64066
64067
64068
64069# Check whether --with-giflib was given.
64070if test "${with_giflib+set}" = set; then :
64071  withval=$with_giflib;
64072fi
64073
64074
64075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64076$as_echo_n "checking for which giflib to use... " >&6; }
64077  # default is bundled
64078  DEFAULT_GIFLIB=bundled
64079  # if user didn't specify, use DEFAULT_GIFLIB
64080  if test "x${with_giflib}" = "x"; then
64081    with_giflib=${DEFAULT_GIFLIB}
64082  fi
64083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64084$as_echo "${with_giflib}" >&6; }
64085
64086  if test "x${with_giflib}" = "xbundled"; then
64087    USE_EXTERNAL_LIBGIF=false
64088  elif test "x${with_giflib}" = "xsystem"; then
64089    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64090if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64091
64092else
64093   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64094fi
64095
64096
64097    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64098$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64099if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64100  $as_echo_n "(cached) " >&6
64101else
64102  ac_check_lib_save_LIBS=$LIBS
64103LIBS="-lgif  $LIBS"
64104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64105/* end confdefs.h.  */
64106
64107/* Override any GCC internal prototype to avoid an error.
64108   Use char because int might match the return type of a GCC
64109   builtin and then its argument prototype would still apply.  */
64110#ifdef __cplusplus
64111extern "C"
64112#endif
64113char DGifGetCode ();
64114int
64115main ()
64116{
64117return DGifGetCode ();
64118  ;
64119  return 0;
64120}
64121_ACEOF
64122if ac_fn_cxx_try_link "$LINENO"; then :
64123  ac_cv_lib_gif_DGifGetCode=yes
64124else
64125  ac_cv_lib_gif_DGifGetCode=no
64126fi
64127rm -f core conftest.err conftest.$ac_objext \
64128    conftest$ac_exeext conftest.$ac_ext
64129LIBS=$ac_check_lib_save_LIBS
64130fi
64131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64132$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64133if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64134  cat >>confdefs.h <<_ACEOF
64135#define HAVE_LIBGIF 1
64136_ACEOF
64137
64138  LIBS="-lgif $LIBS"
64139
64140else
64141   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64142fi
64143
64144
64145    USE_EXTERNAL_LIBGIF=true
64146  else
64147    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64148  fi
64149
64150
64151
64152
64153
64154# Check whether --with-libpng was given.
64155if test "${with_libpng+set}" = set; then :
64156  withval=$with_libpng;
64157fi
64158
64159
64160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64161$as_echo_n "checking for which libpng to use... " >&6; }
64162
64163  # default is bundled
64164  DEFAULT_LIBPNG=bundled
64165  # if user didn't specify, use DEFAULT_LIBPNG
64166  if test "x${with_libpng}" = "x"; then
64167      with_libpng=${DEFAULT_LIBPNG}
64168  fi
64169
64170  if test "x${with_libpng}" = "xbundled"; then
64171      USE_EXTERNAL_LIBPNG=false
64172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64173$as_echo "bundled" >&6; }
64174  elif test "x${with_libpng}" = "xsystem"; then
64175
64176pkg_failed=no
64177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64178$as_echo_n "checking for PNG... " >&6; }
64179
64180if test -n "$PNG_CFLAGS"; then
64181    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64182 elif test -n "$PKG_CONFIG"; then
64183    if test -n "$PKG_CONFIG" && \
64184    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64185  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64186  ac_status=$?
64187  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64188  test $ac_status = 0; }; then
64189  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64190else
64191  pkg_failed=yes
64192fi
64193 else
64194    pkg_failed=untried
64195fi
64196if test -n "$PNG_LIBS"; then
64197    pkg_cv_PNG_LIBS="$PNG_LIBS"
64198 elif test -n "$PKG_CONFIG"; then
64199    if test -n "$PKG_CONFIG" && \
64200    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64201  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64202  ac_status=$?
64203  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64204  test $ac_status = 0; }; then
64205  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64206else
64207  pkg_failed=yes
64208fi
64209 else
64210    pkg_failed=untried
64211fi
64212
64213
64214
64215if test $pkg_failed = yes; then
64216
64217if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64218        _pkg_short_errors_supported=yes
64219else
64220        _pkg_short_errors_supported=no
64221fi
64222        if test $_pkg_short_errors_supported = yes; then
64223	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64224        else
64225	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64226        fi
64227	# Put the nasty error message in config.log where it belongs
64228	echo "$PNG_PKG_ERRORS" >&5
64229
64230	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64231$as_echo "no" >&6; }
64232                 LIBPNG_FOUND=no
64233elif test $pkg_failed = untried; then
64234	 LIBPNG_FOUND=no
64235else
64236	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64237	PNG_LIBS=$pkg_cv_PNG_LIBS
64238        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64239$as_echo "yes" >&6; }
64240	 LIBPNG_FOUND=yes
64241fi
64242      if test "x${LIBPNG_FOUND}" = "xyes"; then
64243          USE_EXTERNAL_LIBPNG=true
64244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64245$as_echo "system" >&6; }
64246      else
64247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64248$as_echo "system not found" >&6; }
64249          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64250      fi
64251  else
64252      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64253  fi
64254
64255
64256
64257
64258
64259# Check whether --with-zlib was given.
64260if test "${with_zlib+set}" = set; then :
64261  withval=$with_zlib;
64262fi
64263
64264
64265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64266$as_echo_n "checking for compress in -lz... " >&6; }
64267if ${ac_cv_lib_z_compress+:} false; then :
64268  $as_echo_n "(cached) " >&6
64269else
64270  ac_check_lib_save_LIBS=$LIBS
64271LIBS="-lz  $LIBS"
64272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64273/* end confdefs.h.  */
64274
64275/* Override any GCC internal prototype to avoid an error.
64276   Use char because int might match the return type of a GCC
64277   builtin and then its argument prototype would still apply.  */
64278#ifdef __cplusplus
64279extern "C"
64280#endif
64281char compress ();
64282int
64283main ()
64284{
64285return compress ();
64286  ;
64287  return 0;
64288}
64289_ACEOF
64290if ac_fn_cxx_try_link "$LINENO"; then :
64291  ac_cv_lib_z_compress=yes
64292else
64293  ac_cv_lib_z_compress=no
64294fi
64295rm -f core conftest.err conftest.$ac_objext \
64296    conftest$ac_exeext conftest.$ac_ext
64297LIBS=$ac_check_lib_save_LIBS
64298fi
64299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64300$as_echo "$ac_cv_lib_z_compress" >&6; }
64301if test "x$ac_cv_lib_z_compress" = xyes; then :
64302   ZLIB_FOUND=yes
64303else
64304   ZLIB_FOUND=no
64305fi
64306
64307
64308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64309$as_echo_n "checking for which zlib to use... " >&6; }
64310
64311  DEFAULT_ZLIB=system
64312  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64313    # On windows default is bundled...on others default is system
64314    DEFAULT_ZLIB=bundled
64315  fi
64316
64317  if test "x${ZLIB_FOUND}" != "xyes"; then
64318    # If we don't find any system...set default to bundled
64319    DEFAULT_ZLIB=bundled
64320  fi
64321
64322  # If user didn't specify, use DEFAULT_ZLIB
64323  if test "x${with_zlib}" = "x"; then
64324    with_zlib=${DEFAULT_ZLIB}
64325  fi
64326
64327  if test "x${with_zlib}" = "xbundled"; then
64328    USE_EXTERNAL_LIBZ=false
64329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64330$as_echo "bundled" >&6; }
64331  elif test "x${with_zlib}" = "xsystem"; then
64332    if test "x${ZLIB_FOUND}" = "xyes"; then
64333      USE_EXTERNAL_LIBZ=true
64334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64335$as_echo "system" >&6; }
64336    else
64337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64338$as_echo "system not found" >&6; }
64339      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64340    fi
64341  else
64342    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64343  fi
64344
64345
64346
64347
64348
64349# Check whether --with-lcms was given.
64350if test "${with_lcms+set}" = set; then :
64351  withval=$with_lcms;
64352fi
64353
64354
64355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64356$as_echo_n "checking for which lcms to use... " >&6; }
64357
64358  DEFAULT_LCMS=bundled
64359  # If user didn't specify, use DEFAULT_LCMS
64360  if test "x${with_lcms}" = "x"; then
64361      with_lcms=${DEFAULT_LCMS}
64362  fi
64363
64364  if test "x${with_lcms}" = "xbundled"; then
64365    USE_EXTERNAL_LCMS=false
64366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64367$as_echo "bundled" >&6; }
64368  elif test "x${with_lcms}" = "xsystem"; then
64369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64370$as_echo "system" >&6; }
64371
64372pkg_failed=no
64373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64374$as_echo_n "checking for LCMS... " >&6; }
64375
64376if test -n "$LCMS_CFLAGS"; then
64377    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64378 elif test -n "$PKG_CONFIG"; then
64379    if test -n "$PKG_CONFIG" && \
64380    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64381  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64382  ac_status=$?
64383  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64384  test $ac_status = 0; }; then
64385  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64386else
64387  pkg_failed=yes
64388fi
64389 else
64390    pkg_failed=untried
64391fi
64392if test -n "$LCMS_LIBS"; then
64393    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64394 elif test -n "$PKG_CONFIG"; then
64395    if test -n "$PKG_CONFIG" && \
64396    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64397  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64398  ac_status=$?
64399  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64400  test $ac_status = 0; }; then
64401  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64402else
64403  pkg_failed=yes
64404fi
64405 else
64406    pkg_failed=untried
64407fi
64408
64409
64410
64411if test $pkg_failed = yes; then
64412
64413if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64414        _pkg_short_errors_supported=yes
64415else
64416        _pkg_short_errors_supported=no
64417fi
64418        if test $_pkg_short_errors_supported = yes; then
64419	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64420        else
64421	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64422        fi
64423	# Put the nasty error message in config.log where it belongs
64424	echo "$LCMS_PKG_ERRORS" >&5
64425
64426	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64427$as_echo "no" >&6; }
64428                LCMS_FOUND=no
64429elif test $pkg_failed = untried; then
64430	LCMS_FOUND=no
64431else
64432	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64433	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64435$as_echo "yes" >&6; }
64436	LCMS_FOUND=yes
64437fi
64438    if test "x${LCMS_FOUND}" = "xyes"; then
64439      USE_EXTERNAL_LCMS=true
64440    else
64441      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64442    fi
64443  else
64444    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64445  fi
64446
64447
64448
64449
64450
64451
64452
64453
64454
64455
64456
64457  # Setup libm (the maths library)
64458  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64460$as_echo_n "checking for cos in -lm... " >&6; }
64461if ${ac_cv_lib_m_cos+:} false; then :
64462  $as_echo_n "(cached) " >&6
64463else
64464  ac_check_lib_save_LIBS=$LIBS
64465LIBS="-lm  $LIBS"
64466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64467/* end confdefs.h.  */
64468
64469/* Override any GCC internal prototype to avoid an error.
64470   Use char because int might match the return type of a GCC
64471   builtin and then its argument prototype would still apply.  */
64472#ifdef __cplusplus
64473extern "C"
64474#endif
64475char cos ();
64476int
64477main ()
64478{
64479return cos ();
64480  ;
64481  return 0;
64482}
64483_ACEOF
64484if ac_fn_cxx_try_link "$LINENO"; then :
64485  ac_cv_lib_m_cos=yes
64486else
64487  ac_cv_lib_m_cos=no
64488fi
64489rm -f core conftest.err conftest.$ac_objext \
64490    conftest$ac_exeext conftest.$ac_ext
64491LIBS=$ac_check_lib_save_LIBS
64492fi
64493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64494$as_echo "$ac_cv_lib_m_cos" >&6; }
64495if test "x$ac_cv_lib_m_cos" = xyes; then :
64496  cat >>confdefs.h <<_ACEOF
64497#define HAVE_LIBM 1
64498_ACEOF
64499
64500  LIBS="-lm $LIBS"
64501
64502else
64503
64504        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64505$as_echo "$as_me: Maths library was not found" >&6;}
64506
64507fi
64508
64509    LIBM="-lm"
64510  else
64511    LIBM=""
64512  fi
64513
64514
64515  # Setup libdl (for dynamic library loading)
64516  save_LIBS="$LIBS"
64517  LIBS=""
64518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64519$as_echo_n "checking for dlopen in -ldl... " >&6; }
64520if ${ac_cv_lib_dl_dlopen+:} false; then :
64521  $as_echo_n "(cached) " >&6
64522else
64523  ac_check_lib_save_LIBS=$LIBS
64524LIBS="-ldl  $LIBS"
64525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64526/* end confdefs.h.  */
64527
64528/* Override any GCC internal prototype to avoid an error.
64529   Use char because int might match the return type of a GCC
64530   builtin and then its argument prototype would still apply.  */
64531#ifdef __cplusplus
64532extern "C"
64533#endif
64534char dlopen ();
64535int
64536main ()
64537{
64538return dlopen ();
64539  ;
64540  return 0;
64541}
64542_ACEOF
64543if ac_fn_cxx_try_link "$LINENO"; then :
64544  ac_cv_lib_dl_dlopen=yes
64545else
64546  ac_cv_lib_dl_dlopen=no
64547fi
64548rm -f core conftest.err conftest.$ac_objext \
64549    conftest$ac_exeext conftest.$ac_ext
64550LIBS=$ac_check_lib_save_LIBS
64551fi
64552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64553$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64554if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64555  cat >>confdefs.h <<_ACEOF
64556#define HAVE_LIBDL 1
64557_ACEOF
64558
64559  LIBS="-ldl $LIBS"
64560
64561fi
64562
64563  LIBDL="$LIBS"
64564
64565  LIBS="$save_LIBS"
64566
64567  # Deprecated libraries, keep the flags for backwards compatibility
64568  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64569
64570
64571# Check whether --with-dxsdk was given.
64572if test "${with_dxsdk+set}" = set; then :
64573  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64574$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64575fi
64576
64577
64578
64579
64580# Check whether --with-dxsdk-lib was given.
64581if test "${with_dxsdk_lib+set}" = set; then :
64582  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64583$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64584fi
64585
64586
64587
64588
64589# Check whether --with-dxsdk-include was given.
64590if test "${with_dxsdk_include+set}" = set; then :
64591  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64592$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64593fi
64594
64595
64596  fi
64597
64598  # Control if libzip can use mmap. Available for purposes of overriding.
64599  LIBZIP_CAN_USE_MMAP=true
64600
64601
64602
64603  if test "$OPENJDK_TARGET_OS" = "solaris"; then
64604    # Find the root of the Solaris Studio installation from the compiler path
64605    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64606    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64608$as_echo_n "checking for libstlport.so.1... " >&6; }
64609    if test -f "$STLPORT_LIB"; then
64610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64611$as_echo "yes, $STLPORT_LIB" >&6; }
64612
64613  # Only process if variable expands to non-empty
64614
64615  if test "x$STLPORT_LIB" != x; then
64616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64617
64618  # Input might be given as Windows format, start by converting to
64619  # unix format.
64620  path="$STLPORT_LIB"
64621  new_path=`$CYGPATH -u "$path"`
64622
64623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64626  # "foo.exe" is OK but "foo" is an error.
64627  #
64628  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64629  # It is also a way to make sure we got the proper file name for the real test later on.
64630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64631  if test "x$test_shortpath" = x; then
64632    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64633$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64634    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64635  fi
64636
64637  # Call helper function which possibly converts this using DOS-style short mode.
64638  # If so, the updated path is stored in $new_path.
64639
64640  input_path="$new_path"
64641  # Check if we need to convert this using DOS-style short mode. If the path
64642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64643  # take no chances and rewrite it.
64644  # Note: m4 eats our [], so we need to use [ and ] instead.
64645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64646  if test "x$has_forbidden_chars" != x; then
64647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64651      # Going to short mode and back again did indeed matter. Since short mode is
64652      # case insensitive, let's make it lowercase to improve readability.
64653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64654      # Now convert it back to Unix-style (cygpath)
64655      input_path=`$CYGPATH -u "$shortmode_path"`
64656      new_path="$input_path"
64657    fi
64658  fi
64659
64660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64661  if test "x$test_cygdrive_prefix" = x; then
64662    # As a simple fix, exclude /usr/bin since it's not a real path.
64663    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64665      # a path prefixed by /cygdrive for fixpath to work.
64666      new_path="$CYGWIN_ROOT_PATH$input_path"
64667    fi
64668  fi
64669
64670
64671  if test "x$path" != "x$new_path"; then
64672    STLPORT_LIB="$new_path"
64673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64674$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64675  fi
64676
64677    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64678
64679  path="$STLPORT_LIB"
64680  has_colon=`$ECHO $path | $GREP ^.:`
64681  new_path="$path"
64682  if test "x$has_colon" = x; then
64683    # Not in mixed or Windows style, start by that.
64684    new_path=`cmd //c echo $path`
64685  fi
64686
64687
64688  input_path="$new_path"
64689  # Check if we need to convert this using DOS-style short mode. If the path
64690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64691  # take no chances and rewrite it.
64692  # Note: m4 eats our [], so we need to use [ and ] instead.
64693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64694  if test "x$has_forbidden_chars" != x; then
64695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64697  fi
64698
64699
64700  windows_path="$new_path"
64701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64702    unix_path=`$CYGPATH -u "$windows_path"`
64703    new_path="$unix_path"
64704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64706    new_path="$unix_path"
64707  fi
64708
64709  if test "x$path" != "x$new_path"; then
64710    STLPORT_LIB="$new_path"
64711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64712$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64713  fi
64714
64715  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64716  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64717
64718    else
64719      # We're on a unix platform. Hooray! :)
64720      path="$STLPORT_LIB"
64721      has_space=`$ECHO "$path" | $GREP " "`
64722      if test "x$has_space" != x; then
64723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64724$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64725        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64726      fi
64727
64728      # Use eval to expand a potential ~
64729      eval path="$path"
64730      if test ! -f "$path" && test ! -d "$path"; then
64731        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64732      fi
64733
64734      if test -d "$path"; then
64735        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64736      else
64737        dir="`$DIRNAME "$path"`"
64738        base="`$BASENAME "$path"`"
64739        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64740      fi
64741    fi
64742  fi
64743
64744    else
64745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64746$as_echo "no, not found at $STLPORT_LIB" >&6; }
64747      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64748    fi
64749
64750  fi
64751
64752
64753
64754
64755
64756
64757
64758
64759
64760
64761
64762
64763
64764
64765###############################################################################
64766#
64767# We need to do some final tweaking, when everything else is done.
64768#
64769###############################################################################
64770
64771
64772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64773$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64774
64775  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64776    ENABLE_INTREE_EC=yes
64777    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64778$as_echo "yes" >&6; }
64779  else
64780    ENABLE_INTREE_EC=no
64781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64782$as_echo "no" >&6; }
64783  fi
64784
64785
64786
64787
64788  # Check whether --enable-jtreg-failure-handler was given.
64789if test "${enable_jtreg_failure_handler+set}" = set; then :
64790  enableval=$enable_jtreg_failure_handler;
64791fi
64792
64793
64794  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64795$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64796
64797  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64798    if test "x$JT_HOME" = "x"; then
64799      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64800    else
64801      BUILD_FAILURE_HANDLER=true
64802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64803$as_echo "yes, forced" >&6; }
64804    fi
64805  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64806    BUILD_FAILURE_HANDLER=false
64807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64808$as_echo "no, forced" >&6; }
64809  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64810      || test "x$enable_jtreg_failure_handler" = "x"; then
64811    if test "x$JT_HOME" = "x"; then
64812      BUILD_FAILURE_HANDLER=false
64813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64814$as_echo "no, missing jtreg" >&6; }
64815    else
64816      BUILD_FAILURE_HANDLER=true
64817      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64818$as_echo "yes, jtreg present" >&6; }
64819    fi
64820  else
64821    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64822  fi
64823
64824
64825
64826
64827  # Check whether --enable-generate-classlist was given.
64828if test "${enable_generate_classlist+set}" = set; then :
64829  enableval=$enable_generate_classlist;
64830fi
64831
64832
64833  # Check if it's likely that it's possible to generate the classlist. Depending
64834  # on exact jvm configuration it could be possible anyway.
64835  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64836    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64837  else
64838    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64839  fi
64840
64841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64842$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64843  if test "x$enable_generate_classlist" = "xyes"; then
64844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64845$as_echo "yes, forced" >&6; }
64846    ENABLE_GENERATE_CLASSLIST="true"
64847    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64848      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64849$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64850    fi
64851  elif test "x$enable_generate_classlist" = "xno"; then
64852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64853$as_echo "no, forced" >&6; }
64854    ENABLE_GENERATE_CLASSLIST="false"
64855  elif test "x$enable_generate_classlist" = "x"; then
64856    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64857      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64858$as_echo "yes" >&6; }
64859      ENABLE_GENERATE_CLASSLIST="true"
64860    else
64861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64862$as_echo "no" >&6; }
64863      ENABLE_GENERATE_CLASSLIST="false"
64864    fi
64865  else
64866    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64867  fi
64868
64869
64870
64871
64872###############################################################################
64873#
64874# Configure parts of the build that only affect the build performance,
64875# not the result.
64876#
64877###############################################################################
64878
64879
64880  # How many cores do we have on this build system?
64881
64882# Check whether --with-num-cores was given.
64883if test "${with_num_cores+set}" = set; then :
64884  withval=$with_num_cores;
64885fi
64886
64887  if test "x$with_num_cores" = x; then
64888    # The number of cores were not specified, try to probe them.
64889
64890  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64891$as_echo_n "checking for number of cores... " >&6; }
64892  NUM_CORES=1
64893  FOUND_CORES=no
64894
64895  if test -f /proc/cpuinfo; then
64896    # Looks like a Linux (or cygwin) system
64897    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64898    FOUND_CORES=yes
64899  elif test -x /usr/sbin/psrinfo; then
64900    # Looks like a Solaris system
64901    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64902    FOUND_CORES=yes
64903  elif test -x /usr/sbin/sysctl; then
64904    # Looks like a MacOSX system
64905    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64906    FOUND_CORES=yes
64907  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64908    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64909    FOUND_CORES=yes
64910  elif test -n "$NUMBER_OF_PROCESSORS"; then
64911    # On windows, look in the env
64912    NUM_CORES=$NUMBER_OF_PROCESSORS
64913    FOUND_CORES=yes
64914  fi
64915
64916  if test "x$FOUND_CORES" = xyes; then
64917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64918$as_echo "$NUM_CORES" >&6; }
64919  else
64920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64921$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64922    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64923$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64924  fi
64925
64926  else
64927    NUM_CORES=$with_num_cores
64928  fi
64929
64930
64931
64932  # How much memory do we have on this build system?
64933
64934# Check whether --with-memory-size was given.
64935if test "${with_memory_size+set}" = set; then :
64936  withval=$with_memory_size;
64937fi
64938
64939  if test "x$with_memory_size" = x; then
64940    # The memory size was not specified, try to probe it.
64941
64942  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64943$as_echo_n "checking for memory size... " >&6; }
64944  # Default to 1024 MB
64945  MEMORY_SIZE=1024
64946  FOUND_MEM=no
64947
64948  if test -f /proc/meminfo; then
64949    # Looks like a Linux (or cygwin) system
64950    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64951    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64952    FOUND_MEM=yes
64953  elif test -x /usr/sbin/prtconf; then
64954    # Looks like a Solaris or AIX system
64955    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64956    FOUND_MEM=yes
64957  elif test -x /usr/sbin/sysctl; then
64958    # Looks like a MacOSX system
64959    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64960    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64961    FOUND_MEM=yes
64962  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64963    # Windows, but without cygwin
64964    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64965    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64966    FOUND_MEM=yes
64967  fi
64968
64969  if test "x$FOUND_MEM" = xyes; then
64970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64971$as_echo "$MEMORY_SIZE MB" >&6; }
64972  else
64973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64974$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64975    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64976$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64977  fi
64978
64979  else
64980    MEMORY_SIZE=$with_memory_size
64981  fi
64982
64983
64984
64985  # Provide a decent default number of parallel jobs for make depending on
64986  # number of cores, amount of memory and machine architecture.
64987
64988# Check whether --with-jobs was given.
64989if test "${with_jobs+set}" = set; then :
64990  withval=$with_jobs;
64991fi
64992
64993  if test "x$with_jobs" = x; then
64994    # Number of jobs was not specified, calculate.
64995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64996$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64997    # Approximate memory in GB.
64998    memory_gb=`expr $MEMORY_SIZE / 1024`
64999    # Pick the lowest of memory in gb and number of cores.
65000    if test "$memory_gb" -lt "$NUM_CORES"; then
65001      JOBS="$memory_gb"
65002    else
65003      JOBS="$NUM_CORES"
65004    fi
65005    if test "$JOBS" -eq "0"; then
65006      JOBS=1
65007    fi
65008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65009$as_echo "$JOBS" >&6; }
65010  else
65011    JOBS=$with_jobs
65012  fi
65013
65014
65015
65016  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65017
65018# Check whether --with-test-jobs was given.
65019if test "${with_test_jobs+set}" = set; then :
65020  withval=$with_test_jobs;
65021fi
65022
65023  if test "x$with_test_jobs" = x; then
65024      TEST_JOBS=0
65025  else
65026      TEST_JOBS=$with_test_jobs
65027  fi
65028
65029
65030
65031# Setup arguments for the boot jdk (after cores and memory have been setup)
65032
65033  ##############################################################################
65034  #
65035  # Specify jvm options for anything that is run with the Boot JDK.
65036  # Not all JVM:s accept the same arguments on the command line.
65037  #
65038
65039# Check whether --with-boot-jdk-jvmargs was given.
65040if test "${with_boot_jdk_jvmargs+set}" = set; then :
65041  withval=$with_boot_jdk_jvmargs;
65042fi
65043
65044
65045  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65046$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65047
65048  # Disable special log output when a debug build is used as Boot JDK...
65049
65050  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65051  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65052  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65053  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65054  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65055  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65056    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65057    JVM_ARG_OK=true
65058  else
65059    $ECHO "Arg failed:" >&5
65060    $ECHO "$OUTPUT" >&5
65061    JVM_ARG_OK=false
65062  fi
65063
65064
65065  # Apply user provided options.
65066
65067  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65068  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65069  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65070  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65071  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65072  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65073    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65074    JVM_ARG_OK=true
65075  else
65076    $ECHO "Arg failed:" >&5
65077    $ECHO "$OUTPUT" >&5
65078    JVM_ARG_OK=false
65079  fi
65080
65081
65082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65083$as_echo "$boot_jdk_jvmargs" >&6; }
65084
65085  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65086  JAVA_FLAGS=$boot_jdk_jvmargs
65087
65088
65089
65090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65091$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65092
65093  # Starting amount of heap memory.
65094
65095  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65096  $ECHO "Command: $JAVA -Xms64M -version" >&5
65097  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65098  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65099  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65100  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65101    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65102    JVM_ARG_OK=true
65103  else
65104    $ECHO "Arg failed:" >&5
65105    $ECHO "$OUTPUT" >&5
65106    JVM_ARG_OK=false
65107  fi
65108
65109
65110  # Maximum amount of heap memory.
65111  # Maximum stack size.
65112  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
65113  if test "x$BOOT_JDK_BITS" = "x32"; then
65114    if test "$JVM_MAX_HEAP" -gt "1100"; then
65115      JVM_MAX_HEAP=1100
65116    elif test "$JVM_MAX_HEAP" -lt "512"; then
65117      JVM_MAX_HEAP=512
65118    fi
65119    STACK_SIZE=768
65120  else
65121    # Running a 64 bit JVM allows for and requires a bigger heap
65122    if test "$JVM_MAX_HEAP" -gt "1600"; then
65123      JVM_MAX_HEAP=1600
65124    elif test "$JVM_MAX_HEAP" -lt "512"; then
65125      JVM_MAX_HEAP=512
65126    fi
65127    STACK_SIZE=1536
65128  fi
65129
65130  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65131  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65132  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65133  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65134  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65135  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65136    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65137    JVM_ARG_OK=true
65138  else
65139    $ECHO "Arg failed:" >&5
65140    $ECHO "$OUTPUT" >&5
65141    JVM_ARG_OK=false
65142  fi
65143
65144
65145  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65146  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65147  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65148  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65149  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65150  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65151    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65152    JVM_ARG_OK=true
65153  else
65154    $ECHO "Arg failed:" >&5
65155    $ECHO "$OUTPUT" >&5
65156    JVM_ARG_OK=false
65157  fi
65158
65159
65160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65161$as_echo "$boot_jdk_jvmargs_big" >&6; }
65162
65163  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65164
65165
65166  # By default, the main javac compilations use big
65167  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65168
65169
65170  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65171$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65172
65173  # Use serial gc for small short lived tools if possible
65174
65175  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65176  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65177  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65178  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65179  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65180  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65181    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65182    JVM_ARG_OK=true
65183  else
65184    $ECHO "Arg failed:" >&5
65185    $ECHO "$OUTPUT" >&5
65186    JVM_ARG_OK=false
65187  fi
65188
65189
65190  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65191  $ECHO "Command: $JAVA -Xms32M -version" >&5
65192  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65193  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65194  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65195  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65196    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65197    JVM_ARG_OK=true
65198  else
65199    $ECHO "Arg failed:" >&5
65200    $ECHO "$OUTPUT" >&5
65201    JVM_ARG_OK=false
65202  fi
65203
65204
65205  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65206  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65207  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65208  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65209  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65210  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65211    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65212    JVM_ARG_OK=true
65213  else
65214    $ECHO "Arg failed:" >&5
65215    $ECHO "$OUTPUT" >&5
65216    JVM_ARG_OK=false
65217  fi
65218
65219
65220  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65221  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65222  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65223  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65224  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65225  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65226    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65227    JVM_ARG_OK=true
65228  else
65229    $ECHO "Arg failed:" >&5
65230    $ECHO "$OUTPUT" >&5
65231    JVM_ARG_OK=false
65232  fi
65233
65234
65235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65236$as_echo "$boot_jdk_jvmargs_small" >&6; }
65237
65238  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65239
65240
65241  JAVA_TOOL_FLAGS_SMALL=""
65242  for f in $JAVA_FLAGS_SMALL; do
65243    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65244  done
65245
65246
65247
65248# Setup smart javac (after cores and memory have been setup)
65249
65250
65251# Check whether --with-sjavac-server-java was given.
65252if test "${with_sjavac_server_java+set}" = set; then :
65253  withval=$with_sjavac_server_java;
65254fi
65255
65256
65257  if test "x$with_sjavac_server_java" != x; then
65258    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65259    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65260    if test "x$FOUND_VERSION" = x; then
65261      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65262    fi
65263  else
65264    SJAVAC_SERVER_JAVA="$JAVA"
65265  fi
65266
65267
65268  if test "$MEMORY_SIZE" -gt "3000"; then
65269
65270  $ECHO "Check if jvm arg is ok: -d64" >&5
65271  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65272  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65273  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65274  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65275  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65276    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65277    JVM_ARG_OK=true
65278  else
65279    $ECHO "Arg failed:" >&5
65280    $ECHO "$OUTPUT" >&5
65281    JVM_ARG_OK=false
65282  fi
65283
65284    if test "$JVM_ARG_OK" = true; then
65285      JVM_64BIT=true
65286      JVM_ARG_OK=false
65287    fi
65288  fi
65289
65290  MX_VALUE=`expr $MEMORY_SIZE / 2`
65291  if test "$JVM_64BIT" = true; then
65292    # Set ms lower than mx since more than one instance of the server might
65293    # get launched at the same time before they figure out which instance won.
65294    MS_VALUE=512
65295    if test "$MX_VALUE" -gt "2048"; then
65296      MX_VALUE=2048
65297    fi
65298  else
65299    MS_VALUE=256
65300    if test "$MX_VALUE" -gt "1500"; then
65301      MX_VALUE=1500
65302    fi
65303  fi
65304  if test "$MX_VALUE" -lt "512"; then
65305    MX_VALUE=512
65306  fi
65307
65308  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65309  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65310  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65311  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
65312  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
65313  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65314    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65315    JVM_ARG_OK=true
65316  else
65317    $ECHO "Arg failed:" >&5
65318    $ECHO "$OUTPUT" >&5
65319    JVM_ARG_OK=false
65320  fi
65321
65322
65323
65324  # Check whether --enable-sjavac was given.
65325if test "${enable_sjavac+set}" = set; then :
65326  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65327else
65328  ENABLE_SJAVAC="no"
65329fi
65330
65331  if test "x$JVM_ARG_OK" = "xfalse"; then
65332    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65333$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65334    ENABLE_SJAVAC="no"
65335  fi
65336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65337$as_echo_n "checking whether to use sjavac... " >&6; }
65338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65339$as_echo "$ENABLE_SJAVAC" >&6; }
65340
65341
65342  # Check whether --enable-javac-server was given.
65343if test "${enable_javac_server+set}" = set; then :
65344  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65345else
65346  ENABLE_JAVAC_SERVER="yes"
65347fi
65348
65349  if test "x$JVM_ARG_OK" = "xfalse"; then
65350    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65351$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65352    ENABLE_JAVAC_SERVER="no"
65353  fi
65354  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65355$as_echo_n "checking whether to use javac server... " >&6; }
65356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65357$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65358
65359
65360  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65361    # When using a server javac, the small client instances do not need much
65362    # resources.
65363    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65364  fi
65365
65366
65367# Setup use of icecc if requested
65368
65369  # Check whether --enable-icecc was given.
65370if test "${enable_icecc+set}" = set; then :
65371  enableval=$enable_icecc;
65372fi
65373
65374
65375  if test "x${enable_icecc}" = "xyes"; then
65376
65377
65378
65379  # Publish this variable in the help.
65380
65381
65382  if [ -z "${ICECC_CMD+x}" ]; then
65383    # The variable is not set by user, try to locate tool using the code snippet
65384    for ac_prog in icecc
65385do
65386  # Extract the first word of "$ac_prog", so it can be a program name with args.
65387set dummy $ac_prog; ac_word=$2
65388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65389$as_echo_n "checking for $ac_word... " >&6; }
65390if ${ac_cv_path_ICECC_CMD+:} false; then :
65391  $as_echo_n "(cached) " >&6
65392else
65393  case $ICECC_CMD in
65394  [\\/]* | ?:[\\/]*)
65395  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65396  ;;
65397  *)
65398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65399for as_dir in $PATH
65400do
65401  IFS=$as_save_IFS
65402  test -z "$as_dir" && as_dir=.
65403    for ac_exec_ext in '' $ac_executable_extensions; do
65404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65405    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65407    break 2
65408  fi
65409done
65410  done
65411IFS=$as_save_IFS
65412
65413  ;;
65414esac
65415fi
65416ICECC_CMD=$ac_cv_path_ICECC_CMD
65417if test -n "$ICECC_CMD"; then
65418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65419$as_echo "$ICECC_CMD" >&6; }
65420else
65421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65422$as_echo "no" >&6; }
65423fi
65424
65425
65426  test -n "$ICECC_CMD" && break
65427done
65428
65429  else
65430    # The variable is set, but is it from the command line or the environment?
65431
65432    # Try to remove the string !ICECC_CMD! from our list.
65433    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65434    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65435      # If it failed, the variable was not from the command line. Ignore it,
65436      # but warn the user (except for BASH, which is always set by the calling BASH).
65437      if test "xICECC_CMD" != xBASH; then
65438        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65439$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65440      fi
65441      # Try to locate tool using the code snippet
65442      for ac_prog in icecc
65443do
65444  # Extract the first word of "$ac_prog", so it can be a program name with args.
65445set dummy $ac_prog; ac_word=$2
65446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65447$as_echo_n "checking for $ac_word... " >&6; }
65448if ${ac_cv_path_ICECC_CMD+:} false; then :
65449  $as_echo_n "(cached) " >&6
65450else
65451  case $ICECC_CMD in
65452  [\\/]* | ?:[\\/]*)
65453  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65454  ;;
65455  *)
65456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65457for as_dir in $PATH
65458do
65459  IFS=$as_save_IFS
65460  test -z "$as_dir" && as_dir=.
65461    for ac_exec_ext in '' $ac_executable_extensions; do
65462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65463    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65465    break 2
65466  fi
65467done
65468  done
65469IFS=$as_save_IFS
65470
65471  ;;
65472esac
65473fi
65474ICECC_CMD=$ac_cv_path_ICECC_CMD
65475if test -n "$ICECC_CMD"; then
65476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65477$as_echo "$ICECC_CMD" >&6; }
65478else
65479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65480$as_echo "no" >&6; }
65481fi
65482
65483
65484  test -n "$ICECC_CMD" && break
65485done
65486
65487    else
65488      # If it succeeded, then it was overridden by the user. We will use it
65489      # for the tool.
65490
65491      # First remove it from the list of overridden variables, so we can test
65492      # for unknown variables in the end.
65493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65494
65495      # Check if we try to supply an empty value
65496      if test "x$ICECC_CMD" = x; then
65497        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65498$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65500$as_echo_n "checking for ICECC_CMD... " >&6; }
65501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65502$as_echo "disabled" >&6; }
65503      else
65504        # Check if the provided tool contains a complete path.
65505        tool_specified="$ICECC_CMD"
65506        tool_basename="${tool_specified##*/}"
65507        if test "x$tool_basename" = "x$tool_specified"; then
65508          # A command without a complete path is provided, search $PATH.
65509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65510$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65511          # Extract the first word of "$tool_basename", so it can be a program name with args.
65512set dummy $tool_basename; ac_word=$2
65513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65514$as_echo_n "checking for $ac_word... " >&6; }
65515if ${ac_cv_path_ICECC_CMD+:} false; then :
65516  $as_echo_n "(cached) " >&6
65517else
65518  case $ICECC_CMD in
65519  [\\/]* | ?:[\\/]*)
65520  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65521  ;;
65522  *)
65523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65524for as_dir in $PATH
65525do
65526  IFS=$as_save_IFS
65527  test -z "$as_dir" && as_dir=.
65528    for ac_exec_ext in '' $ac_executable_extensions; do
65529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65530    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65532    break 2
65533  fi
65534done
65535  done
65536IFS=$as_save_IFS
65537
65538  ;;
65539esac
65540fi
65541ICECC_CMD=$ac_cv_path_ICECC_CMD
65542if test -n "$ICECC_CMD"; then
65543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65544$as_echo "$ICECC_CMD" >&6; }
65545else
65546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65547$as_echo "no" >&6; }
65548fi
65549
65550
65551          if test "x$ICECC_CMD" = x; then
65552            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65553          fi
65554        else
65555          # Otherwise we believe it is a complete path. Use it as it is.
65556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65557$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65558          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65559$as_echo_n "checking for ICECC_CMD... " >&6; }
65560          if test ! -x "$tool_specified"; then
65561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65562$as_echo "not found" >&6; }
65563            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65564          fi
65565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65566$as_echo "$tool_specified" >&6; }
65567        fi
65568      fi
65569    fi
65570
65571  fi
65572
65573
65574
65575  if test "x$ICECC_CMD" = x; then
65576    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65577  fi
65578
65579
65580    old_path="$PATH"
65581
65582    # Look for icecc-create-env in some known places
65583    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65584
65585
65586
65587  # Publish this variable in the help.
65588
65589
65590  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65591    # The variable is not set by user, try to locate tool using the code snippet
65592    for ac_prog in icecc-create-env
65593do
65594  # Extract the first word of "$ac_prog", so it can be a program name with args.
65595set dummy $ac_prog; ac_word=$2
65596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65597$as_echo_n "checking for $ac_word... " >&6; }
65598if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65599  $as_echo_n "(cached) " >&6
65600else
65601  case $ICECC_CREATE_ENV in
65602  [\\/]* | ?:[\\/]*)
65603  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65604  ;;
65605  *)
65606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65607for as_dir in $PATH
65608do
65609  IFS=$as_save_IFS
65610  test -z "$as_dir" && as_dir=.
65611    for ac_exec_ext in '' $ac_executable_extensions; do
65612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65613    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65615    break 2
65616  fi
65617done
65618  done
65619IFS=$as_save_IFS
65620
65621  ;;
65622esac
65623fi
65624ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65625if test -n "$ICECC_CREATE_ENV"; then
65626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65627$as_echo "$ICECC_CREATE_ENV" >&6; }
65628else
65629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65630$as_echo "no" >&6; }
65631fi
65632
65633
65634  test -n "$ICECC_CREATE_ENV" && break
65635done
65636
65637  else
65638    # The variable is set, but is it from the command line or the environment?
65639
65640    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65643      # If it failed, the variable was not from the command line. Ignore it,
65644      # but warn the user (except for BASH, which is always set by the calling BASH).
65645      if test "xICECC_CREATE_ENV" != xBASH; then
65646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65647$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65648      fi
65649      # Try to locate tool using the code snippet
65650      for ac_prog in icecc-create-env
65651do
65652  # Extract the first word of "$ac_prog", so it can be a program name with args.
65653set dummy $ac_prog; ac_word=$2
65654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65655$as_echo_n "checking for $ac_word... " >&6; }
65656if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65657  $as_echo_n "(cached) " >&6
65658else
65659  case $ICECC_CREATE_ENV in
65660  [\\/]* | ?:[\\/]*)
65661  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65662  ;;
65663  *)
65664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65665for as_dir in $PATH
65666do
65667  IFS=$as_save_IFS
65668  test -z "$as_dir" && as_dir=.
65669    for ac_exec_ext in '' $ac_executable_extensions; do
65670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65671    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65673    break 2
65674  fi
65675done
65676  done
65677IFS=$as_save_IFS
65678
65679  ;;
65680esac
65681fi
65682ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65683if test -n "$ICECC_CREATE_ENV"; then
65684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65685$as_echo "$ICECC_CREATE_ENV" >&6; }
65686else
65687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65688$as_echo "no" >&6; }
65689fi
65690
65691
65692  test -n "$ICECC_CREATE_ENV" && break
65693done
65694
65695    else
65696      # If it succeeded, then it was overridden by the user. We will use it
65697      # for the tool.
65698
65699      # First remove it from the list of overridden variables, so we can test
65700      # for unknown variables in the end.
65701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65702
65703      # Check if we try to supply an empty value
65704      if test "x$ICECC_CREATE_ENV" = x; then
65705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65706$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65708$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65710$as_echo "disabled" >&6; }
65711      else
65712        # Check if the provided tool contains a complete path.
65713        tool_specified="$ICECC_CREATE_ENV"
65714        tool_basename="${tool_specified##*/}"
65715        if test "x$tool_basename" = "x$tool_specified"; then
65716          # A command without a complete path is provided, search $PATH.
65717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65718$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65719          # Extract the first word of "$tool_basename", so it can be a program name with args.
65720set dummy $tool_basename; ac_word=$2
65721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65722$as_echo_n "checking for $ac_word... " >&6; }
65723if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65724  $as_echo_n "(cached) " >&6
65725else
65726  case $ICECC_CREATE_ENV in
65727  [\\/]* | ?:[\\/]*)
65728  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65729  ;;
65730  *)
65731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65732for as_dir in $PATH
65733do
65734  IFS=$as_save_IFS
65735  test -z "$as_dir" && as_dir=.
65736    for ac_exec_ext in '' $ac_executable_extensions; do
65737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65738    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65740    break 2
65741  fi
65742done
65743  done
65744IFS=$as_save_IFS
65745
65746  ;;
65747esac
65748fi
65749ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65750if test -n "$ICECC_CREATE_ENV"; then
65751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65752$as_echo "$ICECC_CREATE_ENV" >&6; }
65753else
65754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65755$as_echo "no" >&6; }
65756fi
65757
65758
65759          if test "x$ICECC_CREATE_ENV" = x; then
65760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65761          fi
65762        else
65763          # Otherwise we believe it is a complete path. Use it as it is.
65764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65765$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65767$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65768          if test ! -x "$tool_specified"; then
65769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65770$as_echo "not found" >&6; }
65771            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65772          fi
65773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65774$as_echo "$tool_specified" >&6; }
65775        fi
65776      fi
65777    fi
65778
65779  fi
65780
65781
65782
65783  if test "x$ICECC_CREATE_ENV" = x; then
65784    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65785  fi
65786
65787
65788    # Use icecc-create-env to create a minimal compilation environment that can
65789    # be sent to the other hosts in the icecream cluster.
65790    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65791    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65792    # Older versions of icecc does not have the --gcc parameter
65793    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65794      icecc_gcc_arg="--gcc"
65795    fi
65796    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65797
65798  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65799      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65800          ${icecc_create_env_log} 2>&1 )
65801  if test "$?" != "0"; then
65802    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65803$as_echo "$as_me: icecc-create-env output:" >&6;}
65804    cat \
65805          ${icecc_create_env_log}
65806    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65807  fi
65808
65809    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65810      # For clang, the icecc compilerwrapper is needed. It usually resides next
65811      # to icecc-create-env.
65812
65813
65814
65815  # Publish this variable in the help.
65816
65817
65818  if [ -z "${ICECC_WRAPPER+x}" ]; then
65819    # The variable is not set by user, try to locate tool using the code snippet
65820    for ac_prog in compilerwrapper
65821do
65822  # Extract the first word of "$ac_prog", so it can be a program name with args.
65823set dummy $ac_prog; ac_word=$2
65824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65825$as_echo_n "checking for $ac_word... " >&6; }
65826if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65827  $as_echo_n "(cached) " >&6
65828else
65829  case $ICECC_WRAPPER in
65830  [\\/]* | ?:[\\/]*)
65831  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65832  ;;
65833  *)
65834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65835for as_dir in $PATH
65836do
65837  IFS=$as_save_IFS
65838  test -z "$as_dir" && as_dir=.
65839    for ac_exec_ext in '' $ac_executable_extensions; do
65840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65841    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65843    break 2
65844  fi
65845done
65846  done
65847IFS=$as_save_IFS
65848
65849  ;;
65850esac
65851fi
65852ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65853if test -n "$ICECC_WRAPPER"; then
65854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65855$as_echo "$ICECC_WRAPPER" >&6; }
65856else
65857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65858$as_echo "no" >&6; }
65859fi
65860
65861
65862  test -n "$ICECC_WRAPPER" && break
65863done
65864
65865  else
65866    # The variable is set, but is it from the command line or the environment?
65867
65868    # Try to remove the string !ICECC_WRAPPER! from our list.
65869    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65870    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65871      # If it failed, the variable was not from the command line. Ignore it,
65872      # but warn the user (except for BASH, which is always set by the calling BASH).
65873      if test "xICECC_WRAPPER" != xBASH; then
65874        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65875$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65876      fi
65877      # Try to locate tool using the code snippet
65878      for ac_prog in compilerwrapper
65879do
65880  # Extract the first word of "$ac_prog", so it can be a program name with args.
65881set dummy $ac_prog; ac_word=$2
65882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65883$as_echo_n "checking for $ac_word... " >&6; }
65884if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65885  $as_echo_n "(cached) " >&6
65886else
65887  case $ICECC_WRAPPER in
65888  [\\/]* | ?:[\\/]*)
65889  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65890  ;;
65891  *)
65892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65893for as_dir in $PATH
65894do
65895  IFS=$as_save_IFS
65896  test -z "$as_dir" && as_dir=.
65897    for ac_exec_ext in '' $ac_executable_extensions; do
65898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65899    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65901    break 2
65902  fi
65903done
65904  done
65905IFS=$as_save_IFS
65906
65907  ;;
65908esac
65909fi
65910ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65911if test -n "$ICECC_WRAPPER"; then
65912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65913$as_echo "$ICECC_WRAPPER" >&6; }
65914else
65915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65916$as_echo "no" >&6; }
65917fi
65918
65919
65920  test -n "$ICECC_WRAPPER" && break
65921done
65922
65923    else
65924      # If it succeeded, then it was overridden by the user. We will use it
65925      # for the tool.
65926
65927      # First remove it from the list of overridden variables, so we can test
65928      # for unknown variables in the end.
65929      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65930
65931      # Check if we try to supply an empty value
65932      if test "x$ICECC_WRAPPER" = x; then
65933        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65934$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65935        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65936$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65938$as_echo "disabled" >&6; }
65939      else
65940        # Check if the provided tool contains a complete path.
65941        tool_specified="$ICECC_WRAPPER"
65942        tool_basename="${tool_specified##*/}"
65943        if test "x$tool_basename" = "x$tool_specified"; then
65944          # A command without a complete path is provided, search $PATH.
65945          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65946$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65947          # Extract the first word of "$tool_basename", so it can be a program name with args.
65948set dummy $tool_basename; ac_word=$2
65949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65950$as_echo_n "checking for $ac_word... " >&6; }
65951if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65952  $as_echo_n "(cached) " >&6
65953else
65954  case $ICECC_WRAPPER in
65955  [\\/]* | ?:[\\/]*)
65956  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65957  ;;
65958  *)
65959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65960for as_dir in $PATH
65961do
65962  IFS=$as_save_IFS
65963  test -z "$as_dir" && as_dir=.
65964    for ac_exec_ext in '' $ac_executable_extensions; do
65965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65966    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65968    break 2
65969  fi
65970done
65971  done
65972IFS=$as_save_IFS
65973
65974  ;;
65975esac
65976fi
65977ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65978if test -n "$ICECC_WRAPPER"; then
65979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65980$as_echo "$ICECC_WRAPPER" >&6; }
65981else
65982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65983$as_echo "no" >&6; }
65984fi
65985
65986
65987          if test "x$ICECC_WRAPPER" = x; then
65988            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65989          fi
65990        else
65991          # Otherwise we believe it is a complete path. Use it as it is.
65992          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65993$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65994          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65995$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65996          if test ! -x "$tool_specified"; then
65997            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65998$as_echo "not found" >&6; }
65999            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66000          fi
66001          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66002$as_echo "$tool_specified" >&6; }
66003        fi
66004      fi
66005    fi
66006
66007  fi
66008
66009
66010
66011  if test "x$ICECC_WRAPPER" = x; then
66012    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66013  fi
66014
66015
66016
66017  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66018      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66019  if test "$?" != "0"; then
66020    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66021$as_echo "$as_me: icecc-create-env output:" >&6;}
66022    cat ${icecc_create_env_log}
66023    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66024  fi
66025
66026    else
66027      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66028    fi
66029    PATH="$old_path"
66030    # The bundle with the compiler gets a name based on checksums. Parse log file
66031    # to find it.
66032    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66033    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66034    if test ! -f ${ICECC_ENV_BUNDLE}; then
66035      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66036    fi
66037    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66038$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66040$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66041    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66042
66043    if test "x${COMPILE_TYPE}" = "xcross"; then
66044      # If cross compiling, create a separate env package for the build compiler
66045      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66046      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66047      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66048
66049  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66050      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66051            ${icecc_create_env_log_build} 2>&1 )
66052  if test "$?" != "0"; then
66053    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66054$as_echo "$as_me: icecc-create-env output:" >&6;}
66055    cat \
66056            ${icecc_create_env_log_build}
66057    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66058  fi
66059
66060      elif test "x${BUILD_CC##*/}" = "xclang"; then
66061
66062  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66063      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66064  if test "$?" != "0"; then
66065    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66066$as_echo "$as_me: icecc-create-env output:" >&6;}
66067    cat ${icecc_create_env_log_build}
66068    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66069  fi
66070
66071      else
66072        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66073      fi
66074      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66075      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66076      if test ! -f ${ICECC_ENV_BUNDLE}; then
66077        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66078      fi
66079      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66080$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66081      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66082$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66083      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66084          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66085    else
66086      BUILD_ICECC="${ICECC}"
66087    fi
66088
66089
66090  fi
66091
66092
66093# Can the C/C++ compiler use precompiled headers?
66094
66095
66096  ###############################################################################
66097  #
66098  # Can the C/C++ compiler use precompiled headers?
66099  #
66100  # Check whether --enable-precompiled-headers was given.
66101if test "${enable_precompiled_headers+set}" = set; then :
66102  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66103else
66104  ENABLE_PRECOMPH=yes
66105fi
66106
66107
66108  USE_PRECOMPILED_HEADER=1
66109  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66110$as_echo_n "checking If precompiled header is enabled... " >&6; }
66111  if test "x$ENABLE_PRECOMPH" = xno; then
66112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66113$as_echo "no, forced" >&6; }
66114    USE_PRECOMPILED_HEADER=0
66115  elif test "x$ICECC" != "x"; then
66116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66117$as_echo "no, does not work effectively with icecc" >&6; }
66118    USE_PRECOMPILED_HEADER=0
66119  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66121$as_echo "no, does not work with Solaris Studio" >&6; }
66122    USE_PRECOMPILED_HEADER=0
66123  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66125$as_echo "no, does not work with xlc" >&6; }
66126    USE_PRECOMPILED_HEADER=0
66127  else
66128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66129$as_echo "yes" >&6; }
66130  fi
66131
66132  if test "x$ENABLE_PRECOMPH" = xyes; then
66133    # Check that the compiler actually supports precomp headers.
66134    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66135      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66136$as_echo_n "checking that precompiled headers work... " >&6; }
66137      echo "int alfa();" > conftest.h
66138      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66139      if test ! -f conftest.hpp.gch; then
66140        USE_PRECOMPILED_HEADER=0
66141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66142$as_echo "no" >&6; }
66143      else
66144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66145$as_echo "yes" >&6; }
66146      fi
66147      rm -f conftest.h conftest.hpp.gch
66148    fi
66149  fi
66150
66151
66152
66153
66154# Setup use of ccache, if available
66155
66156  # Check whether --enable-ccache was given.
66157if test "${enable_ccache+set}" = set; then :
66158  enableval=$enable_ccache;
66159fi
66160
66161
66162  CCACHE=
66163  CCACHE_STATUS=
66164  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66165$as_echo_n "checking is ccache enabled... " >&6; }
66166  if test "x$enable_ccache" = xyes; then
66167    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66169$as_echo "yes" >&6; }
66170      OLD_PATH="$PATH"
66171      if test "x$TOOLCHAIN_PATH" != x; then
66172        PATH=$TOOLCHAIN_PATH:$PATH
66173      fi
66174
66175
66176
66177  # Publish this variable in the help.
66178
66179
66180  if [ -z "${CCACHE+x}" ]; then
66181    # The variable is not set by user, try to locate tool using the code snippet
66182    for ac_prog in ccache
66183do
66184  # Extract the first word of "$ac_prog", so it can be a program name with args.
66185set dummy $ac_prog; ac_word=$2
66186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66187$as_echo_n "checking for $ac_word... " >&6; }
66188if ${ac_cv_path_CCACHE+:} false; then :
66189  $as_echo_n "(cached) " >&6
66190else
66191  case $CCACHE in
66192  [\\/]* | ?:[\\/]*)
66193  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66194  ;;
66195  *)
66196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66197for as_dir in $PATH
66198do
66199  IFS=$as_save_IFS
66200  test -z "$as_dir" && as_dir=.
66201    for ac_exec_ext in '' $ac_executable_extensions; do
66202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66203    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66205    break 2
66206  fi
66207done
66208  done
66209IFS=$as_save_IFS
66210
66211  ;;
66212esac
66213fi
66214CCACHE=$ac_cv_path_CCACHE
66215if test -n "$CCACHE"; then
66216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66217$as_echo "$CCACHE" >&6; }
66218else
66219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66220$as_echo "no" >&6; }
66221fi
66222
66223
66224  test -n "$CCACHE" && break
66225done
66226
66227  else
66228    # The variable is set, but is it from the command line or the environment?
66229
66230    # Try to remove the string !CCACHE! from our list.
66231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66233      # If it failed, the variable was not from the command line. Ignore it,
66234      # but warn the user (except for BASH, which is always set by the calling BASH).
66235      if test "xCCACHE" != xBASH; then
66236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66237$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66238      fi
66239      # Try to locate tool using the code snippet
66240      for ac_prog in ccache
66241do
66242  # Extract the first word of "$ac_prog", so it can be a program name with args.
66243set dummy $ac_prog; ac_word=$2
66244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66245$as_echo_n "checking for $ac_word... " >&6; }
66246if ${ac_cv_path_CCACHE+:} false; then :
66247  $as_echo_n "(cached) " >&6
66248else
66249  case $CCACHE in
66250  [\\/]* | ?:[\\/]*)
66251  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66252  ;;
66253  *)
66254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66255for as_dir in $PATH
66256do
66257  IFS=$as_save_IFS
66258  test -z "$as_dir" && as_dir=.
66259    for ac_exec_ext in '' $ac_executable_extensions; do
66260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66261    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66263    break 2
66264  fi
66265done
66266  done
66267IFS=$as_save_IFS
66268
66269  ;;
66270esac
66271fi
66272CCACHE=$ac_cv_path_CCACHE
66273if test -n "$CCACHE"; then
66274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66275$as_echo "$CCACHE" >&6; }
66276else
66277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66278$as_echo "no" >&6; }
66279fi
66280
66281
66282  test -n "$CCACHE" && break
66283done
66284
66285    else
66286      # If it succeeded, then it was overridden by the user. We will use it
66287      # for the tool.
66288
66289      # First remove it from the list of overridden variables, so we can test
66290      # for unknown variables in the end.
66291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66292
66293      # Check if we try to supply an empty value
66294      if test "x$CCACHE" = x; then
66295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66296$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66298$as_echo_n "checking for CCACHE... " >&6; }
66299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66300$as_echo "disabled" >&6; }
66301      else
66302        # Check if the provided tool contains a complete path.
66303        tool_specified="$CCACHE"
66304        tool_basename="${tool_specified##*/}"
66305        if test "x$tool_basename" = "x$tool_specified"; then
66306          # A command without a complete path is provided, search $PATH.
66307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66308$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66309          # Extract the first word of "$tool_basename", so it can be a program name with args.
66310set dummy $tool_basename; ac_word=$2
66311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66312$as_echo_n "checking for $ac_word... " >&6; }
66313if ${ac_cv_path_CCACHE+:} false; then :
66314  $as_echo_n "(cached) " >&6
66315else
66316  case $CCACHE in
66317  [\\/]* | ?:[\\/]*)
66318  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66319  ;;
66320  *)
66321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66322for as_dir in $PATH
66323do
66324  IFS=$as_save_IFS
66325  test -z "$as_dir" && as_dir=.
66326    for ac_exec_ext in '' $ac_executable_extensions; do
66327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66328    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66330    break 2
66331  fi
66332done
66333  done
66334IFS=$as_save_IFS
66335
66336  ;;
66337esac
66338fi
66339CCACHE=$ac_cv_path_CCACHE
66340if test -n "$CCACHE"; then
66341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66342$as_echo "$CCACHE" >&6; }
66343else
66344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66345$as_echo "no" >&6; }
66346fi
66347
66348
66349          if test "x$CCACHE" = x; then
66350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66351          fi
66352        else
66353          # Otherwise we believe it is a complete path. Use it as it is.
66354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66355$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66357$as_echo_n "checking for CCACHE... " >&6; }
66358          if test ! -x "$tool_specified"; then
66359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66360$as_echo "not found" >&6; }
66361            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66362          fi
66363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66364$as_echo "$tool_specified" >&6; }
66365        fi
66366      fi
66367    fi
66368
66369  fi
66370
66371
66372
66373  if test "x$CCACHE" = x; then
66374    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66375  fi
66376
66377
66378      PATH="$OLD_PATH"
66379      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66380      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66381    else
66382      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66383$as_echo "no" >&6; }
66384      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66385$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66386    fi
66387  elif test "x$enable_ccache" = xno; then
66388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66389$as_echo "no, explicitly disabled" >&6; }
66390    CCACHE_STATUS="Disabled"
66391  elif test "x$enable_ccache" = x; then
66392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66393$as_echo "no" >&6; }
66394  else
66395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66396$as_echo "unknown" >&6; }
66397    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66398  fi
66399
66400
66401
66402# Check whether --with-ccache-dir was given.
66403if test "${with_ccache_dir+set}" = set; then :
66404  withval=$with_ccache_dir;
66405fi
66406
66407
66408  if test "x$with_ccache_dir" != x; then
66409    # When using a non home ccache directory, assume the use is to share ccache files
66410    # with other users. Thus change the umask.
66411    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66412    if test "x$CCACHE" = x; then
66413      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66414$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66415    fi
66416  fi
66417
66418  if test "x$CCACHE" != x; then
66419
66420  if test "x$CCACHE" != x; then
66421    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66422      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66423          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66424      if test "x$HAS_BAD_CCACHE" != "x"; then
66425        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66426      fi
66427      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66428$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66429      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66430      PUSHED_FLAGS="$CXXFLAGS"
66431      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66432      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66433/* end confdefs.h.  */
66434
66435int
66436main ()
66437{
66438
66439  ;
66440  return 0;
66441}
66442_ACEOF
66443if ac_fn_cxx_try_compile "$LINENO"; then :
66444  CC_KNOWS_CCACHE_TRICK=yes
66445else
66446  CC_KNOWS_CCACHE_TRICK=no
66447fi
66448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66449      CXXFLAGS="$PUSHED_FLAGS"
66450      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66452$as_echo "yes" >&6; }
66453        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66454
66455        CCACHE_SLOPPINESS=pch_defines,time_macros
66456      else
66457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66458$as_echo "no" >&6; }
66459        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66460      fi
66461    fi
66462
66463    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66464        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66465
66466    if test "x$SET_CCACHE_DIR" != x; then
66467      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66468      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66469    fi
66470  fi
66471
66472  fi
66473
66474
66475###############################################################################
66476#
66477# And now the finish...
66478#
66479###############################################################################
66480
66481# Check for some common pitfalls
66482
66483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66484    file_to_test="$SRC_ROOT/LICENSE"
66485    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66486      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
66487    fi
66488  fi
66489
66490
66491  # Did user specify any unknown variables?
66492
66493  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66494    # Replace the separating ! with spaces before presenting for end user.
66495    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66496    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66497$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66498  fi
66499
66500
66501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66502$as_echo_n "checking if build directory is on local disk... " >&6; }
66503
66504  # df -l lists only local disks; if the given directory is not found then
66505  # a non-zero exit code is given
66506  if test "x$DF" = x; then
66507    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66508      # msys does not have df; use Windows "net use" instead.
66509      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66510      if test "x$IS_NETWORK_DISK" = x; then
66511        OUTPUT_DIR_IS_LOCAL="yes"
66512      else
66513        OUTPUT_DIR_IS_LOCAL="no"
66514      fi
66515    else
66516      # No df here, say it's local
66517      OUTPUT_DIR_IS_LOCAL="yes"
66518    fi
66519  else
66520    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66521      OUTPUT_DIR_IS_LOCAL="yes"
66522    else
66523      OUTPUT_DIR_IS_LOCAL="no"
66524    fi
66525  fi
66526
66527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66528$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66529
66530
66531
66532  # Check if the user has any old-style ALT_ variables set.
66533  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66534
66535  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66536  # Since we can't properly handle the dependencies for this, warn the user about the situation
66537  if test -e $OUTPUT_ROOT/spec.gmk; then
66538    IS_RECONFIGURE=yes
66539  else
66540    IS_RECONFIGURE=no
66541  fi
66542
66543
66544# At the end, call the custom hook. (Dummy macro if no custom sources available)
66545
66546
66547# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66548
66549  # Keep feature lists sorted and free of duplicates
66550  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66551  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66552  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66553  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66554  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66555  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66556  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66557
66558  # Validate features
66559  for variant in $JVM_VARIANTS; do
66560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66561$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66562    features_var_name=JVM_FEATURES_$variant
66563    JVM_FEATURES_TO_TEST=${!features_var_name}
66564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66565$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66566    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66567    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66568    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66569    if test "x$INVALID_FEATURES" != x; then
66570      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66571    fi
66572  done
66573
66574
66575# We're messing a bit with internal autoconf variables to put the config.status
66576# in the output directory instead of the current directory.
66577CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66578
66579# Create the actual output files. Now the main work of configure is done.
66580cat >confcache <<\_ACEOF
66581# This file is a shell script that caches the results of configure
66582# tests run on this system so they can be shared between configure
66583# scripts and configure runs, see configure's option --config-cache.
66584# It is not useful on other systems.  If it contains results you don't
66585# want to keep, you may remove or edit it.
66586#
66587# config.status only pays attention to the cache file if you give it
66588# the --recheck option to rerun configure.
66589#
66590# `ac_cv_env_foo' variables (set or unset) will be overridden when
66591# loading this file, other *unset* `ac_cv_foo' will be assigned the
66592# following values.
66593
66594_ACEOF
66595
66596# The following way of writing the cache mishandles newlines in values,
66597# but we know of no workaround that is simple, portable, and efficient.
66598# So, we kill variables containing newlines.
66599# Ultrix sh set writes to stderr and can't be redirected directly,
66600# and sets the high bit in the cache file unless we assign to the vars.
66601(
66602  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66603    eval ac_val=\$$ac_var
66604    case $ac_val in #(
66605    *${as_nl}*)
66606      case $ac_var in #(
66607      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66608$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66609      esac
66610      case $ac_var in #(
66611      _ | IFS | as_nl) ;; #(
66612      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66613      *) { eval $ac_var=; unset $ac_var;} ;;
66614      esac ;;
66615    esac
66616  done
66617
66618  (set) 2>&1 |
66619    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66620    *${as_nl}ac_space=\ *)
66621      # `set' does not quote correctly, so add quotes: double-quote
66622      # substitution turns \\\\ into \\, and sed turns \\ into \.
66623      sed -n \
66624	"s/'/'\\\\''/g;
66625	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66626      ;; #(
66627    *)
66628      # `set' quotes correctly as required by POSIX, so do not add quotes.
66629      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66630      ;;
66631    esac |
66632    sort
66633) |
66634  sed '
66635     /^ac_cv_env_/b end
66636     t clear
66637     :clear
66638     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66639     t end
66640     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66641     :end' >>confcache
66642if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66643  if test -w "$cache_file"; then
66644    if test "x$cache_file" != "x/dev/null"; then
66645      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66646$as_echo "$as_me: updating cache $cache_file" >&6;}
66647      if test ! -f "$cache_file" || test -h "$cache_file"; then
66648	cat confcache >"$cache_file"
66649      else
66650        case $cache_file in #(
66651        */* | ?:*)
66652	  mv -f confcache "$cache_file"$$ &&
66653	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66654        *)
66655	  mv -f confcache "$cache_file" ;;
66656	esac
66657      fi
66658    fi
66659  else
66660    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66661$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66662  fi
66663fi
66664rm -f confcache
66665
66666test "x$prefix" = xNONE && prefix=$ac_default_prefix
66667# Let make expand exec_prefix.
66668test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66669
66670# Transform confdefs.h into DEFS.
66671# Protect against shell expansion while executing Makefile rules.
66672# Protect against Makefile macro expansion.
66673#
66674# If the first sed substitution is executed (which looks for macros that
66675# take arguments), then branch to the quote section.  Otherwise,
66676# look for a macro that doesn't take arguments.
66677ac_script='
66678:mline
66679/\\$/{
66680 N
66681 s,\\\n,,
66682 b mline
66683}
66684t clear
66685:clear
66686s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66687t quote
66688s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66689t quote
66690b any
66691:quote
66692s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66693s/\[/\\&/g
66694s/\]/\\&/g
66695s/\$/$$/g
66696H
66697:any
66698${
66699	g
66700	s/^\n//
66701	s/\n/ /g
66702	p
66703}
66704'
66705DEFS=`sed -n "$ac_script" confdefs.h`
66706
66707
66708ac_libobjs=
66709ac_ltlibobjs=
66710U=
66711for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66712  # 1. Remove the extension, and $U if already installed.
66713  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66714  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66715  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66716  #    will be set to the directory where LIBOBJS objects are built.
66717  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66718  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66719done
66720LIBOBJS=$ac_libobjs
66721
66722LTLIBOBJS=$ac_ltlibobjs
66723
66724
66725
66726: "${CONFIG_STATUS=./config.status}"
66727ac_write_fail=0
66728ac_clean_files_save=$ac_clean_files
66729ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66730{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66731$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66732as_write_fail=0
66733cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66734#! $SHELL
66735# Generated by $as_me.
66736# Run this file to recreate the current configuration.
66737# Compiler output produced by configure, useful for debugging
66738# configure, is in config.log if it exists.
66739
66740debug=false
66741ac_cs_recheck=false
66742ac_cs_silent=false
66743
66744SHELL=\${CONFIG_SHELL-$SHELL}
66745export SHELL
66746_ASEOF
66747cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66748## -------------------- ##
66749## M4sh Initialization. ##
66750## -------------------- ##
66751
66752# Be more Bourne compatible
66753DUALCASE=1; export DUALCASE # for MKS sh
66754if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66755  emulate sh
66756  NULLCMD=:
66757  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66758  # is contrary to our usage.  Disable this feature.
66759  alias -g '${1+"$@"}'='"$@"'
66760  setopt NO_GLOB_SUBST
66761else
66762  case `(set -o) 2>/dev/null` in #(
66763  *posix*) :
66764    set -o posix ;; #(
66765  *) :
66766     ;;
66767esac
66768fi
66769
66770
66771as_nl='
66772'
66773export as_nl
66774# Printing a long string crashes Solaris 7 /usr/bin/printf.
66775as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66776as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66777as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66778# Prefer a ksh shell builtin over an external printf program on Solaris,
66779# but without wasting forks for bash or zsh.
66780if test -z "$BASH_VERSION$ZSH_VERSION" \
66781    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66782  as_echo='print -r --'
66783  as_echo_n='print -rn --'
66784elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66785  as_echo='printf %s\n'
66786  as_echo_n='printf %s'
66787else
66788  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66789    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66790    as_echo_n='/usr/ucb/echo -n'
66791  else
66792    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66793    as_echo_n_body='eval
66794      arg=$1;
66795      case $arg in #(
66796      *"$as_nl"*)
66797	expr "X$arg" : "X\\(.*\\)$as_nl";
66798	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66799      esac;
66800      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66801    '
66802    export as_echo_n_body
66803    as_echo_n='sh -c $as_echo_n_body as_echo'
66804  fi
66805  export as_echo_body
66806  as_echo='sh -c $as_echo_body as_echo'
66807fi
66808
66809# The user is always right.
66810if test "${PATH_SEPARATOR+set}" != set; then
66811  PATH_SEPARATOR=:
66812  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66813    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66814      PATH_SEPARATOR=';'
66815  }
66816fi
66817
66818
66819# IFS
66820# We need space, tab and new line, in precisely that order.  Quoting is
66821# there to prevent editors from complaining about space-tab.
66822# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66823# splitting by setting IFS to empty value.)
66824IFS=" ""	$as_nl"
66825
66826# Find who we are.  Look in the path if we contain no directory separator.
66827as_myself=
66828case $0 in #((
66829  *[\\/]* ) as_myself=$0 ;;
66830  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66831for as_dir in $PATH
66832do
66833  IFS=$as_save_IFS
66834  test -z "$as_dir" && as_dir=.
66835    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66836  done
66837IFS=$as_save_IFS
66838
66839     ;;
66840esac
66841# We did not find ourselves, most probably we were run as `sh COMMAND'
66842# in which case we are not to be found in the path.
66843if test "x$as_myself" = x; then
66844  as_myself=$0
66845fi
66846if test ! -f "$as_myself"; then
66847  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66848  exit 1
66849fi
66850
66851# Unset variables that we do not need and which cause bugs (e.g. in
66852# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66853# suppresses any "Segmentation fault" message there.  '((' could
66854# trigger a bug in pdksh 5.2.14.
66855for as_var in BASH_ENV ENV MAIL MAILPATH
66856do eval test x\${$as_var+set} = xset \
66857  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66858done
66859PS1='$ '
66860PS2='> '
66861PS4='+ '
66862
66863# NLS nuisances.
66864LC_ALL=C
66865export LC_ALL
66866LANGUAGE=C
66867export LANGUAGE
66868
66869# CDPATH.
66870(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66871
66872
66873# as_fn_error STATUS ERROR [LINENO LOG_FD]
66874# ----------------------------------------
66875# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66876# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66877# script with STATUS, using 1 if that was 0.
66878as_fn_error ()
66879{
66880  as_status=$1; test $as_status -eq 0 && as_status=1
66881  if test "$4"; then
66882    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66883    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66884  fi
66885  $as_echo "$as_me: error: $2" >&2
66886  as_fn_exit $as_status
66887} # as_fn_error
66888
66889
66890# as_fn_set_status STATUS
66891# -----------------------
66892# Set $? to STATUS, without forking.
66893as_fn_set_status ()
66894{
66895  return $1
66896} # as_fn_set_status
66897
66898# as_fn_exit STATUS
66899# -----------------
66900# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66901as_fn_exit ()
66902{
66903  set +e
66904  as_fn_set_status $1
66905  exit $1
66906} # as_fn_exit
66907
66908# as_fn_unset VAR
66909# ---------------
66910# Portably unset VAR.
66911as_fn_unset ()
66912{
66913  { eval $1=; unset $1;}
66914}
66915as_unset=as_fn_unset
66916# as_fn_append VAR VALUE
66917# ----------------------
66918# Append the text in VALUE to the end of the definition contained in VAR. Take
66919# advantage of any shell optimizations that allow amortized linear growth over
66920# repeated appends, instead of the typical quadratic growth present in naive
66921# implementations.
66922if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66923  eval 'as_fn_append ()
66924  {
66925    eval $1+=\$2
66926  }'
66927else
66928  as_fn_append ()
66929  {
66930    eval $1=\$$1\$2
66931  }
66932fi # as_fn_append
66933
66934# as_fn_arith ARG...
66935# ------------------
66936# Perform arithmetic evaluation on the ARGs, and store the result in the
66937# global $as_val. Take advantage of shells that can avoid forks. The arguments
66938# must be portable across $(()) and expr.
66939if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66940  eval 'as_fn_arith ()
66941  {
66942    as_val=$(( $* ))
66943  }'
66944else
66945  as_fn_arith ()
66946  {
66947    as_val=`expr "$@" || test $? -eq 1`
66948  }
66949fi # as_fn_arith
66950
66951
66952if expr a : '\(a\)' >/dev/null 2>&1 &&
66953   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66954  as_expr=expr
66955else
66956  as_expr=false
66957fi
66958
66959if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66960  as_basename=basename
66961else
66962  as_basename=false
66963fi
66964
66965if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66966  as_dirname=dirname
66967else
66968  as_dirname=false
66969fi
66970
66971as_me=`$as_basename -- "$0" ||
66972$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66973	 X"$0" : 'X\(//\)$' \| \
66974	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66975$as_echo X/"$0" |
66976    sed '/^.*\/\([^/][^/]*\)\/*$/{
66977	    s//\1/
66978	    q
66979	  }
66980	  /^X\/\(\/\/\)$/{
66981	    s//\1/
66982	    q
66983	  }
66984	  /^X\/\(\/\).*/{
66985	    s//\1/
66986	    q
66987	  }
66988	  s/.*/./; q'`
66989
66990# Avoid depending upon Character Ranges.
66991as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66992as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66993as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66994as_cr_digits='0123456789'
66995as_cr_alnum=$as_cr_Letters$as_cr_digits
66996
66997ECHO_C= ECHO_N= ECHO_T=
66998case `echo -n x` in #(((((
66999-n*)
67000  case `echo 'xy\c'` in
67001  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67002  xy)  ECHO_C='\c';;
67003  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67004       ECHO_T='	';;
67005  esac;;
67006*)
67007  ECHO_N='-n';;
67008esac
67009
67010rm -f conf$$ conf$$.exe conf$$.file
67011if test -d conf$$.dir; then
67012  rm -f conf$$.dir/conf$$.file
67013else
67014  rm -f conf$$.dir
67015  mkdir conf$$.dir 2>/dev/null
67016fi
67017if (echo >conf$$.file) 2>/dev/null; then
67018  if ln -s conf$$.file conf$$ 2>/dev/null; then
67019    as_ln_s='ln -s'
67020    # ... but there are two gotchas:
67021    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67022    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67023    # In both cases, we have to default to `cp -pR'.
67024    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67025      as_ln_s='cp -pR'
67026  elif ln conf$$.file conf$$ 2>/dev/null; then
67027    as_ln_s=ln
67028  else
67029    as_ln_s='cp -pR'
67030  fi
67031else
67032  as_ln_s='cp -pR'
67033fi
67034rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67035rmdir conf$$.dir 2>/dev/null
67036
67037
67038# as_fn_mkdir_p
67039# -------------
67040# Create "$as_dir" as a directory, including parents if necessary.
67041as_fn_mkdir_p ()
67042{
67043
67044  case $as_dir in #(
67045  -*) as_dir=./$as_dir;;
67046  esac
67047  test -d "$as_dir" || eval $as_mkdir_p || {
67048    as_dirs=
67049    while :; do
67050      case $as_dir in #(
67051      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67052      *) as_qdir=$as_dir;;
67053      esac
67054      as_dirs="'$as_qdir' $as_dirs"
67055      as_dir=`$as_dirname -- "$as_dir" ||
67056$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67057	 X"$as_dir" : 'X\(//\)[^/]' \| \
67058	 X"$as_dir" : 'X\(//\)$' \| \
67059	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67060$as_echo X"$as_dir" |
67061    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67062	    s//\1/
67063	    q
67064	  }
67065	  /^X\(\/\/\)[^/].*/{
67066	    s//\1/
67067	    q
67068	  }
67069	  /^X\(\/\/\)$/{
67070	    s//\1/
67071	    q
67072	  }
67073	  /^X\(\/\).*/{
67074	    s//\1/
67075	    q
67076	  }
67077	  s/.*/./; q'`
67078      test -d "$as_dir" && break
67079    done
67080    test -z "$as_dirs" || eval "mkdir $as_dirs"
67081  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67082
67083
67084} # as_fn_mkdir_p
67085if mkdir -p . 2>/dev/null; then
67086  as_mkdir_p='mkdir -p "$as_dir"'
67087else
67088  test -d ./-p && rmdir ./-p
67089  as_mkdir_p=false
67090fi
67091
67092
67093# as_fn_executable_p FILE
67094# -----------------------
67095# Test if FILE is an executable regular file.
67096as_fn_executable_p ()
67097{
67098  test -f "$1" && test -x "$1"
67099} # as_fn_executable_p
67100as_test_x='test -x'
67101as_executable_p=as_fn_executable_p
67102
67103# Sed expression to map a string onto a valid CPP name.
67104as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67105
67106# Sed expression to map a string onto a valid variable name.
67107as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67108
67109
67110exec 6>&1
67111## ----------------------------------- ##
67112## Main body of $CONFIG_STATUS script. ##
67113## ----------------------------------- ##
67114_ASEOF
67115test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67116
67117cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67118# Save the log message, to keep $0 and so on meaningful, and to
67119# report actual input values of CONFIG_FILES etc. instead of their
67120# values after options handling.
67121ac_log="
67122This file was extended by OpenJDK $as_me jdk9, which was
67123generated by GNU Autoconf 2.69.  Invocation command line was
67124
67125  CONFIG_FILES    = $CONFIG_FILES
67126  CONFIG_HEADERS  = $CONFIG_HEADERS
67127  CONFIG_LINKS    = $CONFIG_LINKS
67128  CONFIG_COMMANDS = $CONFIG_COMMANDS
67129  $ $0 $@
67130
67131on `(hostname || uname -n) 2>/dev/null | sed 1q`
67132"
67133
67134_ACEOF
67135
67136case $ac_config_files in *"
67137"*) set x $ac_config_files; shift; ac_config_files=$*;;
67138esac
67139
67140
67141
67142cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67143# Files that config.status was made for.
67144config_files="$ac_config_files"
67145
67146_ACEOF
67147
67148cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67149ac_cs_usage="\
67150\`$as_me' instantiates files and other configuration actions
67151from templates according to the current configuration.  Unless the files
67152and actions are specified as TAGs, all are instantiated by default.
67153
67154Usage: $0 [OPTION]... [TAG]...
67155
67156  -h, --help       print this help, then exit
67157  -V, --version    print version number and configuration settings, then exit
67158      --config     print configuration, then exit
67159  -q, --quiet, --silent
67160                   do not print progress messages
67161  -d, --debug      don't remove temporary files
67162      --recheck    update $as_me by reconfiguring in the same conditions
67163      --file=FILE[:TEMPLATE]
67164                   instantiate the configuration file FILE
67165
67166Configuration files:
67167$config_files
67168
67169Report bugs to <build-dev@openjdk.java.net>.
67170OpenJDK home page: <http://openjdk.java.net>."
67171
67172_ACEOF
67173cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67174ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67175ac_cs_version="\\
67176OpenJDK config.status jdk9
67177configured by $0, generated by GNU Autoconf 2.69,
67178  with options \\"\$ac_cs_config\\"
67179
67180Copyright (C) 2012 Free Software Foundation, Inc.
67181This config.status script is free software; the Free Software Foundation
67182gives unlimited permission to copy, distribute and modify it."
67183
67184ac_pwd='$ac_pwd'
67185srcdir='$srcdir'
67186AWK='$AWK'
67187test -n "\$AWK" || AWK=awk
67188_ACEOF
67189
67190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67191# The default lists apply if the user does not specify any file.
67192ac_need_defaults=:
67193while test $# != 0
67194do
67195  case $1 in
67196  --*=?*)
67197    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67198    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67199    ac_shift=:
67200    ;;
67201  --*=)
67202    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67203    ac_optarg=
67204    ac_shift=:
67205    ;;
67206  *)
67207    ac_option=$1
67208    ac_optarg=$2
67209    ac_shift=shift
67210    ;;
67211  esac
67212
67213  case $ac_option in
67214  # Handling of the options.
67215  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67216    ac_cs_recheck=: ;;
67217  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67218    $as_echo "$ac_cs_version"; exit ;;
67219  --config | --confi | --conf | --con | --co | --c )
67220    $as_echo "$ac_cs_config"; exit ;;
67221  --debug | --debu | --deb | --de | --d | -d )
67222    debug=: ;;
67223  --file | --fil | --fi | --f )
67224    $ac_shift
67225    case $ac_optarg in
67226    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67227    '') as_fn_error $? "missing file argument" ;;
67228    esac
67229    as_fn_append CONFIG_FILES " '$ac_optarg'"
67230    ac_need_defaults=false;;
67231  --he | --h |  --help | --hel | -h )
67232    $as_echo "$ac_cs_usage"; exit ;;
67233  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67234  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67235    ac_cs_silent=: ;;
67236
67237  # This is an error.
67238  -*) as_fn_error $? "unrecognized option: \`$1'
67239Try \`$0 --help' for more information." ;;
67240
67241  *) as_fn_append ac_config_targets " $1"
67242     ac_need_defaults=false ;;
67243
67244  esac
67245  shift
67246done
67247
67248ac_configure_extra_args=
67249
67250if $ac_cs_silent; then
67251  exec 6>/dev/null
67252  ac_configure_extra_args="$ac_configure_extra_args --silent"
67253fi
67254
67255_ACEOF
67256cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67257if \$ac_cs_recheck; then
67258  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67259  shift
67260  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67261  CONFIG_SHELL='$SHELL'
67262  export CONFIG_SHELL
67263  exec "\$@"
67264fi
67265
67266_ACEOF
67267cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67268exec 5>>config.log
67269{
67270  echo
67271  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67272## Running $as_me. ##
67273_ASBOX
67274  $as_echo "$ac_log"
67275} >&5
67276
67277_ACEOF
67278cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67279_ACEOF
67280
67281cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67282
67283# Handling of arguments.
67284for ac_config_target in $ac_config_targets
67285do
67286  case $ac_config_target in
67287    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67288    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67289    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67290    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67291    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67292
67293  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67294  esac
67295done
67296
67297
67298# If the user did not use the arguments to specify the items to instantiate,
67299# then the envvar interface is used.  Set only those that are not.
67300# We use the long form for the default assignment because of an extremely
67301# bizarre bug on SunOS 4.1.3.
67302if $ac_need_defaults; then
67303  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67304fi
67305
67306# Have a temporary directory for convenience.  Make it in the build tree
67307# simply because there is no reason against having it here, and in addition,
67308# creating and moving files from /tmp can sometimes cause problems.
67309# Hook for its removal unless debugging.
67310# Note that there is a small window in which the directory will not be cleaned:
67311# after its creation but before its name has been assigned to `$tmp'.
67312$debug ||
67313{
67314  tmp= ac_tmp=
67315  trap 'exit_status=$?
67316  : "${ac_tmp:=$tmp}"
67317  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67318' 0
67319  trap 'as_fn_exit 1' 1 2 13 15
67320}
67321# Create a (secure) tmp directory for tmp files.
67322
67323{
67324  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67325  test -d "$tmp"
67326}  ||
67327{
67328  tmp=./conf$$-$RANDOM
67329  (umask 077 && mkdir "$tmp")
67330} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67331ac_tmp=$tmp
67332
67333# Set up the scripts for CONFIG_FILES section.
67334# No need to generate them if there are no CONFIG_FILES.
67335# This happens for instance with `./config.status config.h'.
67336if test -n "$CONFIG_FILES"; then
67337
67338
67339ac_cr=`echo X | tr X '\015'`
67340# On cygwin, bash can eat \r inside `` if the user requested igncr.
67341# But we know of no other shell where ac_cr would be empty at this
67342# point, so we can use a bashism as a fallback.
67343if test "x$ac_cr" = x; then
67344  eval ac_cr=\$\'\\r\'
67345fi
67346ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67347if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67348  ac_cs_awk_cr='\\r'
67349else
67350  ac_cs_awk_cr=$ac_cr
67351fi
67352
67353echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67354_ACEOF
67355
67356
67357{
67358  echo "cat >conf$$subs.awk <<_ACEOF" &&
67359  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67360  echo "_ACEOF"
67361} >conf$$subs.sh ||
67362  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67363ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67364ac_delim='%!_!# '
67365for ac_last_try in false false false false false :; do
67366  . ./conf$$subs.sh ||
67367    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67368
67369  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67370  if test $ac_delim_n = $ac_delim_num; then
67371    break
67372  elif $ac_last_try; then
67373    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67374  else
67375    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67376  fi
67377done
67378rm -f conf$$subs.sh
67379
67380cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67381cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67382_ACEOF
67383sed -n '
67384h
67385s/^/S["/; s/!.*/"]=/
67386p
67387g
67388s/^[^!]*!//
67389:repl
67390t repl
67391s/'"$ac_delim"'$//
67392t delim
67393:nl
67394h
67395s/\(.\{148\}\)..*/\1/
67396t more1
67397s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67398p
67399n
67400b repl
67401:more1
67402s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67403p
67404g
67405s/.\{148\}//
67406t nl
67407:delim
67408h
67409s/\(.\{148\}\)..*/\1/
67410t more2
67411s/["\\]/\\&/g; s/^/"/; s/$/"/
67412p
67413b
67414:more2
67415s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67416p
67417g
67418s/.\{148\}//
67419t delim
67420' <conf$$subs.awk | sed '
67421/^[^""]/{
67422  N
67423  s/\n//
67424}
67425' >>$CONFIG_STATUS || ac_write_fail=1
67426rm -f conf$$subs.awk
67427cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67428_ACAWK
67429cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67430  for (key in S) S_is_set[key] = 1
67431  FS = ""
67432
67433}
67434{
67435  line = $ 0
67436  nfields = split(line, field, "@")
67437  substed = 0
67438  len = length(field[1])
67439  for (i = 2; i < nfields; i++) {
67440    key = field[i]
67441    keylen = length(key)
67442    if (S_is_set[key]) {
67443      value = S[key]
67444      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67445      len += length(value) + length(field[++i])
67446      substed = 1
67447    } else
67448      len += 1 + keylen
67449  }
67450
67451  print line
67452}
67453
67454_ACAWK
67455_ACEOF
67456cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67457if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67458  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67459else
67460  cat
67461fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67462  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67463_ACEOF
67464
67465# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67466# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67467# trailing colons and then remove the whole line if VPATH becomes empty
67468# (actually we leave an empty line to preserve line numbers).
67469if test "x$srcdir" = x.; then
67470  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67471h
67472s///
67473s/^/:/
67474s/[	 ]*$/:/
67475s/:\$(srcdir):/:/g
67476s/:\${srcdir}:/:/g
67477s/:@srcdir@:/:/g
67478s/^:*//
67479s/:*$//
67480x
67481s/\(=[	 ]*\).*/\1/
67482G
67483s/\n//
67484s/^[^=]*=[	 ]*$//
67485}'
67486fi
67487
67488cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67489fi # test -n "$CONFIG_FILES"
67490
67491
67492eval set X "  :F $CONFIG_FILES      "
67493shift
67494for ac_tag
67495do
67496  case $ac_tag in
67497  :[FHLC]) ac_mode=$ac_tag; continue;;
67498  esac
67499  case $ac_mode$ac_tag in
67500  :[FHL]*:*);;
67501  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67502  :[FH]-) ac_tag=-:-;;
67503  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67504  esac
67505  ac_save_IFS=$IFS
67506  IFS=:
67507  set x $ac_tag
67508  IFS=$ac_save_IFS
67509  shift
67510  ac_file=$1
67511  shift
67512
67513  case $ac_mode in
67514  :L) ac_source=$1;;
67515  :[FH])
67516    ac_file_inputs=
67517    for ac_f
67518    do
67519      case $ac_f in
67520      -) ac_f="$ac_tmp/stdin";;
67521      *) # Look for the file first in the build tree, then in the source tree
67522	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67523	 # because $ac_f cannot contain `:'.
67524	 test -f "$ac_f" ||
67525	   case $ac_f in
67526	   [\\/$]*) false;;
67527	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67528	   esac ||
67529	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67530      esac
67531      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67532      as_fn_append ac_file_inputs " '$ac_f'"
67533    done
67534
67535    # Let's still pretend it is `configure' which instantiates (i.e., don't
67536    # use $as_me), people would be surprised to read:
67537    #    /* config.h.  Generated by config.status.  */
67538    configure_input='Generated from '`
67539	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67540	`' by configure.'
67541    if test x"$ac_file" != x-; then
67542      configure_input="$ac_file.  $configure_input"
67543      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67544$as_echo "$as_me: creating $ac_file" >&6;}
67545    fi
67546    # Neutralize special characters interpreted by sed in replacement strings.
67547    case $configure_input in #(
67548    *\&* | *\|* | *\\* )
67549       ac_sed_conf_input=`$as_echo "$configure_input" |
67550       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67551    *) ac_sed_conf_input=$configure_input;;
67552    esac
67553
67554    case $ac_tag in
67555    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67556      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67557    esac
67558    ;;
67559  esac
67560
67561  ac_dir=`$as_dirname -- "$ac_file" ||
67562$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67563	 X"$ac_file" : 'X\(//\)[^/]' \| \
67564	 X"$ac_file" : 'X\(//\)$' \| \
67565	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67566$as_echo X"$ac_file" |
67567    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67568	    s//\1/
67569	    q
67570	  }
67571	  /^X\(\/\/\)[^/].*/{
67572	    s//\1/
67573	    q
67574	  }
67575	  /^X\(\/\/\)$/{
67576	    s//\1/
67577	    q
67578	  }
67579	  /^X\(\/\).*/{
67580	    s//\1/
67581	    q
67582	  }
67583	  s/.*/./; q'`
67584  as_dir="$ac_dir"; as_fn_mkdir_p
67585  ac_builddir=.
67586
67587case "$ac_dir" in
67588.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67589*)
67590  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67591  # A ".." for each directory in $ac_dir_suffix.
67592  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67593  case $ac_top_builddir_sub in
67594  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67595  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67596  esac ;;
67597esac
67598ac_abs_top_builddir=$ac_pwd
67599ac_abs_builddir=$ac_pwd$ac_dir_suffix
67600# for backward compatibility:
67601ac_top_builddir=$ac_top_build_prefix
67602
67603case $srcdir in
67604  .)  # We are building in place.
67605    ac_srcdir=.
67606    ac_top_srcdir=$ac_top_builddir_sub
67607    ac_abs_top_srcdir=$ac_pwd ;;
67608  [\\/]* | ?:[\\/]* )  # Absolute name.
67609    ac_srcdir=$srcdir$ac_dir_suffix;
67610    ac_top_srcdir=$srcdir
67611    ac_abs_top_srcdir=$srcdir ;;
67612  *) # Relative name.
67613    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67614    ac_top_srcdir=$ac_top_build_prefix$srcdir
67615    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67616esac
67617ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67618
67619
67620  case $ac_mode in
67621  :F)
67622  #
67623  # CONFIG_FILE
67624  #
67625
67626_ACEOF
67627
67628cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67629# If the template does not know about datarootdir, expand it.
67630# FIXME: This hack should be removed a few years after 2.60.
67631ac_datarootdir_hack=; ac_datarootdir_seen=
67632ac_sed_dataroot='
67633/datarootdir/ {
67634  p
67635  q
67636}
67637/@datadir@/p
67638/@docdir@/p
67639/@infodir@/p
67640/@localedir@/p
67641/@mandir@/p'
67642case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67643*datarootdir*) ac_datarootdir_seen=yes;;
67644*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67645  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67646$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67647_ACEOF
67648cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67649  ac_datarootdir_hack='
67650  s&@datadir@&$datadir&g
67651  s&@docdir@&$docdir&g
67652  s&@infodir@&$infodir&g
67653  s&@localedir@&$localedir&g
67654  s&@mandir@&$mandir&g
67655  s&\\\${datarootdir}&$datarootdir&g' ;;
67656esac
67657_ACEOF
67658
67659# Neutralize VPATH when `$srcdir' = `.'.
67660# Shell code in configure.ac might set extrasub.
67661# FIXME: do we really want to maintain this feature?
67662cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67663ac_sed_extra="$ac_vpsub
67664$extrasub
67665_ACEOF
67666cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67667:t
67668/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67669s|@configure_input@|$ac_sed_conf_input|;t t
67670s&@top_builddir@&$ac_top_builddir_sub&;t t
67671s&@top_build_prefix@&$ac_top_build_prefix&;t t
67672s&@srcdir@&$ac_srcdir&;t t
67673s&@abs_srcdir@&$ac_abs_srcdir&;t t
67674s&@top_srcdir@&$ac_top_srcdir&;t t
67675s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67676s&@builddir@&$ac_builddir&;t t
67677s&@abs_builddir@&$ac_abs_builddir&;t t
67678s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67679$ac_datarootdir_hack
67680"
67681eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67682  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67683
67684test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67685  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67686  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67687      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67688  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67689which seems to be undefined.  Please make sure it is defined" >&5
67690$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67691which seems to be undefined.  Please make sure it is defined" >&2;}
67692
67693  rm -f "$ac_tmp/stdin"
67694  case $ac_file in
67695  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67696  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67697  esac \
67698  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67699 ;;
67700
67701
67702
67703  esac
67704
67705done # for ac_tag
67706
67707
67708as_fn_exit 0
67709_ACEOF
67710ac_clean_files=$ac_clean_files_save
67711
67712test $ac_write_fail = 0 ||
67713  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67714
67715
67716# configure is writing to config.log, and then calls config.status.
67717# config.status does its own redirection, appending to config.log.
67718# Unfortunately, on DOS this fails, as config.log is still kept open
67719# by configure, so config.status won't be able to write to it; its
67720# output is simply discarded.  So we exec the FD to /dev/null,
67721# effectively closing config.log, so it can be properly (re)opened and
67722# appended to by config.status.  When coming back to configure, we
67723# need to make the FD available again.
67724if test "$no_create" != yes; then
67725  ac_cs_success=:
67726  ac_config_status_args=
67727  test "$silent" = yes &&
67728    ac_config_status_args="$ac_config_status_args --quiet"
67729  exec 5>/dev/null
67730  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67731  exec 5>>config.log
67732  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67733  # would make configure fail if this is the last instruction.
67734  $ac_cs_success || as_fn_exit 1
67735fi
67736if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67737  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67738$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67739fi
67740
67741
67742# After AC_OUTPUT, we need to do final work
67743
67744
67745  # Try to move config.log (generated by autoconf) to the configure-support directory.
67746  if test -e ./config.log; then
67747    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67748  fi
67749
67750  # Rotate our log file (configure.log)
67751  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67752    $RM -f "$OUTPUT_ROOT/configure.log.old"
67753  fi
67754  if test -e "$OUTPUT_ROOT/configure.log"; then
67755    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67756  fi
67757
67758  # Move configure.log from current directory to the build output root
67759  if test -e ./configure.log; then
67760    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67761  fi
67762
67763  # Make the compare script executable
67764  $CHMOD +x $OUTPUT_ROOT/compare.sh
67765
67766
67767# Finally output some useful information to the user
67768
67769  # Finally output some useful information to the user
67770
67771  printf "\n"
67772  printf "====================================================\n"
67773  if test "x$no_create" != "xyes"; then
67774    if test "x$IS_RECONFIGURE" != "xyes"; then
67775      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67776    else
67777      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67778    fi
67779  else
67780    if test "x$IS_RECONFIGURE" != "xyes"; then
67781      printf "A configuration has been successfully checked but not created\n"
67782    else
67783      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67784    fi
67785  fi
67786  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67787    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67788  else
67789    printf "using default settings.\n"
67790  fi
67791
67792  printf "\n"
67793  printf "Configuration summary:\n"
67794  printf "* Debug level:    $DEBUG_LEVEL\n"
67795  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67796  printf "* JDK variant:    $JDK_VARIANT\n"
67797  printf "* JVM variants:   $JVM_VARIANTS\n"
67798  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67799  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67800
67801  printf "\n"
67802  printf "Tools summary:\n"
67803  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67804    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67805  fi
67806  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67807  if test "x$TOOLCHAIN_VERSION" != "x"; then
67808    print_version=" $TOOLCHAIN_VERSION"
67809  fi
67810  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67811  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67812  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67813
67814  printf "\n"
67815  printf "Build performance summary:\n"
67816  printf "* Cores to use:   $JOBS\n"
67817  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67818  if test "x$CCACHE_STATUS" != "x"; then
67819    printf "* ccache status:  $CCACHE_STATUS\n"
67820  fi
67821  printf "\n"
67822
67823  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67824    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67825    printf "will result in longer build times.\n"
67826    printf "\n"
67827  fi
67828
67829  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67830    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67831    printf "These are not respected, and will be ignored. It is recommended\n"
67832    printf "that you clean your environment. The following variables are set:\n"
67833    printf "$FOUND_ALT_VARIABLES\n"
67834    printf "\n"
67835  fi
67836
67837  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67838    printf "WARNING: Your build output directory is not on a local disk.\n"
67839    printf "This will severely degrade build performance!\n"
67840    printf "It is recommended that you create an output directory on a local disk,\n"
67841    printf "and run the configure script again from that directory.\n"
67842    printf "\n"
67843  fi
67844
67845  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67846    printf "WARNING: The result of this configuration has overridden an older\n"
67847    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67848    printf "proper build. Failure to do so might result in strange build problems.\n"
67849    printf "\n"
67850  fi
67851
67852  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67853    printf "WARNING: The result of this configuration was not saved.\n"
67854    printf "You should run without '--no-create | -n' to create the configuration.\n"
67855    printf "\n"
67856  fi
67857
67858
67859
67860  # Locate config.log.
67861  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67862    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67863  elif test -e "./config.log"; then
67864    CONFIG_LOG_PATH="."
67865  fi
67866
67867  if test -e "$CONFIG_LOG_PATH/config.log"; then
67868    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67869    if test $? -eq 0; then
67870      printf "The following warnings were produced. Repeated here for convenience:\n"
67871      # We must quote sed expression (using []) to stop m4 from eating the [].
67872      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67873      printf "\n"
67874    fi
67875  fi
67876
67877